Annotation of embedaddon/php/ext/standard/tests/array/bug44929.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #44929 (natsort doesn't handle leading zeros well)
! 3: --FILE--
! 4: <?php
! 5: $a = array(b'001',b'008',b'005',b'00011',b'03',b'000014',b'-123',b'0.002',b'00',b'0',b'0_0',b'0-0');
! 6: natsort($a);
! 7: var_dump($a);
! 8: ?>
! 9: --EXPECT--
! 10: array(12) {
! 11: [6]=>
! 12: string(4) "-123"
! 13: [8]=>
! 14: string(2) "00"
! 15: [9]=>
! 16: string(1) "0"
! 17: [11]=>
! 18: string(3) "0-0"
! 19: [7]=>
! 20: string(5) "0.002"
! 21: [10]=>
! 22: string(3) "0_0"
! 23: [0]=>
! 24: string(3) "001"
! 25: [4]=>
! 26: string(2) "03"
! 27: [2]=>
! 28: string(3) "005"
! 29: [1]=>
! 30: string(3) "008"
! 31: [3]=>
! 32: string(5) "00011"
! 33: [5]=>
! 34: string(6) "000014"
! 35: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>