[PHP-DEV] PHP 7.4.25 Released!

2021-10-22 Thread Derick Rethans
The PHP development team announces the immediate availability of PHP
7.4.25. This is a security and bug fix release.

All PHP 7.4 users are encouraged to upgrade to this version.

For source downloads of PHP 7.4.25 please visit our downloads page.
Windows binaries can be found on the PHP for Windows site. The list of
changes is recorded in the ChangeLog.

A migration guide is available in the PHP Manual. Please consult it for the
detailed list of new features and backward incompatible changes.

Release Announcement: 
Downloads:
Windows downloads:
Changelog:
Migration guide:  

Many thanks to all the contributors and supporters!

Derick Rethans and Remi Collet

P.S. Below is the verification information for the downloads, which is
also available on
.


php-7.4.25.tar.gz
SHA256 hash: 3b2632252c933cac489a20f68b8f4ab769e5a0a3bf22b6ef47427aff6922e31f
PGP signature:
-BEGIN PGP SIGNATURE-

iQIzBAABCgAdFiEEWlKIB4H3VWCL+BX8kQ3rRvU+oxIFAmFu4v4ACgkQkQ3rRvU+
oxKMzg/9E5a6e7xi8mrVQ+b6Ttn/do1631M6LTCA4lZjIQ/7nI7sBEUIdWv6vPNg
HOedvXZ1B6EkjyPvx8QEMWZNuhVy+R1eNL3AnvE4sW0G5GsTQylaZ+w9AV7h5Lk+
m7ccfMRtx6clTDOoYAFv9md+7QRZxXB4yNZH1pt3JR3SdwIXWTA65KEBFB0JFxQV
pXsJfDzN5EsCUnHzPjCzIFOF4jnRmVUiy2gwSzI0WOfJ9BS3jgbeVQ20XY9uW3s/
KwP8kvJPYfu6/1L6INSVeAoFBmC560+sHiKRJnRbtYootalRfOdie4DYH8I7q7Be
blIcmS+4aV1g1XNno5M13HMaHSAtGA7zA0GxLheRe+a1+f3UhbrL74hnMMdBfls2
LLuUNm2QF9r7Gta9kaLoJQk2hnqf8Al+3d1DSADhcMPc9k3pPQt/8RbzEgE+cZ45
JZy95sVPVgWSBwv07L/Mdstfc46Ygz97k02qhNJ/63Owl5YSKAKVr8tX9SnaKRRG
WUf6zfqhvgR8kDSt6A+GlgUn4KUo3sOu62u3BXNz9PoIGcScrV2jIOwY4wUz6ctH
bxNn4x2FEloG6uZgQKy9VVa8rtZm1dZgA3aYIazq5AGl0sHg/ILEb6JMK2/sxgyI
Shq0ZwqdrFFbWzsBETtRGc5Asf+jFXBKz2S/XnSZxBfXU5+pbdE=
=tqbE
-END PGP SIGNATURE-

php-7.4.25.tar.bz2
SHA256 hash: 27992570caf3e2e5323ab7b37853c44c1529b1d31ea94d9776efa91d5a781313
PGP signature:
-BEGIN PGP SIGNATURE-

