Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127596 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 D90F51A00BC for ; Wed, 4 Jun 2025 17:15:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1749057189; bh=dvIX5nP61m21jy2tbAmxv5vZ8vGgpwHILD7NfZ48U54=; h=Date:Subject:To:References:From:In-Reply-To:From; b=VCbHL4l7oAwlW3TNJtP2moxitPTvexggtueYEBqKqDWjLSOGdDmd6ylqexKcLM2zJ o7BTRDANkRHg0GSsOOGv7dM45X0k8XLlUySBithtE+fDO0FihbxVU8hBiwGVg4xijS QUp1fTOsA6/K6un74ms8U55mepQWT+ThCStyvsSa6/dOVV6pqeq1RKFlr5EVVUTwk5 ic5FGXR3D4XwUTVF+C1lcQaMLQa/zABT/nqE/Qpb6iFYwXchyPvzqE5dQmx9iIof7s 4lvoSbw/10G0Lcjt0reUBJ3GK3vZhlaWcPMO/uWYPenJy2Glj6o/FvJKQnqwC6mIJ0 VNeiQNqvp5RJg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 263F3180042 for ; Wed, 4 Jun 2025 17:13:09 +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=-1.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_05, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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 EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2100.outbound.protection.outlook.com [40.92.90.100]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 4 Jun 2025 17:13:08 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=huwU07ACSIRoeFl75r3IEvdfbScneZnl8DXHQED3joaPfIcbk7sYHtO1wKcqtL2S4Yv4zIR8zXbHPsFPpKyeJYAIze6/wcm/aJvthnRr0k7MARSYMMsVy62oWmZibon8zeUkXsT/X7EP62y/D591bfT3EQjN77eMjgCE322vAks0Uaq+fVs9Bur/cPzfCcXU0y3vNCs70LWfYOHGpvJEon+sbYVQ7kGl8ZrON4eohnr3YEFxrsMzvHnzfsxa8/heT//GuZISQWheUt2qEH7KcpGTkUQ+blX0nogXojOXf1vlK5R7yI7t4dHCquuDqLk7SDsgwIjjFf+GGGq3SndaGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QFLzbXFo7kkFQtGs4P32qiBtVAZWlAKZjvDgtnyhvOk=; b=s1mZlB/iCjH1/AU78sG0CPZvHOMqMEYsu/qTYcvcE9vZ3jOoWdGagUJ4qDxikW56Aub76vJUkzD1RHuVQBlXn34svYMxUXXukcutIfEzSHtWBjjtvAGfAhqqS31A2satdta6X5Xmxw+nzYVPgwmZOFLA1nfylRkiXT165CgLPkZmwaF1WcpVD0bPzjZEfG9mI7k2I7e8RVhZTdxwaUxzKq3FNTky85O9yyy17vrEA4QVzu0/czNSkDtiwb7BG5cTlj3lC5TJkfWiMjLzOSCTDwG2ZVbCWsfKOAdr1Zp4dIp6AOAPqLJms6HUjzUe9bZ6n9Bbtw/Hb9XCi5TuD2Q1cA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QFLzbXFo7kkFQtGs4P32qiBtVAZWlAKZjvDgtnyhvOk=; b=KfOihgVKaDjMGRk2kZthtV+Di2Oc2t4J0gxMpFV8BIZrwWO68K1E0IIJ77dyzYaFiRkvEBMn/HFSd0SZvewj4FQFgDP7ofm5Ca5KctsXgpPztfP8JZa+AsacECvJoHIQyR1AUBg+GGEeVRV6RwGVCD2K4PFs2mDr0q2Kh+Uq2VM2wSaO/LyWZaUp6SeHWJl1JUMlnHgEA7UWDpNOuNWyl314BAh+a9VdNoWWpDjckceg0SK8rdfV5f/byTcLELee0Dx5znF6UjG9I2cg9Eq/3EDNVvJ1r1VEhTy5Td4pW0rH8L9wrcz8X+dW8A9uE7c+HGE7OnzjsT80+rniK3cKuQ== Received: from AM8P250MB0170.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:321::21) by DB4P250MB0928.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:383::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun 2025 17:15:09 +0000 Received: from AM8P250MB0170.EURP250.PROD.OUTLOOK.COM ([fe80::651e:bbd2:b18a:80ff]) by AM8P250MB0170.EURP250.PROD.OUTLOOK.COM ([fe80::651e:bbd2:b18a:80ff%7]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025 17:15:09 +0000 Content-Type: multipart/alternative; boundary="------------UuqS69DAs9OwQTENIBXnN0pR" Message-ID: Date: Wed, 4 Jun 2025 19:15:08 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PHP-DEV][RFC] Deprecate type juggling to and from bool type within the function type juggling context To: Larry Garfield , php internals References: <3Yl0UGauXmKqk7s7Hqbv6iaXru-hZHf8Wj6VjwwihgRSaqZo5EZ2ndsOle-ae41C-lvnirynWt6PpuD7UJPL0zPCw18QHFE81Eb--fiiEbc=@gpb.moe> <0825f6bb-38c5-47c2-abff-2c1a07eddb96@alec.pl> <3149e465-d10b-40a2-a52a-4cdba738b438@alec.pl> <01d26f97-9b22-475d-bcfb-a9fb13b406f2@app.fastmail.com> Content-Language: en-US In-Reply-To: <01d26f97-9b22-475d-bcfb-a9fb13b406f2@app.fastmail.com> X-ClientProxiedBy: FR0P281CA0057.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:49::14) To AM8P250MB0170.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:321::21) X-Microsoft-Original-Message-ID: <4f209199-5bca-4689-80b2-882e4a3bc9e6@hotmail.com> Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM8P250MB0170:EE_|DB4P250MB0928:EE_ X-MS-Office365-Filtering-Correlation-Id: 39171d8e-4dfa-4143-ecd5-08dda38b5bae X-MS-Exchange-SLBlob-MailProps: 9IecXKUgicBKeQi7sk2nw1OVhKS2ChWDxSlZ4grvA0pFu5fy8w3jTPQt0bICie1q9xDzUs0nxXVo/aTx+ngwi3nlj/c0GN44QqIDNrdRnIASx/tFGnA0jM1cSGhXSVr/I8cC1MdGNCGoP3VN7r29a9IOYhjR0XtQH9+oMQ59zfGNQT9mjpy4ZDPSzORD4e0DG9A579LzNn8XaJCUNA38Tstae+uxftOa4unKaQKCsYNYT0LnIS/5ExrNvHra5FW9F80vJBYgtoRRss0iPqd4GVXYnRzcWewpVSARHKFq1r1FAAsk2oq8QV4PZPteEhYQrHLyXh90766YRvn+1K1kiMYsaTTHR1uPS3cjTlzN1VIbRedTufaaZQ4h924g5n8KFUF07oJZIkLjf7MS3O8v8xCxzQiez2OeM4oIg3NpVHC26m4Ik5eckkxXWHDkCgZ65dpAYk9owJdkrWev590LMlZmOemITO83rV+EE+lp95q/PbXi1hANd3lJWaoo0Q7jX7mJ8YlR2Kge1BxPBPPYF74h5pzult8N/nKe7jxq4FOVL0FWXRKSYQKwb9Udy6n3f+KuufCRnxg1ACpsj5z4OqTbnEYDNHpBs/CVJ4GMx+ghyWRmINFjiAplXJ0x9+UBGRj1zpiOS3Hve94bjIF5+bhMEJd8U9KvXGX6Z9aEdJH9rnw7vx99ZRyyJnKdEUcJi7DUB4M3K6N4JxKVyyWNN9FML0pdHky0EKedHAORRMmmR6UEvklApA== X-Microsoft-Antispam: BCL:0;ARA:14566002|12121999007|7092599006|15080799009|19110799006|8060799009|461199028|5072599009|3412199025|440099028|26104999006; X-Microsoft-Antispam-Message-Info: =?utf-8?B?dlh1WlBXM2tVS2trK2R6V0I4QkhuNlNxVlY1dkdFbXcrc2p2c0dudzNLeC9O?= =?utf-8?B?M3NFRktObWRoR1ZjTVBSNHpZdjhQYlR3ME5ML095NjlPR2dUWHdQb2UwVHll?= =?utf-8?B?anZ2cG1MaTc1RGNseFo4QTY4eVhNTytndm5pekxRakZPWVBkd29UYzZWWFFB?= =?utf-8?B?dmFNQzIvQUVEYTdabmpuL3Fmelg3clZVMXJ5dW9vMUJNREYrMnJMSGg4cm92?= =?utf-8?B?MmJyRWxFNEQrK1lzdVlkTmxjWUU4RUc4RnFSWmhweUtqTTZrcGUyWUJxdVlx?= =?utf-8?B?ZmNzb3pUbDBxQlZTUlVOWCtpdVNYVW9OcW5SRUc1THRxWlcwdllBY3NleXYv?= =?utf-8?B?K1g0KzFlV3ZDUGdjcWVCOVdpaTBKczM3S1NRa2Vrd3lSNFk4ZVk5amVCbXBx?= =?utf-8?B?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RV?= =?utf-8?B?akFEbFZQc0ttakM5YkVzR2IxQkxIeGprdnlRWG9wdFgxRy9ES0hBWFdwVHFC?= =?utf-8?B?eDRMTmUyMTlsbC9NbklGaGJCeHFZYlhCMVVONHlyNGt4b2RSRXdSdTY1T0tv?= =?utf-8?B?aWs2cDhkYXZpZzVWTnZsYjljUHA1dXFqTnEyeEV4ZHZlRUJ5QVNrZzlhWlkw?= =?utf-8?B?c0pVbVhwQzRVazZRU3hKZHVWcFJtRGFYMHQ0VUhNVllHV3JCUHFHdDdBaUJz?= =?utf-8?B?UEpEcHQ3L3dxc0Jzc1NuZGV2Mjljd0orZC9EYkpiajBINGwyM00zRkkvM1BS?= =?utf-8?Q?ADc6w+zdI9Fn/B6Hbw=3D?= X-OriginatorOrg: sct-15-20-8534-15-msonline-outlook-5f066.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 39171d8e-4dfa-4143-ecd5-08dda38b5bae X-MS-Exchange-CrossTenant-AuthSource: AM8P250MB0170.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 17:15:09.4540 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4P250MB0928 From: bobwei9@hotmail.com (Bob Weinand) --------------UuqS69DAs9OwQTENIBXnN0pR Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4.6.2025 18:46:58, Larry Garfield wrote: > On Wed, Jun 4, 2025, at 11:16 AM, Theodore Brown wrote: >> On Wed, June 4, 2025 at 09:37 Aleksander Machniak wrote: >> >>> On 4.06.2025 16:03, G. P. Banyard wrote: >>>> I don't understand what you mean. >>>> The purpose is to deprecate the behaviour in 8.5 so that it can be removed in PHP 9. >>>> We try to not break behaviour with no prior warning. >>>> Could you clarify what you mean? >>> I meant to move the deprecation to PHP 9.0. I feel the impact of >>> deprecation itself in this case might be significant. >> You feel there might be a lot of code passing floats, ints, or strings to >> `bool` parameters? I'm doubtful this is the case, since static analysis tools >> and IDEs are in much more widespread use nowadays. >> >> In my experience passing non-boolean values to a `bool` parameter almost always >> indicates a bug, and it would be valuable to get a deprecation notice sooner >> rather than later so these mistakes can be fixed. >> >> Regards, >> Theodore > The one place I can see it being used now legitimately is MySQL's TINYINT pseudo-bool columns. If you're mapping your query results into an object (please always do this), then you probably want to cast that into to a bool, and currently weak mode would let you do that implicitly. > > I can't think of a case where a string or float magically casting to a bool is reasonable. > > --Larry Garfield Basically every time you use external inputs. Maybe it's a $_GET parameter? I mean, I absolutely do not care whether $_GET["showcomments"] is actually 0, foo or 1.23. My code will only assign showcomments=0 or showcomments=1. But all I want is a bool. I absolutely do not care about the actual contents. If the language warns me about that it's likely that I will just be annoyed when it happens occasionally in production when some user tries to play around with the parameter values. And then I'll explicitly add the cast. But for all purposes, it's a plain annoyance. If you desire to be annoyed, be my guest and use strict types. For me the whole point of weak types is so that I can easily and comfortably work with arbitrary inputs. So this RFC gets really in my way here and I'm going to vote no on this. I could get on board with making true|false decay to bool, whenever they appear in an union type. But that's - for me - not related to bool in type juggling. Bob --------------UuqS69DAs9OwQTENIBXnN0pR Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 4.6.2025 18:46:58, Larry Garfield wrote:
On Wed, Jun 4, 2025, at 11:16 AM, Theodore Brown wrote:
On Wed, June 4, 2025 at 09:37 Aleksander Machniak wrote:

