From: Josie Messa Date: Thu, 14 Feb 2008 16:09:18 +0000 (+0000) Subject: - New variation test for array_values() X-Git-Tag: RELEASE_2_0_0a1~473 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=67a7756d86f5942dd716b6b287d9bc57cef70c97;p=php - New variation test for array_values() --- diff --git a/ext/standard/tests/array/array_values_variation7.phpt b/ext/standard/tests/array/array_values_variation7.phpt new file mode 100644 index 0000000000..2c724604ca --- /dev/null +++ b/ext/standard/tests/array/array_values_variation7.phpt @@ -0,0 +1,82 @@ +--TEST-- +Test array_values() function : usage variations - Internal order check +--FILE-- + 'three', 2 => 'two', 1 => 'one', 0 => 'zero'); + +echo "\n-- \$input argument: --\n"; +var_dump($input); + +echo "\n-- Result of array_values() --\n"; +var_dump(array_values($input)); + +echo "Done"; +?> + +--EXPECTF-- +*** Testing array_values() : usage variations *** + +-- $input argument: -- +array(4) { + [3]=> + string(5) "three" + [2]=> + string(3) "two" + [1]=> + string(3) "one" + [0]=> + string(4) "zero" +} + +-- Result of array_values() -- +array(4) { + [0]=> + string(5) "three" + [1]=> + string(3) "two" + [2]=> + string(3) "one" + [3]=> + string(4) "zero" +} +Done +--UEXPECTF-- +*** Testing array_values() : usage variations *** + +-- $input argument: -- +array(4) { + [3]=> + unicode(5) "three" + [2]=> + unicode(3) "two" + [1]=> + unicode(3) "one" + [0]=> + unicode(4) "zero" +} + +-- Result of array_values() -- +array(4) { + [0]=> + unicode(5) "three" + [1]=> + unicode(3) "two" + [2]=> + unicode(3) "one" + [3]=> + unicode(4) "zero" +} +Done \ No newline at end of file