|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-10-07 08:13 UTC] pajoye@php.net
[2009-10-07 09:59 UTC] j dot henge-ernst at interexa dot de
[2009-10-07 11:29 UTC] pajoye@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Fri Apr 03 11:00:02 2026 UTC |
Description: ------------ strnatcmp returns wrong results when one string is ending with a zero. At leat in php 5.2.9 the expected result is returned. In php 5.3.0 and 5.2.10 it is broken. Reproduce code: --------------- <?php echo strnatcmp('b0', 'b0$') . "\n"; echo strnatcmp('b1', 'b1$') . "\n"; echo strnatcmp('b0x', 'b0x$') . "\n"; echo strnatcasecmp('b0', 'B0$') . "\n"; echo strnatcasecmp('b1', 'B1$') . "\n"; echo strnatcasecmp('b0x', 'B0x$') . "\n"; Expected result: ---------------- -1 -1 -1 -1 -1 -1 Actual result: -------------- 1 -1 -1 1 -1 -1