|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-11-11 10:31 UTC] cmb@php.net
[2021-11-13 00:55 UTC] gib-o-master at mail dot ru
[2024-07-19 21:29 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2024-07-19 21:29 UTC] cmb@php.net
[2024-07-28 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 22:00:01 2025 UTC |
Description: ------------ if there is a `declare(strict_types=1);` string to number casting should be avoided, for example: var_dump('20' < '3');// is false Pros/Cons: + it will be faster (no if string is a number check, no casting) + it will be common (with strings, compat with other langs like JS, Python) + it will be more error prone (because it's common) - some old code which rely on this feature will break (does it exist?) Test script: --------------- var_dump('20' < '3'); Expected result: ---------------- true Actual result: -------------- false