[PHP-BUG] Bug #54547 [NEW]: wrong equality of string numbers
From: Operating system: linux PHP version: 5.3.6 Package: Unknown/Other Function Bug Type: Bug Bug description:wrong equality of string numbers Description: comparison of strings using == shows wrong results when both strings are numbers (digits) around PHP_MAX_INT; the same comparison using === works correctly; tested on 64 bit systems only, affects also PHP 5.3.5 Test script: --- $a = '9223372036854775807'; $b = '9223372036854775808'; if ($a == $b) { echo "$a == $b\n"; } else { echo "$a != $b\n"; } // displays 9223372036854775807 == 9223372036854775808 Expected result: should display 9223372036854775807 != 9223372036854775808 Actual result: -- displays 9223372036854775807 == 9223372036854775808 -- Edit bug report at http://bugs.php.net/bug.php?id=54547&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54547&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54547&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54547&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54547&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54547&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54547&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54547&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54547&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54547&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54547&r=support Expected behavior: http://bugs.php.net/fix.php?id=54547&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54547&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54547&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54547&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54547&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=54547&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54547&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54547&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54547&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54547&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54547&r=mysqlcfg
#50199 [Bgs]: date_parse_from_format() fails to parse ISO 8601 date
ID: 50199 User updated by: peter dot ritt at gmx dot net Reported By: peter dot ritt at gmx dot net Status: Bogus Bug Type: Date/time related Operating System: * PHP Version: 5.3, 6 New Comment: double checked docs, only found: "Format accepted by date() with some extras." no info concerning those extras; would you mind providing more details in the docs? thanks Previous Comments: [2009-11-19 13:28:11] il...@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The "c" format is not supported by the date_parse_from_format() function. [2009-11-16 23:14:15] peter dot ritt at gmx dot net Description: date_parse_from_format refuses to read '2009-11-17T00:08:24+01:00'; error: The format separator does not match Reproduce code: --- $d = date('c'); echo $d; echo "\n"; print_r(date_parse_from_format('c', $d)); Expected result: array with data as specified in function.date-parse-from-format.php Actual result: -- Array ( [year] => [month] => [day] => [hour] => [minute] => [second] => [fraction] => [warning_count] => 0 [warnings] => Array ( ) [error_count] => 2 [errors] => Array ( [0] => The format separator does not match [1] => Trailing data ) [is_localtime] => ) -- Edit this bug report at http://bugs.php.net/?id=50199&edit=1
#50199 [NEW]: date_parse_from_format won't parse ISO 8601
From: peter dot ritt at gmx dot net Operating system: linux PHP version: 5.3.0 PHP Bug Type: Date/time related Bug description: date_parse_from_format won't parse ISO 8601 Description: date_parse_from_format refuses to read '2009-11-17T00:08:24+01:00'; error: The format separator does not match Reproduce code: --- $d = date('c'); echo $d; echo "\n"; print_r(date_parse_from_format('c', $d)); Expected result: array with data as specified in function.date-parse-from-format.php Actual result: -- Array ( [year] => [month] => [day] => [hour] => [minute] => [second] => [fraction] => [warning_count] => 0 [warnings] => Array ( ) [error_count] => 2 [errors] => Array ( [0] => The format separator does not match [1] => Trailing data ) [is_localtime] => ) -- Edit bug report at http://bugs.php.net/?id=50199&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50199&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50199&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50199&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50199&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50199&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50199&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50199&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50199&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50199&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50199&r=support Expected behavior: http://bugs.php.net/fix.php?id=50199&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50199&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50199&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50199&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50199&r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=50199&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50199&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50199&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50199&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50199&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50199&r=mysqlcfg