iQIzBAABCgAdFiEEWlKIB4H3VWCL+BX8kQ3rRvU+oxIFAmFu4wEACgkQkQ3rRvU+
oxLg1RAAoYuWB6jItKW1+PNgxgMp5bzTN/6T0lXDequHR6UqiKK+UVC6VJqQPjwz
gRm/qJpn8SUW95FryoH3Oa35gznzwjkB16Z2vIhb6Tzg7G4bXZDbkUl/KRADnFqo
gkHiSLrSHCml/a1ieUzgZ3MD0O1aUg1qJewy5UwLOXG6KCYADwwI4QqVvboZ+Ax0
B0j+Gy3HQLYjgPDai0PGfEgB1/Isk3ahZczZXhf1eTJlZgOUc29CM3IpyIV0Dc8F
CqiTHMh6XfY1D1fuRIOnguBZ0DSICfkjzxAKLTPJmnWIDUmFGqbax1ghSo2K6XJ6
BTH9VDtCsKJIyY3fHH2aUVAC4B7nkWaxcCl/JclMyPYfJyvyB+K5ZrDXosgisPEI
sSqS95t7SX6ZRN+7JjpGRGXfy9+BsWLRG1KvAIpueMIkS9i+9mxv+CceTg0suQik
QckN/lp347//K26lJJ56oO4VUf10Pv1Zf1jNozM1+uxp+9+VOu8dptr9kqXPUGGO
v2aQHexS22mlteb7pCU1axO9p9+W+JmZ20z50xHem8TgYE2iHGHdNHOs+VEDElf4
aD4lSm95zqF6BiTNZv3XlpZz8XPzlkYkL02U5XwKpNNV/+8U2iKcgPo14d1RX/V1
v1vBimyfeciXn+w2/Z/gEFxfT51YRTcrkJSc9pDMctArtHVSTYc=
=UOxC
-END PGP SIGNATURE-

php-7.4.25.tar.xz
SHA256 hash: 12a758f1d7fee544387a28d3cf73226f47e3a52fb3049f07fcc37d156d393c0a
PGP signature:
-BEGIN PGP SIGNATURE-

iQIzBAABCgAdFiEEWlKIB4H3VWCL+BX8kQ3rRvU+oxIFAmFu4wIACgkQkQ3rRvU+
oxLfhQ//S7DkMeLY4Pk9cm3REYa4QMpc6+pbgdYd/29ineGgeY2CjZPQserWIAjX
6e4Q47WZhc717PAx2/Behn6afWa9A0HK45MCf4LLU4aATD0ac++itf/aJH1vaX7a
nbIynhes45Ja/XdjGH5+llGFahpL56C0T0TlmAnr2QIYQWIDE/ozsSr4IbfCmEK8
1qyWtV+0dShDpQOQ02xmJsBwW7r+YsNYaMjK/cti0BshweNKk12iW4iAhk52A3vq
ZlymmAjdu1HXh6INY4EmvZSa/YTPO77bcZfXqDPUEyQSPe6NIhMMTvBdb8PJlAH+
/Z2a+p0TvgbN5Ei7EFig8OBUXpPtYLHTvmtxAqgOxbqdkDD9NLZdIOSY8VNt/IyT
CFQyVQALtBQsfnbtKq4FVbudoPxJFdq755iecjaRnCFpC06uBrqIBe9wgc2lqd8f
2zSpso9obJ2QUJ1GPs9xN8ize1wYKSLav65UwOb7y98t0egEpfj3EmwpAEyCwdcr
rS6I9v/9P3qZE5ZLARz4GtVfPoDSVCO45UuGj+pC0bvjcu9DaBQmSEhYvRfVcvmK
y8q9MvLw8XfTjxJpNLT7eAoFvgk2HtBi78AK5GTzim0leoqB8XM0pLMOKQvtRTxs
TLTBPTEuuFHYECTV8vNe9YJBBaBZWu16d19OCBJt2VcExD9Ap8U=
=yeWS
-END PGP SIGNATURE-


-- 
PHP 7.4 Release Manager
Host of PHP Internals News: https://phpinternals.news
Like Xdebug? Consider supporting me: https://xdebug.org/support
https://derickrethans.nl | https://xdebug.org | https://dram.io
twitter: @derickr and @xdebug

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php



Re: [PHP-DEV] Add ReflectionFunctionAbstract::isAnonymous()

2021-10-22 Thread Dylan K. Taylor


 On Fri, 22 Oct 2021 14:19:23 +0100 Claude Pache  
