diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-12-27 18:32:03 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-12-27 18:32:03 +0100 |
commit | 57430e6f1eb58e71c64fd9f66bd13a916bdb8b23 (patch) | |
tree | 790aa3759052b82d20d480a751ab12784f747620 | |
parent | 269936e68036b9cce050586a4725f5d9b10ee0c6 (diff) | |
parent | 0db6f5267cc819b230bac6c4df87779347a70978 (diff) | |
download | php-git-57430e6f1eb58e71c64fd9f66bd13a916bdb8b23.tar.gz |
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Replace sort() function calls with ksort() in basic ksort test
-rw-r--r-- | ext/standard/tests/array/ksort_basic.phpt | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/ext/standard/tests/array/ksort_basic.phpt b/ext/standard/tests/array/ksort_basic.phpt index 2e515a0c7d..96135981f3 100644 --- a/ext/standard/tests/array/ksort_basic.phpt +++ b/ext/standard/tests/array/ksort_basic.phpt @@ -48,17 +48,17 @@ var_dump( $temp_array); echo "\n-- Testing ksort() by supplying string array (case insensitive), 'flag' = SORT_STRING|SORT_FLAG_CASE --\n"; $temp_array = $unsorted_strings; -var_dump( sort($temp_array, SORT_STRING|SORT_FLAG_CASE) ); // expecting : bool(true) +var_dump( ksort($temp_array, SORT_STRING|SORT_FLAG_CASE) ); // expecting : bool(true) var_dump( $temp_array); echo "\n-- Testing ksort() by supplying string array (natural), 'flag' = SORT_NATURAL --\n"; $temp_array = $unsorted_strings; -var_dump( sort($temp_array, SORT_NATURAL) ); // expecting : bool(true) +var_dump( ksort($temp_array, SORT_NATURAL) ); // expecting : bool(true) var_dump( $temp_array); echo "\n-- Testing ksort() by supplying string array (natural, case insensitive), 'flag' = SORT_NATURAL|SORT_FLAG_CASE --\n"; $temp_array = $unsorted_strings; -var_dump( sort($temp_array, SORT_NATURAL|SORT_FLAG_CASE) ); // expecting : bool(true) +var_dump( ksort($temp_array, SORT_NATURAL|SORT_FLAG_CASE) ); // expecting : bool(true) var_dump( $temp_array); echo "\n-- Testing ksort() by supplying numeric array, 'flag' = SORT_NUMERIC --\n"; @@ -163,63 +163,63 @@ array(8) { -- Testing ksort() by supplying string array (case insensitive), 'flag' = SORT_STRING|SORT_FLAG_CASE -- bool(true) array(8) { - [0]=> + ["b"]=> string(6) "banana" - [1]=> + ["l"]=> string(5) "lemon" - [2]=> + ["o"]=> string(6) "orange" - [3]=> + ["O"]=> string(6) "Orange" - [4]=> + ["O1"]=> string(7) "Orange1" - [5]=> + ["o2"]=> string(7) "orange2" - [6]=> + ["o20"]=> string(8) "orange20" - [7]=> + ["O3"]=> string(7) "Orange3" } -- Testing ksort() by supplying string array (natural), 'flag' = SORT_NATURAL -- bool(true) array(8) { - [0]=> + ["O"]=> string(6) "Orange" - [1]=> + ["O1"]=> string(7) "Orange1" - [2]=> + ["O3"]=> string(7) "Orange3" - [3]=> + ["b"]=> string(6) "banana" - [4]=> + ["l"]=> string(5) "lemon" - [5]=> + ["o"]=> string(6) "orange" - [6]=> + ["o2"]=> string(7) "orange2" - [7]=> + ["o20"]=> string(8) "orange20" } -- Testing ksort() by supplying string array (natural, case insensitive), 'flag' = SORT_NATURAL|SORT_FLAG_CASE -- bool(true) array(8) { - [0]=> + ["b"]=> string(6) "banana" - [1]=> + ["l"]=> string(5) "lemon" - [2]=> + ["o"]=> string(6) "orange" - [3]=> + ["O"]=> string(6) "Orange" - [4]=> + ["O1"]=> string(7) "Orange1" - [5]=> + ["o2"]=> string(7) "orange2" - [6]=> + ["O3"]=> string(7) "Orange3" - [7]=> + ["o20"]=> string(8) "orange20" } |