Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127986 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 22D071A00BC for ; Thu, 10 Jul 2025 05:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1752124999; bh=o3JOjJvL8NZ0rHQc7odnKt3mZl3v0ih35p4fR3G80wg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=BBJAnZlIiYo1KbvLe8OPLJqVv0HtH3x9RhPqDHWE6+r/Um9PPpojRn6EMnfFhRo9e NkmjLNGyfD/JRbzovsRcjxwgwsmtVX2OSHAjqPK0GFNEBboBYip8CjO2ndw7Zrz5pu 59I8/Fjpo8CfXLRhRjRnZHEi/zx0TIJ/xMD8bwdbSOhnhL0/+dqwdmki3YGoOy9tsJ rP8X6vTXewzUk0L2PtWC8/UFnZcgiRex6/s0y1cwm8/NFNKOEmNCal5GUaZDV1leGZ oqS3dTwz4dfOeH7wmQ4ytwhL7U12XV0PFZuZgLIXvuaIQOMxJF6LgkaxWBfuuoTnHr H0PeS+A1uETEQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B0BE9180082 for ; Thu, 10 Jul 2025 05:23:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DMARC_MISSING, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from apynys.serveriai.lt (apynys.serveriai.lt [79.98.29.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 10 Jul 2025 05:23:17 +0000 (UTC) Received: from [83.176.246.7] (helo=[192.168.1.156]) by apynys.serveriai.lt with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.97.1) (envelope-from ) id 1uZjmK-000000007Fn-33VQ; Thu, 10 Jul 2025 08:25:04 +0300 Content-Type: multipart/alternative; boundary="------------22rSXrmF3vupfa0dAxfJQ0Gf" Message-ID: <4b182da5-647d-4c18-b52c-0cf2e3227dad@daikaras.lt> Date: Thu, 10 Jul 2025 08:26:24 +0300 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.5 To: Claude Pache , "Gina P. Banyard" Cc: PHP internals References: <43b55cf7-bd7a-40a0-90ee-0b9dd67f54bb@daikaras.lt> <6dxtR-lrZ-CVEhWWJp1IlCYt8_v0u16-lWG69EeyJAvUQdlDeW-2VgKZ7tezX4fG-JhORVaXZa9Kotnm8WlM6Mz7G1_NzzhFSozx3wuEHTU=@gpb.moe> <7808C18B-127F-4C60-914C-CCF14FD74055@gmail.com> Content-Language: en-US In-Reply-To: <7808C18B-127F-4C60-914C-CCF14FD74055@gmail.com> X-Sender: webmaster@daikaras.lt From: webmaster@daikaras.lt (Daikaras) This is a multi-part message in MIME format. --------------22rSXrmF3vupfa0dAxfJQ0Gf Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 7/10/2025 12:23 AM, Claude Pache wrote: > > >> Le 9 juil. 2025 à 14:21, Gina P. Banyard a écrit : >> >> On Wednesday, 9 July 2025 at 08:17, Daikaras >> wrote: >>> >>>> We propose to deprecate the following non-standard cast names: >>>> >>>> * >>>> |(integer)| >>>> * >>>> |(boolean)| >>>> * >>>> |(double)| >>>> * >>>> |(binary)| >>>> >>> Hello, >>> >>> Just wondering is this going to affect `settype()` function? There >>> is already some disparity in that `settype()` supports >>> `integer/boolean/double` but not `binary` type (and additionally >>> supports `null` type). >>> >> 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. Banyard > > 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): > > ```php > 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 Oof, I didn't think of that. So this is a no go, IMO. --------------22rSXrmF3vupfa0dAxfJQ0Gf Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 7/10/2025 12:23 AM, Claude Pache wrote:


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:

We propose to deprecate the following non-standard cast names:

  • (integer)
  • (boolean)
  • (double)
  • (binary)

Hello,

Just wondering is this going to affect `settype()` function? There is already some disparity in that `settype()` supports `integer/boolean/double` but not `binary` type (and additionally supports `null` type).

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. Banyard

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):

```php
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

Oof, I didn't think of that. So this is a no go, IMO.

--------------22rSXrmF3vupfa0dAxfJQ0Gf--