From: Antony Dovgal Date: Fri, 13 Jul 2007 17:07:33 +0000 (+0000) Subject: add key values to the output X-Git-Tag: BEFORE_IMPORT_OF_MYSQLND~123 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6e5c6bbd260c709fd1346a98e971bd564a0543de;p=php add key values to the output --- diff --git a/ext/standard/tests/array/array_keys_variation_003.phpt b/ext/standard/tests/array/array_keys_variation_003.phpt index c0f219b058..ccf4350638 100644 --- a/ext/standard/tests/array/array_keys_variation_003.phpt +++ b/ext/standard/tests/array/array_keys_variation_003.phpt @@ -20,13 +20,15 @@ $types_arr = array( ); $values = array(TRUE, FALSE, 1, 0, -1, "1", "0", "-1", NULL, array(), "php", ""); foreach ($values as $value){ - var_dump(array_keys($types_arr, $value)); + var_dump($value); + var_dump(array_keys($types_arr, $value)); } echo "Done\n"; ?> --EXPECTF-- *** Testing array_keys() on all the types other than arrays *** +bool(true) array(3) { [0]=> int(1) @@ -35,6 +37,7 @@ array(3) { [2]=> string(3) "php" } +bool(false) array(4) { [0]=> int(0) @@ -45,10 +48,12 @@ array(4) { [3]=> string(0) "" } +int(1) array(1) { [0]=> int(1) } +int(0) array(4) { [0]=> int(0) @@ -59,22 +64,27 @@ array(4) { [3]=> string(0) "" } +int(-1) array(1) { [0]=> int(-1) } +string(1) "1" array(1) { [0]=> int(1) } +string(1) "0" array(1) { [0]=> int(0) } +string(2) "-1" array(1) { [0]=> int(-1) } +NULL array(3) { [0]=> int(2) @@ -83,16 +93,20 @@ array(3) { [2]=> string(0) "" } +array(0) { +} array(2) { [0]=> int(2) [1]=> int(3) } +string(3) "php" array(1) { [0]=> string(3) "php" } +string(0) "" array(2) { [0]=> int(2) @@ -102,6 +116,7 @@ array(2) { Done --UEXPECTF-- *** Testing array_keys() on all the types other than arrays *** +bool(true) array(3) { [0]=> int(1) @@ -110,6 +125,7 @@ array(3) { [2]=> unicode(3) "php" } +bool(false) array(4) { [0]=> int(0) @@ -120,10 +136,12 @@ array(4) { [3]=> unicode(0) "" } +int(1) array(1) { [0]=> int(1) } +int(0) array(4) { [0]=> int(0) @@ -134,22 +152,27 @@ array(4) { [3]=> unicode(0) "" } +int(-1) array(1) { [0]=> int(-1) } +unicode(1) "1" array(1) { [0]=> int(1) } +unicode(1) "0" array(1) { [0]=> int(0) } +unicode(2) "-1" array(1) { [0]=> int(-1) } +NULL array(3) { [0]=> int(2) @@ -158,16 +181,20 @@ array(3) { [2]=> unicode(0) "" } +array(0) { +} array(2) { [0]=> int(2) [1]=> int(3) } +unicode(3) "php" array(1) { [0]=> unicode(3) "php" } +unicode(0) "" array(2) { [0]=> int(2)