Re: [RFC] Deprecations for PHP 8.5
| From: | Daikaras | Date: | Thu, 10 Jul 2025 05:26:24 +0000 |
| Subject: | Re: [RFC] Deprecations for PHP 8.5 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-127986@lists.php.net to get a copy of this message | ||
On 7/10/2025 12:23 AM, Claude Pache wrote:
Oof, I didn't think of that. So this is a no go, IMO.Le 9 juil. 2025 à 14:21, Gina P. Banyard <internals@gpb.moe> a écrit : On Wednesday, 9 July 2025 at 08:17, Daikaras <webmaster@daikaras.lt> wrote:Hi, A possible reason for wanting to use the non-canonical names in settype(), is that those names are returned by gettype(). Fictional example (not intended to be reasonable, only illustrative):I wasn't aware of the discrepencies with settype() so I added the deprecation of non-canonical type names to settype() as its own deprecation entry in the ext/standard section. Thanks for bringing this to my attention! Best regards, Gina P. BanyardWe propose to deprecate the following non-standard cast names: *Hello, Just wondering is this going to affect|(integer)|*|(boolean)|*|(double)|*|(binary)|settype()function? There is already some disparity in thatsettype()supportsinteger/boolean/doublebut notbinarytype (and additionally supportsnulltype).function settype_from(&$a, &b) { return settype($a, gettype($b)); }Personally, I have used "integer", etc. instead of "int", etc., in settype() in the past, because those were the “canonical” (as I perceived) forms returned by gettype(). I have slowly fallen out of that habit in the years after I began to use scalar type declarations (introduced in PHP 7). —Claude