wrote 

 > 
 > Le 21 oct. 2021 à 01:12, Dylan K. Taylor  a écrit :
 > 
 > Hi all, 
 > 
 > Given the addition of Closure::fromCallable() and the upcoming first-class 
 > callable syntax in 8.1, it seems slightly problematic that there's no simple 
 > way to tell by reflection if a Closure refers to an anonymous function or 
 > not. ReflectionFunctionAbstract::isClosure() (perhaps somewhat misleadingly) 
 > returns whether the closure is literally a \Closure instance, so it's not 
 > useful for this purpose. 
 > 
 > The only way to do this currently (that I know about) is to check if the 
 > name of the function contains "{closure}", which is a bit unpleasant and 
 > depends on undocumented behaviour. 
 > 
 > I'm proposing the addition of ReflectionFunctionAbstract::isAnonymous(), 
 > which would fill this use case, and may be able to offer an implementation. 
 > 
 > Thanks, 
 > Dylan Taylor. 
 > 
 > 
 > -- 
 > PHP Internals - PHP Runtime Development Mailing List
 > To unsubscribe, visit: https://www.php.net/unsub.php
 > 
 > 
 > 
 > Hi,
 > 
 > Per the manual [1], Closure::fromCallable() “creates and returns a new 
 > anonymous function”. I guess that this might not match your notion of 
 > “anonymous function”?
 > 
 > Therefore, I am asking for clarification: What practical distinction do you 
 > make between ”an instance of Closure” and “an anonymous function”, and why 
 > does this distinction matter?
 > 
 > [1]: https://www.php.net/manual/en/closure.fromcallable.php
 > 
 > —Claude
 > 

Hi Claude, 
Sorry for the double email, my previous reply got bounced from the mailing list 
because I replied from the wrong address.

An anonymous function would be an unnamed function, e.g. arrow function or 
function(){}.

I guess the documentation for Closure::fromCallable() ought to be updated, 
because Closure::fromCallable('namedFunc') isn't really anonymous, it's a 
\Closure object that refers to a named function. A \Closure may refer to a 
named or an anonymous function, and currently there's no way to tell the 
difference without hacks.

The distinction is important for reflection cases, such as the one Aaron 
mentioned, and also like generating a pretty name for closures in a project I 
maintain [1].

It's a fringe use case for sure, but considering we already have 
ReflectionClass->isAnonymous(), I think it makes sense.

[1]: 
https://github.com/pmmp/PocketMine-MP/blob/986b4e0651d665c72ec011542f95b4bd9529c6a8/src/pocketmine/utils/Utils.php#L144

Dylan

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php



Re: [PHP-DEV] Add ReflectionFunctionAbstract::isAnonymous()

2021-10-22 Thread Claude Pache

> Le 21 oct. 2021 à 01:12, Dylan K. Taylor  a écrit :
> 
> Hi all, 
> 
> Given the addition of Closure::fromCallable() and the upcoming first-class 
> callable syntax in 8.1, it seems slightly problematic that there's no simple 
> way to tell by reflection if a Closure refers to an anonymous function or 
> not. ReflectionFunctionAbstract::isClosure() (perhaps somewhat misleadingly) 
> returns whether the closure is literally a \Closure instance, so it's not 
> useful for this purpose. 
> 
> The only way to do this currently (that I know about) is to check if the name 
> of the function contains "{closure}", which is a bit unpleasant and depends 
> on undocumented behaviour. 
> 
> I'm proposing the addition of ReflectionFunctionAbstract::isAnonymous(), 
> which would fill this use case, and may be able to offer an implementation. 
> 
> Thanks, 
> Dylan Taylor. 
> 
> 
> -- 
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: https://www.php.net/unsub.php
> 


Hi,

Per the manual [1], Closure::fromCallable() “creates and returns a new 
anonymous function”. I guess that this might not match your notion of 
“anonymous function”?

Therefore, I am asking for clarification: What practical distinction do you 
make between ”an instance of Closure” and “an anonymous function”, and why does 
this distinction matter?

[1]: https://www.php.net/manual/en/closure.fromcallable.php 


—Claude

[PHP-DEV] Re: [VOTE] Deprecate partially supported callables

2021-10-22 Thread Nikita Popov
On Fri, Oct 8, 2021 at 4:16 PM Nikita Popov  wrote:

> Hi internals!
>
> I've opened voting on
> https://wiki.php.net/rfc/deprecate_partially_supported_callables, which
> deprecated callables that are not supported in $callable() syntax. The vote
> closes on 2021-10-22.
>

The proposal has been accepted unanimously, with 32 votes in favor.

Regards,
Nikita