On 4.06.2025 16:03, G. P. Banyard wrote:
I don't understand what you mean.
The purpose is to deprecate the behaviour in 8.5 so that it can be removed in PHP 9.
We try to not break behaviour with no prior warning.
Could you clarify what you mean?
I meant to move the deprecation to PHP 9.0. I feel the impact of
deprecation itself in this case might be significant.
You feel there might be a lot of code passing floats, ints, or strings to
`bool` parameters? I'm doubtful this is the case, since static analysis tools
and IDEs are in much more widespread use nowadays.

In my experience passing non-boolean values to a `bool` parameter almost always
indicates a bug, and it would be valuable to get a deprecation notice sooner
rather than later so these mistakes can be fixed.

Regards,  
Theodore
The one place I can see it being used now legitimately is MySQL's TINYINT pseudo-bool columns.  If you're mapping your query results into an object (please always do this), then you probably want to cast that into to a bool, and currently weak mode would let you do that implicitly.

I can't think of a case where a string or float magically casting to a bool is reasonable.

--Larry Garfield

Basically every time you use external inputs. Maybe it's a $_GET parameter? I mean, I absolutely do not care whether $_GET["showcomments"] is actually 0, foo or 1.23. My code will only assign showcomments=0 or showcomments=1. But all I want is a bool. I absolutely do not care about the actual contents. If the language warns me about that it's likely that I will just be annoyed when it happens occasionally in production when some user tries to play around with the parameter values. And then I'll explicitly add the cast. But for all purposes, it's a plain annoyance.

If you desire to be annoyed, be my guest and use strict types.

For me the whole point of weak types is so that I can easily and comfortably work with arbitrary inputs. So this RFC gets really in my way here and I'm going to vote no on this.

I could get on board with making true|false decay to bool, whenever they appear in an union type. But that's - for me - not related to bool in type juggling.

Bob

--------------UuqS69DAs9OwQTENIBXnN0pR--