From b12ed7908db8aa188a0d4de6fa8c9667085f6b20 Mon Sep 17 00:00:00 2001 From: Josie Messa Date: Wed, 13 Feb 2008 13:12:06 +0000 Subject: [PATCH] - committig tests for array_key_exists() function --- .../tests/array/array_key_exists_basic.phpt | 34 + .../tests/array/array_key_exists_error.phpt | 57 + .../tests/array/array_key_exists_object1.phpt | 111 ++ .../tests/array/array_key_exists_object2.phpt | 117 +++ .../array/array_key_exists_variation1.phpt | 305 ++++++ .../array/array_key_exists_variation2.phpt | 349 +++++++ .../array/array_key_exists_variation3.phpt | 87 ++ .../array/array_key_exists_variation4.phpt | 66 ++ .../array/array_key_exists_variation5.phpt | 48 + .../array/array_key_exists_variation6.phpt | 147 +++ .../array/array_key_exists_variation7.phpt | 45 + .../array/array_key_exists_variation8.phpt | 982 ++++++++++++++++++ 12 files changed, 2348 insertions(+) create mode 100644 ext/standard/tests/array/array_key_exists_basic.phpt create mode 100644 ext/standard/tests/array/array_key_exists_error.phpt create mode 100644 ext/standard/tests/array/array_key_exists_object1.phpt create mode 100644 ext/standard/tests/array/array_key_exists_object2.phpt create mode 100644 ext/standard/tests/array/array_key_exists_variation1.phpt create mode 100644 ext/standard/tests/array/array_key_exists_variation2.phpt create mode 100644 ext/standard/tests/array/array_key_exists_variation3.phpt create mode 100644 ext/standard/tests/array/array_key_exists_variation4.phpt create mode 100644 ext/standard/tests/array/array_key_exists_variation5.phpt create mode 100644 ext/standard/tests/array/array_key_exists_variation6.phpt create mode 100644 ext/standard/tests/array/array_key_exists_variation7.phpt create mode 100644 ext/standard/tests/array/array_key_exists_variation8.phpt diff --git a/ext/standard/tests/array/array_key_exists_basic.phpt b/ext/standard/tests/array/array_key_exists_basic.phpt new file mode 100644 index 0000000000..1fbfb5005d --- /dev/null +++ b/ext/standard/tests/array/array_key_exists_basic.phpt @@ -0,0 +1,34 @@ +--TEST-- +Test array_key_exists() function : basic functionality +--FILE-- + 'value', 'val'); +var_dump(array_key_exists($key1, $search)); +var_dump(array_key_exists($key2, $search)); + +echo "Done"; +?> +--EXPECTF-- +*** Testing array_key_exists() : basic functionality *** +bool(true) +bool(false) +Done +--UEXPECTF-- +*** Testing array_key_exists() : basic functionality *** +bool(true) +bool(false) +Done \ No newline at end of file diff --git a/ext/standard/tests/array/array_key_exists_error.phpt b/ext/standard/tests/array/array_key_exists_error.phpt new file mode 100644 index 0000000000..2cfe62a3db --- /dev/null +++ b/ext/standard/tests/array/array_key_exists_error.phpt @@ -0,0 +1,57 @@ +--TEST-- +Test array_key_exists() function : error conditions - Pass incorrect number of args +--FILE-- + + +--EXPECTF-- +*** Testing array_key_exists() : error conditions *** + +-- Testing array_key_exists() function with more than expected no. of arguments -- + +Warning: array_key_exists() expects exactly 2 parameters, 3 given in %s on line %d +NULL + +-- Testing array_key_exists() function with less than expected no. of arguments -- + +Warning: array_key_exists() expects exactly 2 parameters, 1 given in %s on line %d +NULL +Done +--UEXPECTF-- +*** Testing array_key_exists() : error conditions *** + +-- Testing array_key_exists() function with more than expected no. of arguments -- + +Warning: array_key_exists() expects exactly 2 parameters, 3 given in %s on line %d +NULL + +-- Testing array_key_exists() function with less than expected no. of arguments -- + +Warning: array_key_exists() expects exactly 2 parameters, 1 given in %s on line %d +NULL +Done \ No newline at end of file diff --git a/ext/standard/tests/array/array_key_exists_object1.phpt b/ext/standard/tests/array/array_key_exists_object1.phpt new file mode 100644 index 0000000000..f4bfe5a39e --- /dev/null +++ b/ext/standard/tests/array/array_key_exists_object1.phpt @@ -0,0 +1,111 @@ +--TEST-- +Test array_key_exists() function : object functionality +--FILE-- +var1 = $a; + $this->var2 = $b; + if (!is_null($c)) { + $this->var3 = $c; + } + } +} + +echo "\n-- Do not assign a value to \$class1->var3 --\n"; +$class1 = new myClass ('a', 'b'); +echo "\$key = var1:\n"; +var_dump(array_key_exists('var1', $class1)); +echo "\$key = var3:\n"; +var_dump(array_key_exists('var3', $class1)); +echo "\$class1:\n"; +var_dump($class1); + +echo "\n-- Assign a value to \$class2->var3 --\n"; +$class2 = new myClass('x', 'y', 'z'); +echo "\$key = var3:\n"; +var_dump(array_key_exists('var3', $class2)); +echo "\$class2:\n"; +var_dump($class2); + +echo "Done"; +?> + +--EXPECTF-- +*** Testing array_key_exists() : object functionality *** + +-- Do not assign a value to $class1->var3 -- +$key = var1: +bool(true) +$key = var3: +bool(true) +$class1: +object(myClass)#%d (3) { + ["var1"]=> + string(1) "a" + ["var2"]=> + string(1) "b" + ["var3"]=> + NULL +} + +-- Assign a value to $class2->var3 -- +$key = var3: +bool(true) +$class2: +object(myClass)#%d (3) { + ["var1"]=> + string(1) "x" + ["var2"]=> + string(1) "y" + ["var3"]=> + string(1) "z" +} +Done +--UEXPECTF-- +*** Testing array_key_exists() : object functionality *** + +-- Do not assign a value to $class1->var3 -- +$key = var1: +bool(true) +$key = var3: +bool(true) +$class1: +object(myClass)#%d (3) { + [u"var1"]=> + unicode(1) "a" + [u"var2"]=> + unicode(1) "b" + [u"var3"]=> + NULL +} + +-- Assign a value to $class2->var3 -- +$key = var3: +bool(true) +$class2: +object(myClass)#%d (3) { + [u"var1"]=> + unicode(1) "x" + [u"var2"]=> + unicode(1) "y" + [u"var3"]=> + unicode(1) "z" +} +Done \ No newline at end of file diff --git a/ext/standard/tests/array/array_key_exists_object2.phpt b/ext/standard/tests/array/array_key_exists_object2.phpt new file mode 100644 index 0000000000..c00eb921ad --- /dev/null +++ b/ext/standard/tests/array/array_key_exists_object2.phpt @@ -0,0 +1,117 @@ +--TEST-- +Test array_key_exists() function : object functionality - different visibilities +--FILE-- +var1 = $a; + $this->var2 = $b; + if (!is_null($c)) { + $this->var3 = $c; + } + } +} + +echo "\n-- Do not assign a value to \$class1->var3 --\n"; +$class1 = new myClass ('a', 'b'); +echo "\$key = var1:\n"; +var_dump(array_key_exists('var1', $class1)); +echo "\$key = var2:\n"; +var_dump(array_key_exists('var2', $class1)); +echo "\$key = var3:\n"; +var_dump(array_key_exists('var3', $class1)); +echo "\$class1:\n"; +var_dump($class1); + +echo "\n-- Assign a value to \$class2->var3 --\n"; +$class2 = new myClass('x', 'y', 'z'); +echo "\$key = var3:\n"; +var_dump(array_key_exists('var3', $class2)); +echo "\$class2:\n"; +var_dump($class2); + +echo "Done"; +?> + +--EXPECTF-- +*** Testing array_key_exists() : object functionality *** + +-- Do not assign a value to $class1->var3 -- +$key = var1: +bool(true) +$key = var2: +bool(false) +$key = var3: +bool(false) +$class1: +object(myClass)#%d (3) { + ["var1"]=> + string(1) "a" + ["var2":protected]=> + string(1) "b" + ["var3":"myClass":private]=> + NULL +} + +-- Assign a value to $class2->var3 -- +$key = var3: +bool(false) +$class2: +object(myClass)#%d (3) { + ["var1"]=> + string(1) "x" + ["var2":protected]=> + string(1) "y" + ["var3":"myClass":private]=> + string(1) "z" +} +Done +--UEXPECTF-- +*** Testing array_key_exists() : object functionality *** + +-- Do not assign a value to $class1->var3 -- +$key = var1: +bool(true) +$key = var2: +bool(false) +$key = var3: +bool(false) +$class1: +object(myClass)#1 (3) { + [u"var1"]=> + unicode(1) "a" + [u"var2":protected]=> + unicode(1) "b" + [u"var3":u"myClass":private]=> + NULL +} + +-- Assign a value to $class2->var3 -- +$key = var3: +bool(false) +$class2: +object(myClass)#2 (3) { + [u"var1"]=> + unicode(1) "x" + [u"var2":protected]=> + unicode(1) "y" + [u"var3":u"myClass":private]=> + unicode(1) "z" +} +Done \ No newline at end of file diff --git a/ext/standard/tests/array/array_key_exists_variation1.phpt b/ext/standard/tests/array/array_key_exists_variation1.phpt new file mode 100644 index 0000000000..3fca68468c --- /dev/null +++ b/ext/standard/tests/array/array_key_exists_variation1.phpt @@ -0,0 +1,305 @@ +--TEST-- +Test array_key_exists() function : usage variations - Pass different data types as $key arg +--FILE-- + 'val', 'two'); + +//get an unset variable +$unset_var = 10; +unset ($unset_var); + +// get a class +class classA +{ + public function __toString() { + return "key"; + } +} + +// heredoc string +$heredoc = << + +--EXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Iteration 1 -- +bool(true) + +-- Iteration 2 -- +bool(true) + +-- Iteration 3 -- +bool(false) + +-- Iteration 4 -- +bool(false) + +-- Iteration 5 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 6 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 7 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 8 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 9 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 13 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 14 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 15 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) +Done +--UEXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Iteration 1 -- +bool(true) + +-- Iteration 2 -- +bool(true) + +-- Iteration 3 -- +bool(false) + +-- Iteration 4 -- +bool(false) + +-- Iteration 5 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 6 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 7 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 8 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 9 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 10 -- +bool(false) + +-- Iteration 11 -- +bool(false) + +-- Iteration 12 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 13 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 14 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 15 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 16 -- +bool(false) + +-- Iteration 17 -- +bool(false) + +-- Iteration 18 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 19 -- +bool(true) + +-- Iteration 20 -- +bool(true) + +-- Iteration 21 -- +bool(true) + +-- Iteration 22 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) + +-- Iteration 23 -- +bool(false) + +-- Iteration 24 -- +bool(false) + +-- Iteration 25 -- + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) +Done \ No newline at end of file diff --git a/ext/standard/tests/array/array_key_exists_variation2.phpt b/ext/standard/tests/array/array_key_exists_variation2.phpt new file mode 100644 index 0000000000..c01a03351e --- /dev/null +++ b/ext/standard/tests/array/array_key_exists_variation2.phpt @@ -0,0 +1,349 @@ +--TEST-- +Test array_key_exists() function : usage variations - Pass differnt data types to $search arg +--FILE-- + + +--EXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Iteration 1 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 2 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 3 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 4 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 5 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 6 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 7 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 8 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 9 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 10 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 11 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 12 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 13 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 14 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 15 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 16 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 17 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 20 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 21 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 24 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 25 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) +Done +--UEXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Iteration 1 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 2 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 3 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 4 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 5 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 6 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 7 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 8 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 9 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 10 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 11 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 12 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 13 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 14 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 15 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 16 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 17 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 18 -- +bool(false) + +-- Iteration 19 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 20 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 21 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 22 -- +bool(false) + +-- Iteration 23 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 24 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) + +-- Iteration 25 -- + +Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d +bool(false) +Done \ No newline at end of file diff --git a/ext/standard/tests/array/array_key_exists_variation3.phpt b/ext/standard/tests/array/array_key_exists_variation3.phpt new file mode 100644 index 0000000000..c2c60352dd --- /dev/null +++ b/ext/standard/tests/array/array_key_exists_variation3.phpt @@ -0,0 +1,87 @@ +--TEST-- +Test array_key_exists() function : usage variations - floats and casting to ints +--FILE-- + + +--EXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Iteration 1 -- +Pass float as $key: + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) +Cast float to int: +bool(true) + +-- Iteration 1 -- +Pass float as $key: + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) +Cast float to int: +bool(true) + +-- Iteration 1 -- +Pass float as $key: + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) +Cast float to int: +bool(true) +Done +--UEXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Iteration 1 -- +Pass float as $key: + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) +Cast float to int: +bool(true) + +-- Iteration 1 -- +Pass float as $key: + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) +Cast float to int: +bool(true) + +-- Iteration 1 -- +Pass float as $key: + +Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d +bool(false) +Cast float to int: +bool(true) +Done \ No newline at end of file diff --git a/ext/standard/tests/array/array_key_exists_variation4.phpt b/ext/standard/tests/array/array_key_exists_variation4.phpt new file mode 100644 index 0000000000..735e588d6d --- /dev/null +++ b/ext/standard/tests/array/array_key_exists_variation4.phpt @@ -0,0 +1,66 @@ +--TEST-- +Test array_key_exists() function : usage variations - referenced variables +--FILE-- + 1, 'two' => 2, 'three' => 3); + +echo "\n-- \$search is a reference to \$array --\n"; +$search = &$array; +var_dump(array_key_exists('one', $search)); + +echo "\n-- \$key is a referenced variable --\n"; +$key = 'two'; +var_dump(array_key_exists(&$key, $array)); + +echo "\n-- Both arguments are referenced variables --\n"; +var_dump(array_key_exists(&$key, &$array)); + +echo "Done"; +?> + +--EXPECTF-- +Strict Standards: Call-time pass-by-reference has been deprecated in %s on line %d + +Strict Standards: Call-time pass-by-reference has been deprecated in %s on line %d + +Strict Standards: Call-time pass-by-reference has been deprecated in %s on line %d +*** Testing array_key_exists() : usage variations *** + +-- $search is a reference to $array -- +bool(true) + +-- $key is a referenced variable -- +bool(true) + +-- Both arguments are referenced variables -- +bool(true) +Done +--UEXPECTF-- +Strict Standards: Call-time pass-by-reference has been deprecated in %s on line %d + +Strict Standards: Call-time pass-by-reference has been deprecated in %s on line %d + +Strict Standards: Call-time pass-by-reference has been deprecated in %s on line %d +*** Testing array_key_exists() : usage variations *** + +-- $search is a reference to $array -- +bool(true) + +-- $key is a referenced variable -- +bool(true) + +-- Both arguments are referenced variables -- +bool(true) +Done \ No newline at end of file diff --git a/ext/standard/tests/array/array_key_exists_variation5.phpt b/ext/standard/tests/array/array_key_exists_variation5.phpt new file mode 100644 index 0000000000..9e7ba631de --- /dev/null +++ b/ext/standard/tests/array/array_key_exists_variation5.phpt @@ -0,0 +1,48 @@ +--TEST-- +Test array_key_exists() function : usage variations - multidimensional arrays +--FILE-- + 'val1', + 'one' => 'val2', + 'sub1' => array (1, 2, 3)); + +echo "\n-- Attempt to match key in sub-array --\n"; +// this key is in the sub-array +var_dump(array_key_exists(0, $multi_array)); + +echo "\n-- \$search arg points to sub-array --\n"; +var_dump(array_key_exists(0, $multi_array['sub1'])); + +echo "Done"; +?> + +--EXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Attempt to match key in sub-array -- +bool(false) + +-- $search arg points to sub-array -- +bool(true) +Done +--UEXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Attempt to match key in sub-array -- +bool(false) + +-- $search arg points to sub-array -- +bool(true) +Done \ No newline at end of file diff --git a/ext/standard/tests/array/array_key_exists_variation6.phpt b/ext/standard/tests/array/array_key_exists_variation6.phpt new file mode 100644 index 0000000000..6274fb2b1f --- /dev/null +++ b/ext/standard/tests/array/array_key_exists_variation6.phpt @@ -0,0 +1,147 @@ +--TEST-- +Test array_key_exists() function : usage variations - equality test for certain data types +--FILE-- + null, + 'NULL' => NULL, + 'empty single quoted string' => '', + "empty double quoted string" => "", + 'undefined variable' => @$undefined, + 'unset variable' => @$unset); + +//iterate through original array +foreach($array as $name => $input) { + $iterator = 1; + echo "\n-- Key in \$search array is : $name --\n"; + $search[$input] = 'test'; + + //iterate through array again to see which values are considered equal + foreach($array as $key) { + echo "Iteration $iterator: "; + var_dump(array_key_exists($key, $search)); + $iterator++; + } + $search = null; +} + +echo "Done"; +?> + +--EXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Key in $search array is : null -- +Iteration 1: bool(true) +Iteration 2: bool(true) +Iteration 3: bool(true) +Iteration 4: bool(true) +Iteration 5: bool(true) +Iteration 6: bool(true) + +-- Key in $search array is : NULL -- +Iteration 1: bool(true) +Iteration 2: bool(true) +Iteration 3: bool(true) +Iteration 4: bool(true) +Iteration 5: bool(true) +Iteration 6: bool(true) + +-- Key in $search array is : empty single quoted string -- +Iteration 1: bool(true) +Iteration 2: bool(true) +Iteration 3: bool(true) +Iteration 4: bool(true) +Iteration 5: bool(true) +Iteration 6: bool(true) + +-- Key in $search array is : empty double quoted string -- +Iteration 1: bool(true) +Iteration 2: bool(true) +Iteration 3: bool(true) +Iteration 4: bool(true) +Iteration 5: bool(true) +Iteration 6: bool(true) + +-- Key in $search array is : undefined variable -- +Iteration 1: bool(true) +Iteration 2: bool(true) +Iteration 3: bool(true) +Iteration 4: bool(true) +Iteration 5: bool(true) +Iteration 6: bool(true) + +-- Key in $search array is : unset variable -- +Iteration 1: bool(true) +Iteration 2: bool(true) +Iteration 3: bool(true) +Iteration 4: bool(true) +Iteration 5: bool(true) +Iteration 6: bool(true) +Done +--UEXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Key in $search array is : null -- +Iteration 1: bool(true) +Iteration 2: bool(true) +Iteration 3: bool(true) +Iteration 4: bool(true) +Iteration 5: bool(true) +Iteration 6: bool(true) + +-- Key in $search array is : NULL -- +Iteration 1: bool(true) +Iteration 2: bool(true) +Iteration 3: bool(true) +Iteration 4: bool(true) +Iteration 5: bool(true) +Iteration 6: bool(true) + +-- Key in $search array is : empty single quoted string -- +Iteration 1: bool(true) +Iteration 2: bool(true) +Iteration 3: bool(true) +Iteration 4: bool(true) +Iteration 5: bool(true) +Iteration 6: bool(true) + +-- Key in $search array is : empty double quoted string -- +Iteration 1: bool(true) +Iteration 2: bool(true) +Iteration 3: bool(true) +Iteration 4: bool(true) +Iteration 5: bool(true) +Iteration 6: bool(true) + +-- Key in $search array is : undefined variable -- +Iteration 1: bool(true) +Iteration 2: bool(true) +Iteration 3: bool(true) +Iteration 4: bool(true) +Iteration 5: bool(true) +Iteration 6: bool(true) + +-- Key in $search array is : unset variable -- +Iteration 1: bool(true) +Iteration 2: bool(true) +Iteration 3: bool(true) +Iteration 4: bool(true) +Iteration 5: bool(true) +Iteration 6: bool(true) +Done \ No newline at end of file diff --git a/ext/standard/tests/array/array_key_exists_variation7.phpt b/ext/standard/tests/array/array_key_exists_variation7.phpt new file mode 100644 index 0000000000..53fd18d7c8 --- /dev/null +++ b/ext/standard/tests/array/array_key_exists_variation7.phpt @@ -0,0 +1,45 @@ +--TEST-- +Test array_key_exists() function : usage variations - position of internal array pointer +--FILE-- + 'un', 'two' => 'deux', 'three' => 'trois'); + +echo "\n-- Call array_key_exists() --\n"; +var_dump($result = array_key_exists('one', $input)); + +echo "\n-- Position of Internal Pointer in Original Array: --\n"; +echo key($input) . " => " . current ($input) . "\n"; + +echo "Done"; +?> + +--EXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Call array_key_exists() -- +bool(true) + +-- Position of Internal Pointer in Original Array: -- +one => un +Done +--UEXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Call array_key_exists() -- +bool(true) + +-- Position of Internal Pointer in Original Array: -- +one => un +Done \ No newline at end of file diff --git a/ext/standard/tests/array/array_key_exists_variation8.phpt b/ext/standard/tests/array/array_key_exists_variation8.phpt new file mode 100644 index 0000000000..a3cc5db9f6 --- /dev/null +++ b/ext/standard/tests/array/array_key_exists_variation8.phpt @@ -0,0 +1,982 @@ +--TEST-- +Test array_key_exists() function : usage variations - array keys are different data types +--FILE-- + array( + 0 => 'zero', + 1 => 'one', + 12345 => 'positive', + -2345 => 'negative', + ), + + // float data +/*2*/ 'float' => array( + 10.5 => 'positive', + -10.5 => 'negative', + .5 => 'half', + ), + + 'extreme floats' => array( + 12.3456789000e10 => 'large', + 12.3456789000E-10 => 'small', + ), + + // null data +/*3*/ 'null uppercase' => array( + NULL => 'null 1', + ), + 'null lowercase' => array( + null => 'null 2', + ), + + // boolean data +/*4*/ 'bool lowercase' => array( + true => 'lowert', + false => 'lowerf', + ), + 'bool uppercase' => array( + TRUE => 'uppert', + FALSE => 'upperf', + ), + + // empty data +/*5*/ 'empty double quotes' => array( + "" => 'emptyd', + ), + 'empty single quotes' => array( + '' => 'emptys', + ), + + // string data +/*6*/ 'string' => array( + "stringd" => 'stringd', + 'strings' => 'strings', + $heredoc => 'stringh', + ), + + // undefined data +/*8*/ 'undefined' => array( + @$undefined_var => 'undefined', + ), + + // unset data +/*9*/ 'unset' => array( + @$unset_var => 'unset', + ), +); + +// loop through each element of $inputs to check the behavior of array_key_exists() +$iterator = 1; +foreach($inputs as $type => $input) { + echo "\n-- Iteration $iterator: $type data --\n"; + + //iterate over again to get all different key values + foreach ($inputs as $new_type => $new_input) { + echo "-- \$key arguments are $new_type data:\n"; + foreach ($new_input as $key => $search) { + var_dump(array_key_exists($key, $input)); + } + } + $iterator++; +}; + +echo "Done"; +?> + +--EXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Iteration 1: int data -- +-- $key arguments are int data: +bool(true) +bool(true) +bool(true) +bool(true) +-- $key arguments are float data: +bool(false) +bool(false) +bool(true) +-- $key arguments are extreme floats data: +bool(false) +bool(true) +-- $key arguments are null uppercase data: +bool(false) +-- $key arguments are null lowercase data: +bool(false) +-- $key arguments are bool lowercase data: +bool(true) +bool(true) +-- $key arguments are bool uppercase data: +bool(true) +bool(true) +-- $key arguments are empty double quotes data: +bool(false) +-- $key arguments are empty single quotes data: +bool(false) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(false) +-- $key arguments are unset data: +bool(false) + +-- Iteration 2: float data -- +-- $key arguments are int data: +bool(true) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(true) +bool(true) +bool(true) +-- $key arguments are extreme floats data: +bool(false) +bool(true) +-- $key arguments are null uppercase data: +bool(false) +-- $key arguments are null lowercase data: +bool(false) +-- $key arguments are bool lowercase data: +bool(false) +bool(true) +-- $key arguments are bool uppercase data: +bool(false) +bool(true) +-- $key arguments are empty double quotes data: +bool(false) +-- $key arguments are empty single quotes data: +bool(false) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(false) +-- $key arguments are unset data: +bool(false) + +-- Iteration 3: extreme floats data -- +-- $key arguments are int data: +bool(true) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(true) +-- $key arguments are extreme floats data: +bool(true) +bool(true) +-- $key arguments are null uppercase data: +bool(false) +-- $key arguments are null lowercase data: +bool(false) +-- $key arguments are bool lowercase data: +bool(false) +bool(true) +-- $key arguments are bool uppercase data: +bool(false) +bool(true) +-- $key arguments are empty double quotes data: +bool(false) +-- $key arguments are empty single quotes data: +bool(false) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(false) +-- $key arguments are unset data: +bool(false) + +-- Iteration 4: null uppercase data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(true) +-- $key arguments are null lowercase data: +bool(true) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(true) +-- $key arguments are empty single quotes data: +bool(true) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(true) +-- $key arguments are unset data: +bool(true) + +-- Iteration 5: null lowercase data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(true) +-- $key arguments are null lowercase data: +bool(true) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(true) +-- $key arguments are empty single quotes data: +bool(true) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(true) +-- $key arguments are unset data: +bool(true) + +-- Iteration 6: bool lowercase data -- +-- $key arguments are int data: +bool(true) +bool(true) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(true) +-- $key arguments are extreme floats data: +bool(false) +bool(true) +-- $key arguments are null uppercase data: +bool(false) +-- $key arguments are null lowercase data: +bool(false) +-- $key arguments are bool lowercase data: +bool(true) +bool(true) +-- $key arguments are bool uppercase data: +bool(true) +bool(true) +-- $key arguments are empty double quotes data: +bool(false) +-- $key arguments are empty single quotes data: +bool(false) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(false) +-- $key arguments are unset data: +bool(false) + +-- Iteration 7: bool uppercase data -- +-- $key arguments are int data: +bool(true) +bool(true) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(true) +-- $key arguments are extreme floats data: +bool(false) +bool(true) +-- $key arguments are null uppercase data: +bool(false) +-- $key arguments are null lowercase data: +bool(false) +-- $key arguments are bool lowercase data: +bool(true) +bool(true) +-- $key arguments are bool uppercase data: +bool(true) +bool(true) +-- $key arguments are empty double quotes data: +bool(false) +-- $key arguments are empty single quotes data: +bool(false) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(false) +-- $key arguments are unset data: +bool(false) + +-- Iteration 8: empty double quotes data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(true) +-- $key arguments are null lowercase data: +bool(true) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(true) +-- $key arguments are empty single quotes data: +bool(true) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(true) +-- $key arguments are unset data: +bool(true) + +-- Iteration 9: empty single quotes data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(true) +-- $key arguments are null lowercase data: +bool(true) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(true) +-- $key arguments are empty single quotes data: +bool(true) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(true) +-- $key arguments are unset data: +bool(true) + +-- Iteration 10: string data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(false) +-- $key arguments are null lowercase data: +bool(false) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(false) +-- $key arguments are empty single quotes data: +bool(false) +-- $key arguments are string data: +bool(true) +bool(true) +bool(true) +-- $key arguments are undefined data: +bool(false) +-- $key arguments are unset data: +bool(false) + +-- Iteration 11: undefined data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(true) +-- $key arguments are null lowercase data: +bool(true) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(true) +-- $key arguments are empty single quotes data: +bool(true) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(true) +-- $key arguments are unset data: +bool(true) + +-- Iteration 12: unset data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(true) +-- $key arguments are null lowercase data: +bool(true) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(true) +-- $key arguments are empty single quotes data: +bool(true) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(true) +-- $key arguments are unset data: +bool(true) +Done +--UEXPECTF-- +*** Testing array_key_exists() : usage variations *** + +-- Iteration 1: int data -- +-- $key arguments are int data: +bool(true) +bool(true) +bool(true) +bool(true) +-- $key arguments are float data: +bool(false) +bool(false) +bool(true) +-- $key arguments are extreme floats data: +bool(false) +bool(true) +-- $key arguments are null uppercase data: +bool(false) +-- $key arguments are null lowercase data: +bool(false) +-- $key arguments are bool lowercase data: +bool(true) +bool(true) +-- $key arguments are bool uppercase data: +bool(true) +bool(true) +-- $key arguments are empty double quotes data: +bool(false) +-- $key arguments are empty single quotes data: +bool(false) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(false) +-- $key arguments are unset data: +bool(false) + +-- Iteration 2: float data -- +-- $key arguments are int data: +bool(true) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(true) +bool(true) +bool(true) +-- $key arguments are extreme floats data: +bool(false) +bool(true) +-- $key arguments are null uppercase data: +bool(false) +-- $key arguments are null lowercase data: +bool(false) +-- $key arguments are bool lowercase data: +bool(false) +bool(true) +-- $key arguments are bool uppercase data: +bool(false) +bool(true) +-- $key arguments are empty double quotes data: +bool(false) +-- $key arguments are empty single quotes data: +bool(false) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(false) +-- $key arguments are unset data: +bool(false) + +-- Iteration 3: extreme floats data -- +-- $key arguments are int data: +bool(true) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(true) +-- $key arguments are extreme floats data: +bool(true) +bool(true) +-- $key arguments are null uppercase data: +bool(false) +-- $key arguments are null lowercase data: +bool(false) +-- $key arguments are bool lowercase data: +bool(false) +bool(true) +-- $key arguments are bool uppercase data: +bool(false) +bool(true) +-- $key arguments are empty double quotes data: +bool(false) +-- $key arguments are empty single quotes data: +bool(false) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(false) +-- $key arguments are unset data: +bool(false) + +-- Iteration 4: null uppercase data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(true) +-- $key arguments are null lowercase data: +bool(true) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(true) +-- $key arguments are empty single quotes data: +bool(true) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(true) +-- $key arguments are unset data: +bool(true) + +-- Iteration 5: null lowercase data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(true) +-- $key arguments are null lowercase data: +bool(true) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(true) +-- $key arguments are empty single quotes data: +bool(true) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(true) +-- $key arguments are unset data: +bool(true) + +-- Iteration 6: bool lowercase data -- +-- $key arguments are int data: +bool(true) +bool(true) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(true) +-- $key arguments are extreme floats data: +bool(false) +bool(true) +-- $key arguments are null uppercase data: +bool(false) +-- $key arguments are null lowercase data: +bool(false) +-- $key arguments are bool lowercase data: +bool(true) +bool(true) +-- $key arguments are bool uppercase data: +bool(true) +bool(true) +-- $key arguments are empty double quotes data: +bool(false) +-- $key arguments are empty single quotes data: +bool(false) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(false) +-- $key arguments are unset data: +bool(false) + +-- Iteration 7: bool uppercase data -- +-- $key arguments are int data: +bool(true) +bool(true) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(true) +-- $key arguments are extreme floats data: +bool(false) +bool(true) +-- $key arguments are null uppercase data: +bool(false) +-- $key arguments are null lowercase data: +bool(false) +-- $key arguments are bool lowercase data: +bool(true) +bool(true) +-- $key arguments are bool uppercase data: +bool(true) +bool(true) +-- $key arguments are empty double quotes data: +bool(false) +-- $key arguments are empty single quotes data: +bool(false) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(false) +-- $key arguments are unset data: +bool(false) + +-- Iteration 8: empty double quotes data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(true) +-- $key arguments are null lowercase data: +bool(true) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(true) +-- $key arguments are empty single quotes data: +bool(true) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(true) +-- $key arguments are unset data: +bool(true) + +-- Iteration 9: empty single quotes data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(true) +-- $key arguments are null lowercase data: +bool(true) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(true) +-- $key arguments are empty single quotes data: +bool(true) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(true) +-- $key arguments are unset data: +bool(true) + +-- Iteration 10: string data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(false) +-- $key arguments are null lowercase data: +bool(false) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(false) +-- $key arguments are empty single quotes data: +bool(false) +-- $key arguments are string data: +bool(true) +bool(true) +bool(true) +-- $key arguments are undefined data: +bool(false) +-- $key arguments are unset data: +bool(false) + +-- Iteration 11: undefined data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(true) +-- $key arguments are null lowercase data: +bool(true) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(true) +-- $key arguments are empty single quotes data: +bool(true) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(true) +-- $key arguments are unset data: +bool(true) + +-- Iteration 12: unset data -- +-- $key arguments are int data: +bool(false) +bool(false) +bool(false) +bool(false) +-- $key arguments are float data: +bool(false) +bool(false) +bool(false) +-- $key arguments are extreme floats data: +bool(false) +bool(false) +-- $key arguments are null uppercase data: +bool(true) +-- $key arguments are null lowercase data: +bool(true) +-- $key arguments are bool lowercase data: +bool(false) +bool(false) +-- $key arguments are bool uppercase data: +bool(false) +bool(false) +-- $key arguments are empty double quotes data: +bool(true) +-- $key arguments are empty single quotes data: +bool(true) +-- $key arguments are string data: +bool(false) +bool(false) +bool(false) +-- $key arguments are undefined data: +bool(true) +-- $key arguments are unset data: +bool(true) +Done \ No newline at end of file -- 2.40.0