|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-02-09 10:27 UTC] zak@php.net
[2001-02-09 10:59 UTC] tom dot anheyer at berlinonline dot de
[2001-02-09 11:10 UTC] zak@php.net
[2001-02-15 04:31 UTC] zeev@php.net
[2001-02-15 04:32 UTC] zeev@php.net
[2001-02-15 05:07 UTC] tom dot anheyer at berlinonline dot de
[2001-02-15 05:25 UTC] hholzgra@php.net
[2001-02-15 05:38 UTC] tom dot anheyer at berlinonline dot de
[2001-06-27 00:43 UTC] danbeck@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
First the test script: <? $a = '012345678901234567'; $b = '012345678901234568'; echo ($a == $b) ? "a equal b\n" : "a not equal b\n"; echo ($a === $b) ? "a equal b\n" : "a not equal b\n"; printf ("as string: a=%s b=%s\n", $a, $b); printf ("as float: a=%.0f b=%.0f\n", $a, $b); printf ("as int: a=%d b=%d\n", $a, $b); ?> and its output: a equal b a not equal b as string: a=012345678901234567 b=012345678901234568 as float: a=12345678901234567 b=12345678901234567 as int: a=2147483647 b=2147483647 Zend trys to convert the arguments to numbers if both arguments are strings. This is not good and its not a feature.