tony2001 Fri Jul 13 17:07:33 2007 UTC Modified files: /php-src/ext/standard/tests/array array_keys_variation_003.phpt Log: add key values to the output http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_keys_variation_003.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/array/array_keys_variation_003.phpt diff -u php-src/ext/standard/tests/array/array_keys_variation_003.phpt:1.1 php-src/ext/standard/tests/array/array_keys_variation_003.phpt:1.2 --- php-src/ext/standard/tests/array/array_keys_variation_003.phpt:1.1 Fri Jul 13 16:39:54 2007 +++ php-src/ext/standard/tests/array/array_keys_variation_003.phpt Fri Jul 13 17:07:33 2007 @@ -20,13 +20,15 @@ ); $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 @@ [2]=> string(3) "php" } +bool(false) array(4) { [0]=> int(0) @@ -45,10 +48,12 @@ [3]=> string(0) "" } +int(1) array(1) { [0]=> int(1) } +int(0) array(4) { [0]=> int(0) @@ -59,22 +64,27 @@ [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 @@ [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 @@ Done --UEXPECTF-- *** Testing array_keys() on all the types other than arrays *** +bool(true) array(3) { [0]=> int(1) @@ -110,6 +125,7 @@ [2]=> unicode(3) "php" } +bool(false) array(4) { [0]=> int(0) @@ -120,10 +136,12 @@ [3]=> unicode(0) "" } +int(1) array(1) { [0]=> int(1) } +int(0) array(4) { [0]=> int(0) @@ -134,22 +152,27 @@ [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 @@ [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)
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php