From f1247984188b173dd3c52fb655e992b9830b1918 Mon Sep 17 00:00:00 2001 From: NickSdot Date: Sat, 22 Aug 2026 21:01:31 +0700 Subject: [PATCH 1/3] review: removed mentioned zpp tests --- .../array_intersect_assoc_variation1.phpt | 187 --------------- .../array_intersect_assoc_variation2.phpt | 188 --------------- .../array/array_intersect_key_variation1.phpt | 211 ----------------- .../array/array_intersect_key_variation2.phpt | 212 ----------------- .../array_intersect_uassoc_variation1.phpt | 219 ------------------ .../array_intersect_uassoc_variation2.phpt | 219 ------------------ .../array_intersect_ukey_variation1.phpt | 217 ----------------- .../array_intersect_ukey_variation2.phpt | 217 ----------------- .../array/array_intersect_variation1.phpt | 187 --------------- .../tests/array/array_map_object1.phpt | 186 --------------- .../tests/array/array_map_object2.phpt | 45 ---- 11 files changed, 2088 deletions(-) delete mode 100644 ext/standard/tests/array/array_intersect_assoc_variation1.phpt delete mode 100644 ext/standard/tests/array/array_intersect_assoc_variation2.phpt delete mode 100644 ext/standard/tests/array/array_intersect_key_variation1.phpt delete mode 100644 ext/standard/tests/array/array_intersect_key_variation2.phpt delete mode 100644 ext/standard/tests/array/array_intersect_uassoc_variation1.phpt delete mode 100644 ext/standard/tests/array/array_intersect_uassoc_variation2.phpt delete mode 100644 ext/standard/tests/array/array_intersect_ukey_variation1.phpt delete mode 100644 ext/standard/tests/array/array_intersect_ukey_variation2.phpt delete mode 100644 ext/standard/tests/array/array_intersect_variation1.phpt delete mode 100644 ext/standard/tests/array/array_map_object1.phpt delete mode 100644 ext/standard/tests/array/array_map_object2.phpt diff --git a/ext/standard/tests/array/array_intersect_assoc_variation1.phpt b/ext/standard/tests/array/array_intersect_assoc_variation1.phpt deleted file mode 100644 index 9c9cef73dd1f..000000000000 --- a/ext/standard/tests/array/array_intersect_assoc_variation1.phpt +++ /dev/null @@ -1,187 +0,0 @@ ---TEST-- -Test array_intersect_assoc() function : usage variations - unexpected values for 'array1' argument(Bug#43196) ---FILE-- - 1, "two" => 2); - -// get an unset variable -$unset_var = 10; -unset ($unset_var); - -// get a class -class classA -{ - public function __toString() { - return "Class A object"; - } -} - -// heredoc string -$heredoc = <<getMessage(), "\n"; - } - - // Calling array_intersect_assoc() with more arguments - try { - var_dump( array_intersect_assoc($unexpected_value, $array2, $arr3) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - $iterator++; -} - -// close the file resource used -fclose($fp); - -echo "Done"; -?> ---EXPECT-- -*** Testing array_intersect_assoc() : Passing non-array values to $array1 argument *** - --- Iteration 1 --array_intersect_assoc(): Argument #1 ($array) must be of type array, int given -array_intersect_assoc(): Argument #1 ($array) must be of type array, int given - --- Iteration 2 --array_intersect_assoc(): Argument #1 ($array) must be of type array, int given -array_intersect_assoc(): Argument #1 ($array) must be of type array, int given - --- Iteration 3 --array_intersect_assoc(): Argument #1 ($array) must be of type array, int given -array_intersect_assoc(): Argument #1 ($array) must be of type array, int given - --- Iteration 4 --array_intersect_assoc(): Argument #1 ($array) must be of type array, int given -array_intersect_assoc(): Argument #1 ($array) must be of type array, int given - --- Iteration 5 --array_intersect_assoc(): Argument #1 ($array) must be of type array, float given -array_intersect_assoc(): Argument #1 ($array) must be of type array, float given - --- Iteration 6 --array_intersect_assoc(): Argument #1 ($array) must be of type array, float given -array_intersect_assoc(): Argument #1 ($array) must be of type array, float given - --- Iteration 7 --array_intersect_assoc(): Argument #1 ($array) must be of type array, float given -array_intersect_assoc(): Argument #1 ($array) must be of type array, float given - --- Iteration 8 --array_intersect_assoc(): Argument #1 ($array) must be of type array, float given -array_intersect_assoc(): Argument #1 ($array) must be of type array, float given - --- Iteration 9 --array_intersect_assoc(): Argument #1 ($array) must be of type array, float given -array_intersect_assoc(): Argument #1 ($array) must be of type array, float given - --- Iteration 10 --array_intersect_assoc(): Argument #1 ($array) must be of type array, null given -array_intersect_assoc(): Argument #1 ($array) must be of type array, null given - --- Iteration 11 --array_intersect_assoc(): Argument #1 ($array) must be of type array, null given -array_intersect_assoc(): Argument #1 ($array) must be of type array, null given - --- Iteration 12 --array_intersect_assoc(): Argument #1 ($array) must be of type array, true given -array_intersect_assoc(): Argument #1 ($array) must be of type array, true given - --- Iteration 13 --array_intersect_assoc(): Argument #1 ($array) must be of type array, false given -array_intersect_assoc(): Argument #1 ($array) must be of type array, false given - --- Iteration 14 --array_intersect_assoc(): Argument #1 ($array) must be of type array, true given -array_intersect_assoc(): Argument #1 ($array) must be of type array, true given - --- Iteration 15 --array_intersect_assoc(): Argument #1 ($array) must be of type array, false given -array_intersect_assoc(): Argument #1 ($array) must be of type array, false given - --- Iteration 16 --array_intersect_assoc(): Argument #1 ($array) must be of type array, string given -array_intersect_assoc(): Argument #1 ($array) must be of type array, string given - --- Iteration 17 --array_intersect_assoc(): Argument #1 ($array) must be of type array, string given -array_intersect_assoc(): Argument #1 ($array) must be of type array, string given - --- Iteration 18 --array_intersect_assoc(): Argument #1 ($array) must be of type array, string given -array_intersect_assoc(): Argument #1 ($array) must be of type array, string given - --- Iteration 19 --array_intersect_assoc(): Argument #1 ($array) must be of type array, string given -array_intersect_assoc(): Argument #1 ($array) must be of type array, string given - --- Iteration 20 --array_intersect_assoc(): Argument #1 ($array) must be of type array, string given -array_intersect_assoc(): Argument #1 ($array) must be of type array, string given - --- Iteration 21 --array_intersect_assoc(): Argument #1 ($array) must be of type array, classA given -array_intersect_assoc(): Argument #1 ($array) must be of type array, classA given - --- Iteration 22 --array_intersect_assoc(): Argument #1 ($array) must be of type array, null given -array_intersect_assoc(): Argument #1 ($array) must be of type array, null given - --- Iteration 23 --array_intersect_assoc(): Argument #1 ($array) must be of type array, null given -array_intersect_assoc(): Argument #1 ($array) must be of type array, null given - --- Iteration 24 --array_intersect_assoc(): Argument #1 ($array) must be of type array, resource given -array_intersect_assoc(): Argument #1 ($array) must be of type array, resource given -Done diff --git a/ext/standard/tests/array/array_intersect_assoc_variation2.phpt b/ext/standard/tests/array/array_intersect_assoc_variation2.phpt deleted file mode 100644 index 31b54469863a..000000000000 --- a/ext/standard/tests/array/array_intersect_assoc_variation2.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test array_intersect_assoc() function : usage variations - unexpected values for 'array2' argument(Bug#43196) ---FILE-- - 1, "two" => 2); - -// get an unset variable -$unset_var = 10; -unset ($unset_var); - -// get a class -class classA -{ - public function __toString() { - return "Class A object"; - } -} - -// heredoc string -$heredoc = <<getMessage(), "\n"; - } - - // Calling array_intersect_assoc() with more arguments - try { - var_dump( array_intersect_assoc($array1, $unexpected_value, $arr3) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - - $iterator++; -} - -// close the file resource used -fclose($fp); - -echo "Done"; -?> ---EXPECT-- -*** Testing array_intersect_assoc() : Passing non-array values to $array2 argument *** - --- Iteration 1 --array_intersect_assoc(): Argument #2 must be of type array, int given -array_intersect_assoc(): Argument #2 must be of type array, int given - --- Iteration 2 --array_intersect_assoc(): Argument #2 must be of type array, int given -array_intersect_assoc(): Argument #2 must be of type array, int given - --- Iteration 3 --array_intersect_assoc(): Argument #2 must be of type array, int given -array_intersect_assoc(): Argument #2 must be of type array, int given - --- Iteration 4 --array_intersect_assoc(): Argument #2 must be of type array, int given -array_intersect_assoc(): Argument #2 must be of type array, int given - --- Iteration 5 --array_intersect_assoc(): Argument #2 must be of type array, float given -array_intersect_assoc(): Argument #2 must be of type array, float given - --- Iteration 6 --array_intersect_assoc(): Argument #2 must be of type array, float given -array_intersect_assoc(): Argument #2 must be of type array, float given - --- Iteration 7 --array_intersect_assoc(): Argument #2 must be of type array, float given -array_intersect_assoc(): Argument #2 must be of type array, float given - --- Iteration 8 --array_intersect_assoc(): Argument #2 must be of type array, float given -array_intersect_assoc(): Argument #2 must be of type array, float given - --- Iteration 9 --array_intersect_assoc(): Argument #2 must be of type array, float given -array_intersect_assoc(): Argument #2 must be of type array, float given - --- Iteration 10 --array_intersect_assoc(): Argument #2 must be of type array, null given -array_intersect_assoc(): Argument #2 must be of type array, null given - --- Iteration 11 --array_intersect_assoc(): Argument #2 must be of type array, null given -array_intersect_assoc(): Argument #2 must be of type array, null given - --- Iteration 12 --array_intersect_assoc(): Argument #2 must be of type array, true given -array_intersect_assoc(): Argument #2 must be of type array, true given - --- Iteration 13 --array_intersect_assoc(): Argument #2 must be of type array, false given -array_intersect_assoc(): Argument #2 must be of type array, false given - --- Iteration 14 --array_intersect_assoc(): Argument #2 must be of type array, true given -array_intersect_assoc(): Argument #2 must be of type array, true given - --- Iteration 15 --array_intersect_assoc(): Argument #2 must be of type array, false given -array_intersect_assoc(): Argument #2 must be of type array, false given - --- Iteration 16 --array_intersect_assoc(): Argument #2 must be of type array, string given -array_intersect_assoc(): Argument #2 must be of type array, string given - --- Iteration 17 --array_intersect_assoc(): Argument #2 must be of type array, string given -array_intersect_assoc(): Argument #2 must be of type array, string given - --- Iteration 18 --array_intersect_assoc(): Argument #2 must be of type array, string given -array_intersect_assoc(): Argument #2 must be of type array, string given - --- Iteration 19 --array_intersect_assoc(): Argument #2 must be of type array, string given -array_intersect_assoc(): Argument #2 must be of type array, string given - --- Iteration 20 --array_intersect_assoc(): Argument #2 must be of type array, string given -array_intersect_assoc(): Argument #2 must be of type array, string given - --- Iteration 21 --array_intersect_assoc(): Argument #2 must be of type array, classA given -array_intersect_assoc(): Argument #2 must be of type array, classA given - --- Iteration 22 --array_intersect_assoc(): Argument #2 must be of type array, null given -array_intersect_assoc(): Argument #2 must be of type array, null given - --- Iteration 23 --array_intersect_assoc(): Argument #2 must be of type array, null given -array_intersect_assoc(): Argument #2 must be of type array, null given - --- Iteration 24 --array_intersect_assoc(): Argument #2 must be of type array, resource given -array_intersect_assoc(): Argument #2 must be of type array, resource given -Done diff --git a/ext/standard/tests/array/array_intersect_key_variation1.phpt b/ext/standard/tests/array/array_intersect_key_variation1.phpt deleted file mode 100644 index ae11e0a2ec93..000000000000 --- a/ext/standard/tests/array/array_intersect_key_variation1.phpt +++ /dev/null @@ -1,211 +0,0 @@ ---TEST-- -Test array_intersect_key() function : usage variation - Passing unexpected values to first argument ---FILE-- - 1, 'red' => 2, 'green' => 3, 'purple' => 4); -$array3 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//resource variable -$fp = fopen(__FILE__, "r"); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = << 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource data - 'resource var' => $fp, -); - -// loop through each element of the array for array1 -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_intersect_key($value, $array2) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - try { - var_dump( array_intersect_key($value, $array2, $array3) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -} - -fclose($fp); -?> ---EXPECT-- -*** Testing array_intersect_key() : usage variation *** - ---int 0-- -array_intersect_key(): Argument #1 ($array) must be of type array, int given -array_intersect_key(): Argument #1 ($array) must be of type array, int given - ---int 1-- -array_intersect_key(): Argument #1 ($array) must be of type array, int given -array_intersect_key(): Argument #1 ($array) must be of type array, int given - ---int 12345-- -array_intersect_key(): Argument #1 ($array) must be of type array, int given -array_intersect_key(): Argument #1 ($array) must be of type array, int given - ---int -12345-- -array_intersect_key(): Argument #1 ($array) must be of type array, int given -array_intersect_key(): Argument #1 ($array) must be of type array, int given - ---float 10.5-- -array_intersect_key(): Argument #1 ($array) must be of type array, float given -array_intersect_key(): Argument #1 ($array) must be of type array, float given - ---float -10.5-- -array_intersect_key(): Argument #1 ($array) must be of type array, float given -array_intersect_key(): Argument #1 ($array) must be of type array, float given - ---float 12.3456789000e10-- -array_intersect_key(): Argument #1 ($array) must be of type array, float given -array_intersect_key(): Argument #1 ($array) must be of type array, float given - ---float -12.3456789000e10-- -array_intersect_key(): Argument #1 ($array) must be of type array, float given -array_intersect_key(): Argument #1 ($array) must be of type array, float given - ---float .5-- -array_intersect_key(): Argument #1 ($array) must be of type array, float given -array_intersect_key(): Argument #1 ($array) must be of type array, float given - ---uppercase NULL-- -array_intersect_key(): Argument #1 ($array) must be of type array, null given -array_intersect_key(): Argument #1 ($array) must be of type array, null given - ---lowercase null-- -array_intersect_key(): Argument #1 ($array) must be of type array, null given -array_intersect_key(): Argument #1 ($array) must be of type array, null given - ---lowercase true-- -array_intersect_key(): Argument #1 ($array) must be of type array, true given -array_intersect_key(): Argument #1 ($array) must be of type array, true given - ---lowercase false-- -array_intersect_key(): Argument #1 ($array) must be of type array, false given -array_intersect_key(): Argument #1 ($array) must be of type array, false given - ---uppercase TRUE-- -array_intersect_key(): Argument #1 ($array) must be of type array, true given -array_intersect_key(): Argument #1 ($array) must be of type array, true given - ---uppercase FALSE-- -array_intersect_key(): Argument #1 ($array) must be of type array, false given -array_intersect_key(): Argument #1 ($array) must be of type array, false given - ---empty string DQ-- -array_intersect_key(): Argument #1 ($array) must be of type array, string given -array_intersect_key(): Argument #1 ($array) must be of type array, string given - ---empty string SQ-- -array_intersect_key(): Argument #1 ($array) must be of type array, string given -array_intersect_key(): Argument #1 ($array) must be of type array, string given - ---string DQ-- -array_intersect_key(): Argument #1 ($array) must be of type array, string given -array_intersect_key(): Argument #1 ($array) must be of type array, string given - ---string SQ-- -array_intersect_key(): Argument #1 ($array) must be of type array, string given -array_intersect_key(): Argument #1 ($array) must be of type array, string given - ---mixed case string-- -array_intersect_key(): Argument #1 ($array) must be of type array, string given -array_intersect_key(): Argument #1 ($array) must be of type array, string given - ---heredoc-- -array_intersect_key(): Argument #1 ($array) must be of type array, string given -array_intersect_key(): Argument #1 ($array) must be of type array, string given - ---instance of classWithToString-- -array_intersect_key(): Argument #1 ($array) must be of type array, classWithToString given -array_intersect_key(): Argument #1 ($array) must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_intersect_key(): Argument #1 ($array) must be of type array, classWithoutToString given -array_intersect_key(): Argument #1 ($array) must be of type array, classWithoutToString given - ---undefined var-- -array_intersect_key(): Argument #1 ($array) must be of type array, null given -array_intersect_key(): Argument #1 ($array) must be of type array, null given - ---unset var-- -array_intersect_key(): Argument #1 ($array) must be of type array, null given -array_intersect_key(): Argument #1 ($array) must be of type array, null given - ---resource var-- -array_intersect_key(): Argument #1 ($array) must be of type array, resource given -array_intersect_key(): Argument #1 ($array) must be of type array, resource given diff --git a/ext/standard/tests/array/array_intersect_key_variation2.phpt b/ext/standard/tests/array/array_intersect_key_variation2.phpt deleted file mode 100644 index d2a8672e284c..000000000000 --- a/ext/standard/tests/array/array_intersect_key_variation2.phpt +++ /dev/null @@ -1,212 +0,0 @@ ---TEST-- -Test array_intersect_key() function : usage variation - Passing unexpected values to second argument ---FILE-- - 1, 'red' => 2, 'green' => 3, 'purple' => 4); -$array3 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//resource variable -$fp = fopen(__FILE__, "r"); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = << 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource data - 'resource var' => $fp, -); - -// loop through each element of the array for array2 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_intersect_key($array1, $value) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - try { - var_dump( array_intersect_key($array1, $value, $array3) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -} - -fclose($fp); -?> ---EXPECT-- -*** Testing array_intersect_key() : usage variation *** - ---int 0-- -array_intersect_key(): Argument #2 must be of type array, int given -array_intersect_key(): Argument #2 must be of type array, int given - ---int 1-- -array_intersect_key(): Argument #2 must be of type array, int given -array_intersect_key(): Argument #2 must be of type array, int given - ---int 12345-- -array_intersect_key(): Argument #2 must be of type array, int given -array_intersect_key(): Argument #2 must be of type array, int given - ---int -12345-- -array_intersect_key(): Argument #2 must be of type array, int given -array_intersect_key(): Argument #2 must be of type array, int given - ---float 10.5-- -array_intersect_key(): Argument #2 must be of type array, float given -array_intersect_key(): Argument #2 must be of type array, float given - ---float -10.5-- -array_intersect_key(): Argument #2 must be of type array, float given -array_intersect_key(): Argument #2 must be of type array, float given - ---float 12.3456789000e10-- -array_intersect_key(): Argument #2 must be of type array, float given -array_intersect_key(): Argument #2 must be of type array, float given - ---float -12.3456789000e10-- -array_intersect_key(): Argument #2 must be of type array, float given -array_intersect_key(): Argument #2 must be of type array, float given - ---float .5-- -array_intersect_key(): Argument #2 must be of type array, float given -array_intersect_key(): Argument #2 must be of type array, float given - ---uppercase NULL-- -array_intersect_key(): Argument #2 must be of type array, null given -array_intersect_key(): Argument #2 must be of type array, null given - ---lowercase null-- -array_intersect_key(): Argument #2 must be of type array, null given -array_intersect_key(): Argument #2 must be of type array, null given - ---lowercase true-- -array_intersect_key(): Argument #2 must be of type array, true given -array_intersect_key(): Argument #2 must be of type array, true given - ---lowercase false-- -array_intersect_key(): Argument #2 must be of type array, false given -array_intersect_key(): Argument #2 must be of type array, false given - ---uppercase TRUE-- -array_intersect_key(): Argument #2 must be of type array, true given -array_intersect_key(): Argument #2 must be of type array, true given - ---uppercase FALSE-- -array_intersect_key(): Argument #2 must be of type array, false given -array_intersect_key(): Argument #2 must be of type array, false given - ---empty string DQ-- -array_intersect_key(): Argument #2 must be of type array, string given -array_intersect_key(): Argument #2 must be of type array, string given - ---empty string SQ-- -array_intersect_key(): Argument #2 must be of type array, string given -array_intersect_key(): Argument #2 must be of type array, string given - ---string DQ-- -array_intersect_key(): Argument #2 must be of type array, string given -array_intersect_key(): Argument #2 must be of type array, string given - ---string SQ-- -array_intersect_key(): Argument #2 must be of type array, string given -array_intersect_key(): Argument #2 must be of type array, string given - ---mixed case string-- -array_intersect_key(): Argument #2 must be of type array, string given -array_intersect_key(): Argument #2 must be of type array, string given - ---heredoc-- -array_intersect_key(): Argument #2 must be of type array, string given -array_intersect_key(): Argument #2 must be of type array, string given - ---instance of classWithToString-- -array_intersect_key(): Argument #2 must be of type array, classWithToString given -array_intersect_key(): Argument #2 must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_intersect_key(): Argument #2 must be of type array, classWithoutToString given -array_intersect_key(): Argument #2 must be of type array, classWithoutToString given - ---undefined var-- -array_intersect_key(): Argument #2 must be of type array, null given -array_intersect_key(): Argument #2 must be of type array, null given - ---unset var-- -array_intersect_key(): Argument #2 must be of type array, null given -array_intersect_key(): Argument #2 must be of type array, null given - ---resource var-- -array_intersect_key(): Argument #2 must be of type array, resource given -array_intersect_key(): Argument #2 must be of type array, resource given diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt deleted file mode 100644 index ea6ce6a1a5a1..000000000000 --- a/ext/standard/tests/array/array_intersect_uassoc_variation1.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test array_intersect_uassoc() function : usage variation - Passing unexpected values to first argument ---FILE-- - "green", "yellow", "red"); -$array3 = array("a"=>"green", "brown"); - -//Callback function -function key_compare_func($a, $b) { - if ($a === $b) { - return 0; - } - return ($a > $b) ? 1 : -1; -} - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//resource variable -$fp = fopen(__FILE__, "r"); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = << 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource data - 'resource' => $fp, -); - -// loop through each element of the array for array1 -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_intersect_uassoc($value, $array2, 'key_compare_func') ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - try { - var_dump( array_intersect_uassoc($value, $array2, $array3, 'key_compare_func') ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -fclose($fp); -?> ---EXPECT-- -*** Testing array_intersect_uassoc() : usage variation *** - ---int 0-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, int given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, int given - ---int 1-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, int given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, int given - ---int 12345-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, int given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, int given - ---int -12345-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, int given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, int given - ---float 10.5-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, float given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, float given - ---float -10.5-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, float given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, float given - ---float 12.3456789000e10-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, float given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, float given - ---float -12.3456789000e10-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, float given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, float given - ---float .5-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, float given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, float given - ---uppercase NULL-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, null given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, null given - ---lowercase null-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, null given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, null given - ---lowercase true-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, true given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, true given - ---lowercase false-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, false given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, false given - ---uppercase TRUE-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, true given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, true given - ---uppercase FALSE-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, false given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, false given - ---empty string DQ-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given - ---empty string SQ-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given - ---string DQ-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given - ---string SQ-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given - ---mixed case string-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given - ---heredoc-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, string given - ---instance of classWithToString-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, classWithToString given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, classWithoutToString given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, classWithoutToString given - ---undefined var-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, null given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, null given - ---unset var-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, null given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, null given - ---resource-- -array_intersect_uassoc(): Argument #1 ($array) must be of type array, resource given -array_intersect_uassoc(): Argument #1 ($array) must be of type array, resource given diff --git a/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt b/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt deleted file mode 100644 index 03a7dc8d07e5..000000000000 --- a/ext/standard/tests/array/array_intersect_uassoc_variation2.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test array_intersect_uassoc() function : usage variation - Passing unexpected values to second argument ---FILE-- - "green", "b" => "brown", "c" => "blue", "red"); -$array3 = array("a"=>"green", "brown"); - -//Callback function -function key_compare_func($a, $b) { - if ($a === $b) { - return 0; - } - return ($a > $b) ? 1 : -1; -} - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//resource variable -$fp = fopen(__FILE__, "r"); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = << 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource data - 'resource' => $fp, -); - -// loop through each element of the array for array1 -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_intersect_uassoc($array1, $value, 'key_compare_func') ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - try { - var_dump( array_intersect_uassoc($array1, $value, $array3, 'key_compare_func') ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -fclose($fp); -?> ---EXPECT-- -*** Testing array_intersect_uassoc() : usage variation *** - ---int 0-- -array_intersect_uassoc(): Argument #2 must be of type array, int given -array_intersect_uassoc(): Argument #2 must be of type array, int given - ---int 1-- -array_intersect_uassoc(): Argument #2 must be of type array, int given -array_intersect_uassoc(): Argument #2 must be of type array, int given - ---int 12345-- -array_intersect_uassoc(): Argument #2 must be of type array, int given -array_intersect_uassoc(): Argument #2 must be of type array, int given - ---int -12345-- -array_intersect_uassoc(): Argument #2 must be of type array, int given -array_intersect_uassoc(): Argument #2 must be of type array, int given - ---float 10.5-- -array_intersect_uassoc(): Argument #2 must be of type array, float given -array_intersect_uassoc(): Argument #2 must be of type array, float given - ---float -10.5-- -array_intersect_uassoc(): Argument #2 must be of type array, float given -array_intersect_uassoc(): Argument #2 must be of type array, float given - ---float 12.3456789000e10-- -array_intersect_uassoc(): Argument #2 must be of type array, float given -array_intersect_uassoc(): Argument #2 must be of type array, float given - ---float -12.3456789000e10-- -array_intersect_uassoc(): Argument #2 must be of type array, float given -array_intersect_uassoc(): Argument #2 must be of type array, float given - ---float .5-- -array_intersect_uassoc(): Argument #2 must be of type array, float given -array_intersect_uassoc(): Argument #2 must be of type array, float given - ---uppercase NULL-- -array_intersect_uassoc(): Argument #2 must be of type array, null given -array_intersect_uassoc(): Argument #2 must be of type array, null given - ---lowercase null-- -array_intersect_uassoc(): Argument #2 must be of type array, null given -array_intersect_uassoc(): Argument #2 must be of type array, null given - ---lowercase true-- -array_intersect_uassoc(): Argument #2 must be of type array, true given -array_intersect_uassoc(): Argument #2 must be of type array, true given - ---lowercase false-- -array_intersect_uassoc(): Argument #2 must be of type array, false given -array_intersect_uassoc(): Argument #2 must be of type array, false given - ---uppercase TRUE-- -array_intersect_uassoc(): Argument #2 must be of type array, true given -array_intersect_uassoc(): Argument #2 must be of type array, true given - ---uppercase FALSE-- -array_intersect_uassoc(): Argument #2 must be of type array, false given -array_intersect_uassoc(): Argument #2 must be of type array, false given - ---empty string DQ-- -array_intersect_uassoc(): Argument #2 must be of type array, string given -array_intersect_uassoc(): Argument #2 must be of type array, string given - ---empty string SQ-- -array_intersect_uassoc(): Argument #2 must be of type array, string given -array_intersect_uassoc(): Argument #2 must be of type array, string given - ---string DQ-- -array_intersect_uassoc(): Argument #2 must be of type array, string given -array_intersect_uassoc(): Argument #2 must be of type array, string given - ---string SQ-- -array_intersect_uassoc(): Argument #2 must be of type array, string given -array_intersect_uassoc(): Argument #2 must be of type array, string given - ---mixed case string-- -array_intersect_uassoc(): Argument #2 must be of type array, string given -array_intersect_uassoc(): Argument #2 must be of type array, string given - ---heredoc-- -array_intersect_uassoc(): Argument #2 must be of type array, string given -array_intersect_uassoc(): Argument #2 must be of type array, string given - ---instance of classWithToString-- -array_intersect_uassoc(): Argument #2 must be of type array, classWithToString given -array_intersect_uassoc(): Argument #2 must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_intersect_uassoc(): Argument #2 must be of type array, classWithoutToString given -array_intersect_uassoc(): Argument #2 must be of type array, classWithoutToString given - ---undefined var-- -array_intersect_uassoc(): Argument #2 must be of type array, null given -array_intersect_uassoc(): Argument #2 must be of type array, null given - ---unset var-- -array_intersect_uassoc(): Argument #2 must be of type array, null given -array_intersect_uassoc(): Argument #2 must be of type array, null given - ---resource-- -array_intersect_uassoc(): Argument #2 must be of type array, resource given -array_intersect_uassoc(): Argument #2 must be of type array, resource given diff --git a/ext/standard/tests/array/array_intersect_ukey_variation1.phpt b/ext/standard/tests/array/array_intersect_ukey_variation1.phpt deleted file mode 100644 index 8195d45c294e..000000000000 --- a/ext/standard/tests/array/array_intersect_ukey_variation1.phpt +++ /dev/null @@ -1,217 +0,0 @@ ---TEST-- -Test array_intersect_ukey() function : usage variation - Passing unexpected values to first argument ---FILE-- - 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); -$array3 = array('green' => 5, 'cyan' => 8); - -//Call back function -function key_compare_func($key1, $key2) -{ - if ($key1 == $key2) - return 0; - else - return ($key1 > $key2)? 1:-1; -} - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//resource variable -$fp = fopen(__FILE__, "r"); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = << 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource data - 'resource var' => $fp, -); - -// loop through each element of the array for array1 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_intersect_ukey($value, $array2, 'key_compare_func') ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - try { - var_dump( array_intersect_ukey($value, $array2, $array3, 'key_compare_func') ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -fclose($fp); -?> ---EXPECT-- -*** Testing array_intersect_ukey() : usage variation *** - ---int 0-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, int given -array_intersect_ukey(): Argument #1 ($array) must be of type array, int given - ---int 1-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, int given -array_intersect_ukey(): Argument #1 ($array) must be of type array, int given - ---int 12345-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, int given -array_intersect_ukey(): Argument #1 ($array) must be of type array, int given - ---int -12345-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, int given -array_intersect_ukey(): Argument #1 ($array) must be of type array, int given - ---float 10.5-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, float given -array_intersect_ukey(): Argument #1 ($array) must be of type array, float given - ---float -10.5-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, float given -array_intersect_ukey(): Argument #1 ($array) must be of type array, float given - ---float 12.3456789000e10-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, float given -array_intersect_ukey(): Argument #1 ($array) must be of type array, float given - ---float -12.3456789000e10-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, float given -array_intersect_ukey(): Argument #1 ($array) must be of type array, float given - ---float .5-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, float given -array_intersect_ukey(): Argument #1 ($array) must be of type array, float given - ---uppercase NULL-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, null given -array_intersect_ukey(): Argument #1 ($array) must be of type array, null given - ---lowercase null-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, null given -array_intersect_ukey(): Argument #1 ($array) must be of type array, null given - ---lowercase true-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, true given -array_intersect_ukey(): Argument #1 ($array) must be of type array, true given - ---lowercase false-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, false given -array_intersect_ukey(): Argument #1 ($array) must be of type array, false given - ---uppercase TRUE-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, true given -array_intersect_ukey(): Argument #1 ($array) must be of type array, true given - ---uppercase FALSE-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, false given -array_intersect_ukey(): Argument #1 ($array) must be of type array, false given - ---empty string DQ-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, string given -array_intersect_ukey(): Argument #1 ($array) must be of type array, string given - ---empty string SQ-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, string given -array_intersect_ukey(): Argument #1 ($array) must be of type array, string given - ---string DQ-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, string given -array_intersect_ukey(): Argument #1 ($array) must be of type array, string given - ---string SQ-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, string given -array_intersect_ukey(): Argument #1 ($array) must be of type array, string given - ---mixed case string-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, string given -array_intersect_ukey(): Argument #1 ($array) must be of type array, string given - ---heredoc-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, string given -array_intersect_ukey(): Argument #1 ($array) must be of type array, string given - ---instance of classWithToString-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, classWithToString given -array_intersect_ukey(): Argument #1 ($array) must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, classWithoutToString given -array_intersect_ukey(): Argument #1 ($array) must be of type array, classWithoutToString given - ---undefined var-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, null given -array_intersect_ukey(): Argument #1 ($array) must be of type array, null given - ---unset var-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, null given -array_intersect_ukey(): Argument #1 ($array) must be of type array, null given - ---resource var-- -array_intersect_ukey(): Argument #1 ($array) must be of type array, resource given -array_intersect_ukey(): Argument #1 ($array) must be of type array, resource given diff --git a/ext/standard/tests/array/array_intersect_ukey_variation2.phpt b/ext/standard/tests/array/array_intersect_ukey_variation2.phpt deleted file mode 100644 index d32c0632ca5e..000000000000 --- a/ext/standard/tests/array/array_intersect_ukey_variation2.phpt +++ /dev/null @@ -1,217 +0,0 @@ ---TEST-- -Test array_intersect_ukey() function : usage variation - Passing unexpected values to second argument ---FILE-- - 1, 'red' => 2, 'green' => 3, 'purple' => 4); -$array3 = array('green' => 5, 'cyan' => 8); - -//Call back function -function key_compare_func($key1, $key2) -{ - if ($key1 == $key2) - return 0; - else - return ($key1 > $key2)? 1:-1; -} - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//resource variable -$fp = fopen(__FILE__, "r"); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = << 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource data - 'resource var' => $fp, -); - -// loop through each element of the array for array2 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_intersect_ukey($array1, $value, 'key_compare_func') ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - try { - var_dump( array_intersect_ukey($array1, $value, $array3, 'key_compare_func') ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -fclose($fp); -?> ---EXPECT-- -*** Testing array_intersect_ukey() : usage variation *** - ---int 0-- -array_intersect_ukey(): Argument #2 must be of type array, int given -array_intersect_ukey(): Argument #2 must be of type array, int given - ---int 1-- -array_intersect_ukey(): Argument #2 must be of type array, int given -array_intersect_ukey(): Argument #2 must be of type array, int given - ---int 12345-- -array_intersect_ukey(): Argument #2 must be of type array, int given -array_intersect_ukey(): Argument #2 must be of type array, int given - ---int -12345-- -array_intersect_ukey(): Argument #2 must be of type array, int given -array_intersect_ukey(): Argument #2 must be of type array, int given - ---float 10.5-- -array_intersect_ukey(): Argument #2 must be of type array, float given -array_intersect_ukey(): Argument #2 must be of type array, float given - ---float -10.5-- -array_intersect_ukey(): Argument #2 must be of type array, float given -array_intersect_ukey(): Argument #2 must be of type array, float given - ---float 12.3456789000e10-- -array_intersect_ukey(): Argument #2 must be of type array, float given -array_intersect_ukey(): Argument #2 must be of type array, float given - ---float -12.3456789000e10-- -array_intersect_ukey(): Argument #2 must be of type array, float given -array_intersect_ukey(): Argument #2 must be of type array, float given - ---float .5-- -array_intersect_ukey(): Argument #2 must be of type array, float given -array_intersect_ukey(): Argument #2 must be of type array, float given - ---uppercase NULL-- -array_intersect_ukey(): Argument #2 must be of type array, null given -array_intersect_ukey(): Argument #2 must be of type array, null given - ---lowercase null-- -array_intersect_ukey(): Argument #2 must be of type array, null given -array_intersect_ukey(): Argument #2 must be of type array, null given - ---lowercase true-- -array_intersect_ukey(): Argument #2 must be of type array, true given -array_intersect_ukey(): Argument #2 must be of type array, true given - ---lowercase false-- -array_intersect_ukey(): Argument #2 must be of type array, false given -array_intersect_ukey(): Argument #2 must be of type array, false given - ---uppercase TRUE-- -array_intersect_ukey(): Argument #2 must be of type array, true given -array_intersect_ukey(): Argument #2 must be of type array, true given - ---uppercase FALSE-- -array_intersect_ukey(): Argument #2 must be of type array, false given -array_intersect_ukey(): Argument #2 must be of type array, false given - ---empty string DQ-- -array_intersect_ukey(): Argument #2 must be of type array, string given -array_intersect_ukey(): Argument #2 must be of type array, string given - ---empty string SQ-- -array_intersect_ukey(): Argument #2 must be of type array, string given -array_intersect_ukey(): Argument #2 must be of type array, string given - ---string DQ-- -array_intersect_ukey(): Argument #2 must be of type array, string given -array_intersect_ukey(): Argument #2 must be of type array, string given - ---string SQ-- -array_intersect_ukey(): Argument #2 must be of type array, string given -array_intersect_ukey(): Argument #2 must be of type array, string given - ---mixed case string-- -array_intersect_ukey(): Argument #2 must be of type array, string given -array_intersect_ukey(): Argument #2 must be of type array, string given - ---heredoc-- -array_intersect_ukey(): Argument #2 must be of type array, string given -array_intersect_ukey(): Argument #2 must be of type array, string given - ---instance of classWithToString-- -array_intersect_ukey(): Argument #2 must be of type array, classWithToString given -array_intersect_ukey(): Argument #2 must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_intersect_ukey(): Argument #2 must be of type array, classWithoutToString given -array_intersect_ukey(): Argument #2 must be of type array, classWithoutToString given - ---undefined var-- -array_intersect_ukey(): Argument #2 must be of type array, null given -array_intersect_ukey(): Argument #2 must be of type array, null given - ---unset var-- -array_intersect_ukey(): Argument #2 must be of type array, null given -array_intersect_ukey(): Argument #2 must be of type array, null given - ---resource var-- -array_intersect_ukey(): Argument #2 must be of type array, resource given -array_intersect_ukey(): Argument #2 must be of type array, resource given diff --git a/ext/standard/tests/array/array_intersect_variation1.phpt b/ext/standard/tests/array/array_intersect_variation1.phpt deleted file mode 100644 index 733250b69f70..000000000000 --- a/ext/standard/tests/array/array_intersect_variation1.phpt +++ /dev/null @@ -1,187 +0,0 @@ ---TEST-- -Test array_intersect() function : usage variations - unexpected values for 'array1' argument ---FILE-- - 1, "two" => 2); - -// get an unset variable -$unset_var = 10; -unset ($unset_var); - -// get a class -class classA -{ - public function __toString() { - return "Class A object"; - } -} - -// heredoc string -$heredoc = <<getMessage(), "\n"; - } - - // Calling array_intersect() with more arguments - try { - var_dump( array_intersect($unexpected_value, $array2, $arr3) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - $iterator++; -} - -// close the file resource used -fclose($fp); - -echo "Done"; -?> ---EXPECT-- -*** Testing array_intersect() : Passing non-array values to $array1 argument *** - --- Iterator 1 --array_intersect(): Argument #1 ($array) must be of type array, int given -array_intersect(): Argument #1 ($array) must be of type array, int given - --- Iterator 2 --array_intersect(): Argument #1 ($array) must be of type array, int given -array_intersect(): Argument #1 ($array) must be of type array, int given - --- Iterator 3 --array_intersect(): Argument #1 ($array) must be of type array, int given -array_intersect(): Argument #1 ($array) must be of type array, int given - --- Iterator 4 --array_intersect(): Argument #1 ($array) must be of type array, int given -array_intersect(): Argument #1 ($array) must be of type array, int given - --- Iterator 5 --array_intersect(): Argument #1 ($array) must be of type array, float given -array_intersect(): Argument #1 ($array) must be of type array, float given - --- Iterator 6 --array_intersect(): Argument #1 ($array) must be of type array, float given -array_intersect(): Argument #1 ($array) must be of type array, float given - --- Iterator 7 --array_intersect(): Argument #1 ($array) must be of type array, float given -array_intersect(): Argument #1 ($array) must be of type array, float given - --- Iterator 8 --array_intersect(): Argument #1 ($array) must be of type array, float given -array_intersect(): Argument #1 ($array) must be of type array, float given - --- Iterator 9 --array_intersect(): Argument #1 ($array) must be of type array, float given -array_intersect(): Argument #1 ($array) must be of type array, float given - --- Iterator 10 --array_intersect(): Argument #1 ($array) must be of type array, null given -array_intersect(): Argument #1 ($array) must be of type array, null given - --- Iterator 11 --array_intersect(): Argument #1 ($array) must be of type array, null given -array_intersect(): Argument #1 ($array) must be of type array, null given - --- Iterator 12 --array_intersect(): Argument #1 ($array) must be of type array, true given -array_intersect(): Argument #1 ($array) must be of type array, true given - --- Iterator 13 --array_intersect(): Argument #1 ($array) must be of type array, false given -array_intersect(): Argument #1 ($array) must be of type array, false given - --- Iterator 14 --array_intersect(): Argument #1 ($array) must be of type array, true given -array_intersect(): Argument #1 ($array) must be of type array, true given - --- Iterator 15 --array_intersect(): Argument #1 ($array) must be of type array, false given -array_intersect(): Argument #1 ($array) must be of type array, false given - --- Iterator 16 --array_intersect(): Argument #1 ($array) must be of type array, string given -array_intersect(): Argument #1 ($array) must be of type array, string given - --- Iterator 17 --array_intersect(): Argument #1 ($array) must be of type array, string given -array_intersect(): Argument #1 ($array) must be of type array, string given - --- Iterator 18 --array_intersect(): Argument #1 ($array) must be of type array, string given -array_intersect(): Argument #1 ($array) must be of type array, string given - --- Iterator 19 --array_intersect(): Argument #1 ($array) must be of type array, string given -array_intersect(): Argument #1 ($array) must be of type array, string given - --- Iterator 20 --array_intersect(): Argument #1 ($array) must be of type array, string given -array_intersect(): Argument #1 ($array) must be of type array, string given - --- Iterator 21 --array_intersect(): Argument #1 ($array) must be of type array, classA given -array_intersect(): Argument #1 ($array) must be of type array, classA given - --- Iterator 22 --array_intersect(): Argument #1 ($array) must be of type array, null given -array_intersect(): Argument #1 ($array) must be of type array, null given - --- Iterator 23 --array_intersect(): Argument #1 ($array) must be of type array, null given -array_intersect(): Argument #1 ($array) must be of type array, null given - --- Iterator 24 --array_intersect(): Argument #1 ($array) must be of type array, resource given -array_intersect(): Argument #1 ($array) must be of type array, resource given -Done diff --git a/ext/standard/tests/array/array_map_object1.phpt b/ext/standard/tests/array/array_map_object1.phpt deleted file mode 100644 index d86919bf9c4e..000000000000 --- a/ext/standard/tests/array/array_map_object1.phpt +++ /dev/null @@ -1,186 +0,0 @@ ---TEST-- -Test array_map() function : usage variations - object functionality ---FILE-- -getMessage(), "\n"; - } -} -test(array('SimpleClass', 'square'), array(1, 2)); - -echo "\n-- simple class with private variable and method --\n"; -class SimpleClassPri -{ - private $var1 = 10; - private static function add($n) { - return $var + $n; - } -} -test(array('SimpleClassPri', 'add'), array(1)); - -echo "\n-- simple class with protected variable and method --\n"; -class SimpleClassPro -{ - protected $var1 = 5; - protected static function mul($n) { - return $var1 * $n; - } -} -test(array('SimpleClassPro', 'mul'), array(2)); - -echo "\n-- class without members --\n"; -class EmptyClass -{ -} -test(array('EmptyClass'), array(1, 2)); - -echo "\n-- abstract class --\n"; -abstract class AbstractClass -{ - protected $var2 = 5; - abstract static function emptyFunction(); -} - -// class deriving the above abstract class -class ChildClass extends AbstractClass -{ - private $var3; - public static function emptyFunction() { - echo "defined in child\n"; - } -} -test(array('ChildClass', 'emptyFunction'), array(1, 2)); - -echo "\n-- class with final method --\n"; -class FinalClass -{ - private $var4; - final static function finalMethod() { - echo "This function can't be overloaded\n"; - } -} -test(array('FinalClass', 'finalMethod'), array(1, 2)); - -echo "\n-- class with static members --\n"; -class StaticClass -{ - static $var5 = 2; - public static function square($n) { - return ($n * $n); - } - private static function cube($n) { - return ($n * $n * $n); - } - protected static function retVal($n) { - return array($n); - } -} -test(array('StaticClass', 'square'), array(1, 2)); -test(array('StaticClass', 'cube'), array(2)); -test(array('StaticClass', 'retVal'), array(3, 4)); - -echo "-- class implementing an interface --\n"; -interface myInterface -{ - public function toImplement(); -} -class InterClass implements myInterface -{ - public static function square($n) { - return ($n * $n); - } - public function toImplement() { - return 1; - } -} -test(array('InterClass', 'square'), array(1, 2)); - -?> ---EXPECT-- -*** Testing array_map() : object functionality *** --- simple class with public variable and method -- -SimpleClass::square -array(2) { - [0]=> - int(1) - [1]=> - int(4) -} - --- simple class with private variable and method -- -SimpleClassPri::add -array_map(): Argument #1 ($callback) must be a valid callback or null, cannot access private method SimpleClassPri::add() - --- simple class with protected variable and method -- -SimpleClassPro::mul -array_map(): Argument #1 ($callback) must be a valid callback or null, cannot access protected method SimpleClassPro::mul() - --- class without members -- -EmptyClass -array_map(): Argument #1 ($callback) must be a valid callback or null, array callback must have exactly two members - --- abstract class -- -ChildClass::emptyFunction -defined in child -defined in child -array(2) { - [0]=> - NULL - [1]=> - NULL -} - --- class with final method -- -FinalClass::finalMethod -This function can't be overloaded -This function can't be overloaded -array(2) { - [0]=> - NULL - [1]=> - NULL -} - --- class with static members -- -StaticClass::square -array(2) { - [0]=> - int(1) - [1]=> - int(4) -} -StaticClass::cube -array_map(): Argument #1 ($callback) must be a valid callback or null, cannot access private method StaticClass::cube() -StaticClass::retVal -array_map(): Argument #1 ($callback) must be a valid callback or null, cannot access protected method StaticClass::retVal() --- class implementing an interface -- -InterClass::square -array(2) { - [0]=> - int(1) - [1]=> - int(4) -} diff --git a/ext/standard/tests/array/array_map_object2.phpt b/ext/standard/tests/array/array_map_object2.phpt deleted file mode 100644 index 3b9666ce50ac..000000000000 --- a/ext/standard/tests/array/array_map_object2.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -Test array_map() function : object functionality - with non-existent class and method ---FILE-- -getMessage(), "\n"; -} - -echo "-- with existent class and non-existent method --\n"; -try { - var_dump( array_map(array('SimpleClass', 'non-existent'), array(1, 2)) ); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -echo "Done"; -?> ---EXPECT-- -*** Testing array_map() : with non-existent class and method *** --- with non-existent class -- -array_map(): Argument #1 ($callback) must be a valid callback or null, class "non-existent" not found --- with existent class and non-existent method -- -array_map(): Argument #1 ($callback) must be a valid callback or null, class SimpleClass does not have a method "non-existent" -Done From ae9385030ee76b143975a3f0423da423abb57101 Mon Sep 17 00:00:00 2001 From: NickSdot Date: Sat, 22 Aug 2026 21:02:38 +0700 Subject: [PATCH 2/3] review: removed additional zpp tests --- ...rray_column_scalar_index_strict_types.phpt | 63 ----- .../array_column_scalar_index_weak_types.phpt | 81 ------- ext/standard/tests/array/array_diff_1.phpt | 19 -- .../array/array_diff_key_variation1.phpt | 207 ----------------- .../array/array_diff_key_variation2.phpt | 208 ----------------- .../tests/array/array_diff_uassoc_error.phpt | 52 ----- .../array/array_diff_uassoc_variation1.phpt | 188 --------------- .../array/array_diff_uassoc_variation2.phpt | 188 --------------- .../array/array_diff_ukey_variation1.phpt | 215 ----------------- .../array/array_diff_ukey_variation10.phpt | 29 --- .../array/array_diff_ukey_variation2.phpt | 219 ------------------ .../array_intersect_ukey_variation8.phpt | 29 --- .../array/array_intersect_variation2.phpt | 188 --------------- .../tests/array/array_map_variation15.phpt | 27 --- .../tests/array/array_map_variation17.phpt | 137 ----------- .../array_merge_recursive_variation1.phpt | 210 ----------------- .../array_merge_recursive_variation2.phpt | 150 ------------ .../tests/array/array_merge_variation1.phpt | 104 --------- .../tests/array/array_merge_variation2.phpt | 181 --------------- .../array/array_udiff_assoc_variation1.phpt | 173 -------------- .../array/array_udiff_assoc_variation2.phpt | 173 -------------- .../array/array_udiff_uassoc_variation1.phpt | 174 -------------- .../array/array_udiff_uassoc_variation2.phpt | 174 -------------- .../tests/array/array_udiff_variation1.phpt | 173 -------------- .../tests/array/array_udiff_variation2.phpt | 173 -------------- .../array_uintersect_assoc_variation1.phpt | 173 -------------- .../array_uintersect_assoc_variation2.phpt | 173 -------------- .../array_uintersect_uassoc_variation1.phpt | 174 -------------- .../array_uintersect_uassoc_variation2.phpt | 174 -------------- .../array/array_uintersect_variation1.phpt | 173 -------------- .../array/array_uintersect_variation2.phpt | 173 -------------- .../class_object/get_class_variation_001.phpt | 158 ------------- .../class_object/property_exists_error.phpt | 21 -- .../escapeshellarg_variation1-win32.phpt | 107 --------- .../escapeshellarg_variation1.phpt | 106 --------- ext/standard/tests/math/abs_variation.phpt | 138 ----------- ext/standard/tests/math/ceil_variation1.phpt | 131 ----------- ext/standard/tests/math/floor_variation1.phpt | 131 ----------- ext/standard/tests/math/round_variation1.phpt | 175 -------------- .../tests/password/password_hash_error.phpt | 43 ---- .../password/password_needs_rehash_error.phpt | 37 --- .../tests/password/password_verify_error.phpt | 15 -- ext/standard/tests/strings/join_error1.phpt | 149 ------------ .../tests/strings/join_variation1.phpt | 133 ----------- .../tests/strings/sprintf_variation1.phpt | 213 ----------------- .../tests/strings/vprintf_variation2.phpt | 168 -------------- 46 files changed, 6300 deletions(-) delete mode 100644 ext/standard/tests/array/array_column_scalar_index_strict_types.phpt delete mode 100644 ext/standard/tests/array/array_column_scalar_index_weak_types.phpt delete mode 100644 ext/standard/tests/array/array_diff_1.phpt delete mode 100644 ext/standard/tests/array/array_diff_key_variation1.phpt delete mode 100644 ext/standard/tests/array/array_diff_key_variation2.phpt delete mode 100644 ext/standard/tests/array/array_diff_uassoc_error.phpt delete mode 100644 ext/standard/tests/array/array_diff_uassoc_variation1.phpt delete mode 100644 ext/standard/tests/array/array_diff_uassoc_variation2.phpt delete mode 100644 ext/standard/tests/array/array_diff_ukey_variation1.phpt delete mode 100644 ext/standard/tests/array/array_diff_ukey_variation10.phpt delete mode 100644 ext/standard/tests/array/array_diff_ukey_variation2.phpt delete mode 100644 ext/standard/tests/array/array_intersect_ukey_variation8.phpt delete mode 100644 ext/standard/tests/array/array_intersect_variation2.phpt delete mode 100644 ext/standard/tests/array/array_map_variation15.phpt delete mode 100644 ext/standard/tests/array/array_map_variation17.phpt delete mode 100644 ext/standard/tests/array/array_merge_recursive_variation1.phpt delete mode 100644 ext/standard/tests/array/array_merge_recursive_variation2.phpt delete mode 100644 ext/standard/tests/array/array_merge_variation1.phpt delete mode 100644 ext/standard/tests/array/array_merge_variation2.phpt delete mode 100644 ext/standard/tests/array/array_udiff_assoc_variation1.phpt delete mode 100644 ext/standard/tests/array/array_udiff_assoc_variation2.phpt delete mode 100644 ext/standard/tests/array/array_udiff_uassoc_variation1.phpt delete mode 100644 ext/standard/tests/array/array_udiff_uassoc_variation2.phpt delete mode 100644 ext/standard/tests/array/array_udiff_variation1.phpt delete mode 100644 ext/standard/tests/array/array_udiff_variation2.phpt delete mode 100644 ext/standard/tests/array/array_uintersect_assoc_variation1.phpt delete mode 100644 ext/standard/tests/array/array_uintersect_assoc_variation2.phpt delete mode 100644 ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt delete mode 100644 ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt delete mode 100644 ext/standard/tests/array/array_uintersect_variation1.phpt delete mode 100644 ext/standard/tests/array/array_uintersect_variation2.phpt delete mode 100644 ext/standard/tests/class_object/get_class_variation_001.phpt delete mode 100644 ext/standard/tests/class_object/property_exists_error.phpt delete mode 100644 ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt delete mode 100644 ext/standard/tests/general_functions/escapeshellarg_variation1.phpt delete mode 100644 ext/standard/tests/math/abs_variation.phpt delete mode 100644 ext/standard/tests/math/ceil_variation1.phpt delete mode 100644 ext/standard/tests/math/floor_variation1.phpt delete mode 100644 ext/standard/tests/math/round_variation1.phpt delete mode 100644 ext/standard/tests/password/password_hash_error.phpt delete mode 100644 ext/standard/tests/password/password_needs_rehash_error.phpt delete mode 100644 ext/standard/tests/password/password_verify_error.phpt delete mode 100644 ext/standard/tests/strings/join_error1.phpt delete mode 100644 ext/standard/tests/strings/join_variation1.phpt delete mode 100644 ext/standard/tests/strings/sprintf_variation1.phpt delete mode 100644 ext/standard/tests/strings/vprintf_variation2.phpt diff --git a/ext/standard/tests/array/array_column_scalar_index_strict_types.phpt b/ext/standard/tests/array/array_column_scalar_index_strict_types.phpt deleted file mode 100644 index 322cd1f0ab0b..000000000000 --- a/ext/standard/tests/array/array_column_scalar_index_strict_types.phpt +++ /dev/null @@ -1,63 +0,0 @@ ---TEST-- -Test array_column(): Index argument with various types in strict type mode ---FILE-- -getMessage() . "\n"; -} -try { - var_dump(array_column([['php7', 'foo'], ['php8', 'bar']], true)); -} catch (\TypeError $e) { - echo $e->getMessage() . "\n"; -} - -echo "\n-- Testing array_column() column key parameter should be a string or integer (testing array) --\n"; -try { - var_dump(array_column([['php7', 'foo'], ['php8', 'bar']], array())); -} catch (\TypeError $e) { - echo $e->getMessage() . "\n"; -} - -echo "\n-- Testing array_column() index key parameter should be a string or an integer (testing bool) --\n"; -try { - var_dump(array_column([['php' => 7, 'foo'], ['php' => 8, 'bar']], 'php', false)); -} catch (\TypeError $e) { - echo $e->getMessage() . "\n"; -} -try { - var_dump(array_column([['php' => 7, 'foo'], ['php' => 8, 'bar']], 'php', true)); -} catch (\TypeError $e) { - echo $e->getMessage() . "\n"; -} - -echo "\n-- Testing array_column() index key parameter should be a string or integer (testing array) --\n"; -try { - var_dump(array_column([['php' => 7, 'foo'], ['php' => 8, 'bar']], 'php', array())); -} catch (\TypeError $e) { - echo $e->getMessage() . "\n"; -} - -?> - -DONE ---EXPECT-- --- Testing array_column() column key parameter should be a string or an integer (testing bool) -- -array_column(): Argument #2 ($column_key) must be of type string|int|null, false given -array_column(): Argument #2 ($column_key) must be of type string|int|null, true given - --- Testing array_column() column key parameter should be a string or integer (testing array) -- -array_column(): Argument #2 ($column_key) must be of type string|int|null, array given - --- Testing array_column() index key parameter should be a string or an integer (testing bool) -- -array_column(): Argument #3 ($index_key) must be of type string|int|null, false given -array_column(): Argument #3 ($index_key) must be of type string|int|null, true given - --- Testing array_column() index key parameter should be a string or integer (testing array) -- -array_column(): Argument #3 ($index_key) must be of type string|int|null, array given - -DONE diff --git a/ext/standard/tests/array/array_column_scalar_index_weak_types.phpt b/ext/standard/tests/array/array_column_scalar_index_weak_types.phpt deleted file mode 100644 index 42ca676ebfca..000000000000 --- a/ext/standard/tests/array/array_column_scalar_index_weak_types.phpt +++ /dev/null @@ -1,81 +0,0 @@ ---TEST-- -Test array_column(): Index argument with various types in weak type mode ---FILE-- -getMessage() . "\n"; -} -try { - var_dump(array_column([['php7', 'foo'], ['php8', 'bar']], true)); -} catch (\TypeError $e) { - echo $e->getMessage() . "\n"; -} - -echo "\n-- Testing array_column() column key parameter should be a string or integer (testing array) --\n"; -try { - var_dump(array_column([['php7', 'foo'], ['php8', 'bar']], array())); -} catch (\TypeError $e) { - echo $e->getMessage() . "\n"; -} - -echo "\n-- Testing array_column() index key parameter should be a string or an integer (testing bool) --\n"; -try { - var_dump(array_column([['php' => 7, 'foo'], ['php' => 8, 'bar']], 'php', false)); -} catch (\TypeError $e) { - echo $e->getMessage() . "\n"; -} -try { - var_dump(array_column([['php' => 7, 'foo'], ['php' => 8, 'bar']], 'php', true)); -} catch (\TypeError $e) { - echo $e->getMessage() . "\n"; -} - -echo "\n-- Testing array_column() index key parameter should be a string or integer (testing array) --\n"; -try { - var_dump(array_column([['php' => 7, 'foo'], ['php' => 8, 'bar']], 'php', array())); -} catch (\TypeError $e) { - echo $e->getMessage() . "\n"; -} - -?> - -DONE ---EXPECT-- --- Testing array_column() column key parameter should be a string or an integer (testing bool) -- -array(2) { - [0]=> - string(4) "php7" - [1]=> - string(4) "php8" -} -array(2) { - [0]=> - string(3) "foo" - [1]=> - string(3) "bar" -} - --- Testing array_column() column key parameter should be a string or integer (testing array) -- -array_column(): Argument #2 ($column_key) must be of type string|int|null, array given - --- Testing array_column() index key parameter should be a string or an integer (testing bool) -- -array(2) { - ["foo"]=> - int(7) - ["bar"]=> - int(8) -} -array(2) { - [0]=> - int(7) - [1]=> - int(8) -} - --- Testing array_column() index key parameter should be a string or integer (testing array) -- -array_column(): Argument #3 ($index_key) must be of type string|int|null, array given - -DONE diff --git a/ext/standard/tests/array/array_diff_1.phpt b/ext/standard/tests/array/array_diff_1.phpt deleted file mode 100644 index 7b58077e95af..000000000000 --- a/ext/standard/tests/array/array_diff_1.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -Test array_diff when non-array is passed ---FILE-- -getMessage(), "\n"; -} -//-=-=-=-=-=- -echo "OK!"; -?> ---EXPECT-- -array_diff(): Argument #2 must be of type array, int given -OK! diff --git a/ext/standard/tests/array/array_diff_key_variation1.phpt b/ext/standard/tests/array/array_diff_key_variation1.phpt deleted file mode 100644 index 7b422153a0a0..000000000000 --- a/ext/standard/tests/array/array_diff_key_variation1.phpt +++ /dev/null @@ -1,207 +0,0 @@ ---TEST-- -Test array_diff_key() function : usage variation - Passing unexpected values to first argument ---FILE-- - 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); -$array3 = array(1, 2, 3, 4, 5); - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//resource variable -$fp = fopen(__FILE__, "r"); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = << 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource data - 'resource' => $fp, -); - -// loop through each element of the array for array1 -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_diff_key($value, $array2) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - try { - var_dump( array_diff_key($value, $array2, $array3) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -fclose($fp); -?> ---EXPECT-- -*** Testing array_diff_key() : usage variation *** - ---int 0-- -array_diff_key(): Argument #1 ($array) must be of type array, int given -array_diff_key(): Argument #1 ($array) must be of type array, int given - ---int 1-- -array_diff_key(): Argument #1 ($array) must be of type array, int given -array_diff_key(): Argument #1 ($array) must be of type array, int given - ---int 12345-- -array_diff_key(): Argument #1 ($array) must be of type array, int given -array_diff_key(): Argument #1 ($array) must be of type array, int given - ---int -12345-- -array_diff_key(): Argument #1 ($array) must be of type array, int given -array_diff_key(): Argument #1 ($array) must be of type array, int given - ---float 10.5-- -array_diff_key(): Argument #1 ($array) must be of type array, float given -array_diff_key(): Argument #1 ($array) must be of type array, float given - ---float -10.5-- -array_diff_key(): Argument #1 ($array) must be of type array, float given -array_diff_key(): Argument #1 ($array) must be of type array, float given - ---float 12.3456789000e10-- -array_diff_key(): Argument #1 ($array) must be of type array, float given -array_diff_key(): Argument #1 ($array) must be of type array, float given - ---float -12.3456789000e10-- -array_diff_key(): Argument #1 ($array) must be of type array, float given -array_diff_key(): Argument #1 ($array) must be of type array, float given - ---float .5-- -array_diff_key(): Argument #1 ($array) must be of type array, float given -array_diff_key(): Argument #1 ($array) must be of type array, float given - ---uppercase NULL-- -array_diff_key(): Argument #1 ($array) must be of type array, null given -array_diff_key(): Argument #1 ($array) must be of type array, null given - ---lowercase null-- -array_diff_key(): Argument #1 ($array) must be of type array, null given -array_diff_key(): Argument #1 ($array) must be of type array, null given - ---lowercase true-- -array_diff_key(): Argument #1 ($array) must be of type array, true given -array_diff_key(): Argument #1 ($array) must be of type array, true given - ---lowercase false-- -array_diff_key(): Argument #1 ($array) must be of type array, false given -array_diff_key(): Argument #1 ($array) must be of type array, false given - ---uppercase TRUE-- -array_diff_key(): Argument #1 ($array) must be of type array, true given -array_diff_key(): Argument #1 ($array) must be of type array, true given - ---uppercase FALSE-- -array_diff_key(): Argument #1 ($array) must be of type array, false given -array_diff_key(): Argument #1 ($array) must be of type array, false given - ---empty string DQ-- -array_diff_key(): Argument #1 ($array) must be of type array, string given -array_diff_key(): Argument #1 ($array) must be of type array, string given - ---empty string SQ-- -array_diff_key(): Argument #1 ($array) must be of type array, string given -array_diff_key(): Argument #1 ($array) must be of type array, string given - ---string DQ-- -array_diff_key(): Argument #1 ($array) must be of type array, string given -array_diff_key(): Argument #1 ($array) must be of type array, string given - ---string SQ-- -array_diff_key(): Argument #1 ($array) must be of type array, string given -array_diff_key(): Argument #1 ($array) must be of type array, string given - ---mixed case string-- -array_diff_key(): Argument #1 ($array) must be of type array, string given -array_diff_key(): Argument #1 ($array) must be of type array, string given - ---heredoc-- -array_diff_key(): Argument #1 ($array) must be of type array, string given -array_diff_key(): Argument #1 ($array) must be of type array, string given - ---instance of classWithToString-- -array_diff_key(): Argument #1 ($array) must be of type array, classWithToString given -array_diff_key(): Argument #1 ($array) must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_diff_key(): Argument #1 ($array) must be of type array, classWithoutToString given -array_diff_key(): Argument #1 ($array) must be of type array, classWithoutToString given - ---undefined var-- -array_diff_key(): Argument #1 ($array) must be of type array, null given -array_diff_key(): Argument #1 ($array) must be of type array, null given - ---unset var-- -array_diff_key(): Argument #1 ($array) must be of type array, null given -array_diff_key(): Argument #1 ($array) must be of type array, null given - ---resource-- -array_diff_key(): Argument #1 ($array) must be of type array, resource given -array_diff_key(): Argument #1 ($array) must be of type array, resource given diff --git a/ext/standard/tests/array/array_diff_key_variation2.phpt b/ext/standard/tests/array/array_diff_key_variation2.phpt deleted file mode 100644 index b7093606c60a..000000000000 --- a/ext/standard/tests/array/array_diff_key_variation2.phpt +++ /dev/null @@ -1,208 +0,0 @@ ---TEST-- -Test array_diff_key() function : usage variation - Passing unexpected values to second argument ---FILE-- - 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); -$array3 = array(1, 2, 3, 4, 5); - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//resource variable -$fp = fopen(__FILE__, "r"); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = << 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -12345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource data - 'resource' => $fp, -); - -// loop through each element of the array for array1 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_diff_key($array1, $value) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - try { - var_dump( array_diff_key($array1, $value, $array3) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -fclose($fp); -?> ---EXPECT-- -*** Testing array_diff_key() : usage variation *** - ---int 0-- -array_diff_key(): Argument #2 must be of type array, int given -array_diff_key(): Argument #2 must be of type array, int given - ---int 1-- -array_diff_key(): Argument #2 must be of type array, int given -array_diff_key(): Argument #2 must be of type array, int given - ---int 12345-- -array_diff_key(): Argument #2 must be of type array, int given -array_diff_key(): Argument #2 must be of type array, int given - ---int -12345-- -array_diff_key(): Argument #2 must be of type array, int given -array_diff_key(): Argument #2 must be of type array, int given - ---float 10.5-- -array_diff_key(): Argument #2 must be of type array, float given -array_diff_key(): Argument #2 must be of type array, float given - ---float -10.5-- -array_diff_key(): Argument #2 must be of type array, float given -array_diff_key(): Argument #2 must be of type array, float given - ---float 12.3456789000e10-- -array_diff_key(): Argument #2 must be of type array, float given -array_diff_key(): Argument #2 must be of type array, float given - ---float -12.3456789000e10-- -array_diff_key(): Argument #2 must be of type array, float given -array_diff_key(): Argument #2 must be of type array, float given - ---float .5-- -array_diff_key(): Argument #2 must be of type array, float given -array_diff_key(): Argument #2 must be of type array, float given - ---uppercase NULL-- -array_diff_key(): Argument #2 must be of type array, null given -array_diff_key(): Argument #2 must be of type array, null given - ---lowercase null-- -array_diff_key(): Argument #2 must be of type array, null given -array_diff_key(): Argument #2 must be of type array, null given - ---lowercase true-- -array_diff_key(): Argument #2 must be of type array, true given -array_diff_key(): Argument #2 must be of type array, true given - ---lowercase false-- -array_diff_key(): Argument #2 must be of type array, false given -array_diff_key(): Argument #2 must be of type array, false given - ---uppercase TRUE-- -array_diff_key(): Argument #2 must be of type array, true given -array_diff_key(): Argument #2 must be of type array, true given - ---uppercase FALSE-- -array_diff_key(): Argument #2 must be of type array, false given -array_diff_key(): Argument #2 must be of type array, false given - ---empty string DQ-- -array_diff_key(): Argument #2 must be of type array, string given -array_diff_key(): Argument #2 must be of type array, string given - ---empty string SQ-- -array_diff_key(): Argument #2 must be of type array, string given -array_diff_key(): Argument #2 must be of type array, string given - ---string DQ-- -array_diff_key(): Argument #2 must be of type array, string given -array_diff_key(): Argument #2 must be of type array, string given - ---string SQ-- -array_diff_key(): Argument #2 must be of type array, string given -array_diff_key(): Argument #2 must be of type array, string given - ---mixed case string-- -array_diff_key(): Argument #2 must be of type array, string given -array_diff_key(): Argument #2 must be of type array, string given - ---heredoc-- -array_diff_key(): Argument #2 must be of type array, string given -array_diff_key(): Argument #2 must be of type array, string given - ---instance of classWithToString-- -array_diff_key(): Argument #2 must be of type array, classWithToString given -array_diff_key(): Argument #2 must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_diff_key(): Argument #2 must be of type array, classWithoutToString given -array_diff_key(): Argument #2 must be of type array, classWithoutToString given - ---undefined var-- -array_diff_key(): Argument #2 must be of type array, null given -array_diff_key(): Argument #2 must be of type array, null given - ---unset var-- -array_diff_key(): Argument #2 must be of type array, null given -array_diff_key(): Argument #2 must be of type array, null given - ---resource-- -array_diff_key(): Argument #2 must be of type array, resource given -array_diff_key(): Argument #2 must be of type array, resource given diff --git a/ext/standard/tests/array/array_diff_uassoc_error.phpt b/ext/standard/tests/array/array_diff_uassoc_error.phpt deleted file mode 100644 index 1d158dc2d49c..000000000000 --- a/ext/standard/tests/array/array_diff_uassoc_error.phpt +++ /dev/null @@ -1,52 +0,0 @@ ---TEST-- -Test array_diff_uassoc() function : error conditions ---FILE-- - "green", "b" => "brown", "c" => "blue", "red"); -$array2 = array("a" => "green", "yellow", "red"); -$array3 = array("a" => "green", "red"); -$array4 = array(); -$extra_arg = array(1, 2, 3, 4); - -function key_compare_func($a, $b) -{ - if ($a === $b) { - return 0; - } - return ($a > $b)? 1:-1; -} - -//Test array_diff_uassoc with one more than the expected number of arguments -echo "\n-- Testing array_diff_uassoc() function with more than expected no. of arguments --\n"; -try { - var_dump( array_diff_uassoc($array1, $array2, "key_compare_func", $extra_arg) ); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} -try { - var_dump( array_diff_uassoc($array1, $array2, $array3, $array4, "key_compare_func", $extra_arg) ); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -// Testing array_diff_uassoc with one less than the expected number of arguments -echo "\n-- Testing array_diff_uassoc() function with less than expected no. of arguments --\n"; -try { - var_dump( array_diff_uassoc($array1, $array2) ); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -?> ---EXPECT-- -*** Testing array_diff_uassoc() : error conditions *** - --- Testing array_diff_uassoc() function with more than expected no. of arguments -- -array_diff_uassoc(): Argument #4 must be a valid callback, array callback must have exactly two members -array_diff_uassoc(): Argument #6 must be a valid callback, array callback must have exactly two members - --- Testing array_diff_uassoc() function with less than expected no. of arguments -- -array_diff_uassoc(): Argument #2 must be a valid callback, array callback must have exactly two members diff --git a/ext/standard/tests/array/array_diff_uassoc_variation1.phpt b/ext/standard/tests/array/array_diff_uassoc_variation1.phpt deleted file mode 100644 index 49d6903a90ea..000000000000 --- a/ext/standard/tests/array/array_diff_uassoc_variation1.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test array_diff_uassoc() function : usage variation - Passing unexpected values to first argument ---FILE-- - "green", "yellow", "red"); - -function key_compare_func($a, $b) -{ - if ($a === $b) { - return 0; - } - return ($a > $b)? 1:-1; -} - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//resource variable -$fp = fopen(__FILE__, "r"); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = << 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource data - 'resource' => $fp, -); - -// loop through each element of the array for array1 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_diff_uassoc($value, $array2, "key_compare_func") ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -fclose($fp); -?> ---EXPECT-- -*** Testing array_diff_uassoc() : usage variation *** - ---int 0-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, int given - ---int 1-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, int given - ---int 12345-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, int given - ---int -12345-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, int given - ---float 10.5-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, float given - ---float -10.5-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, float given - ---float 12.3456789000e10-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, float given - ---float -12.3456789000e10-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, float given - ---float .5-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, float given - ---uppercase NULL-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, null given - ---lowercase null-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, null given - ---lowercase true-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, true given - ---lowercase false-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, false given - ---uppercase TRUE-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, true given - ---uppercase FALSE-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, false given - ---empty string DQ-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, string given - ---empty string SQ-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, string given - ---string DQ-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, string given - ---string SQ-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, string given - ---mixed case string-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, string given - ---heredoc-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, string given - ---instance of classWithToString-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, classWithoutToString given - ---undefined var-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, null given - ---unset var-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, null given - ---resource-- -array_diff_uassoc(): Argument #1 ($array) must be of type array, resource given diff --git a/ext/standard/tests/array/array_diff_uassoc_variation2.phpt b/ext/standard/tests/array/array_diff_uassoc_variation2.phpt deleted file mode 100644 index 7466da23d426..000000000000 --- a/ext/standard/tests/array/array_diff_uassoc_variation2.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test array_diff_uassoc() function : usage variation -Passing unexpected values to second argument ---FILE-- - "green", "b" => "brown", "c" => "blue", "red"); - -function key_compare_func($a, $b) -{ - if ($a === $b) { - return 0; - } - return ($a > $b)? 1:-1; -} - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//resource variable -$fp = fopen(__FILE__, "r"); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = << 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource data - 'resource' => $fp, -); - -// loop through each element of the array for array2 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_diff_uassoc($array1, $value, "key_compare_func") ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -fclose($fp); -?> ---EXPECT-- -*** Testing array_diff_uassoc() : usage variation *** - ---int 0-- -array_diff_uassoc(): Argument #2 must be of type array, int given - ---int 1-- -array_diff_uassoc(): Argument #2 must be of type array, int given - ---int 12345-- -array_diff_uassoc(): Argument #2 must be of type array, int given - ---int -12345-- -array_diff_uassoc(): Argument #2 must be of type array, int given - ---float 10.5-- -array_diff_uassoc(): Argument #2 must be of type array, float given - ---float -10.5-- -array_diff_uassoc(): Argument #2 must be of type array, float given - ---float 12.3456789000e10-- -array_diff_uassoc(): Argument #2 must be of type array, float given - ---float -12.3456789000e10-- -array_diff_uassoc(): Argument #2 must be of type array, float given - ---float .5-- -array_diff_uassoc(): Argument #2 must be of type array, float given - ---uppercase NULL-- -array_diff_uassoc(): Argument #2 must be of type array, null given - ---lowercase null-- -array_diff_uassoc(): Argument #2 must be of type array, null given - ---lowercase true-- -array_diff_uassoc(): Argument #2 must be of type array, true given - ---lowercase false-- -array_diff_uassoc(): Argument #2 must be of type array, false given - ---uppercase TRUE-- -array_diff_uassoc(): Argument #2 must be of type array, true given - ---uppercase FALSE-- -array_diff_uassoc(): Argument #2 must be of type array, false given - ---empty string DQ-- -array_diff_uassoc(): Argument #2 must be of type array, string given - ---empty string SQ-- -array_diff_uassoc(): Argument #2 must be of type array, string given - ---string DQ-- -array_diff_uassoc(): Argument #2 must be of type array, string given - ---string SQ-- -array_diff_uassoc(): Argument #2 must be of type array, string given - ---mixed case string-- -array_diff_uassoc(): Argument #2 must be of type array, string given - ---heredoc-- -array_diff_uassoc(): Argument #2 must be of type array, string given - ---instance of classWithToString-- -array_diff_uassoc(): Argument #2 must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_diff_uassoc(): Argument #2 must be of type array, classWithoutToString given - ---undefined var-- -array_diff_uassoc(): Argument #2 must be of type array, null given - ---unset var-- -array_diff_uassoc(): Argument #2 must be of type array, null given - ---resource-- -array_diff_uassoc(): Argument #2 must be of type array, resource given diff --git a/ext/standard/tests/array/array_diff_ukey_variation1.phpt b/ext/standard/tests/array/array_diff_ukey_variation1.phpt deleted file mode 100644 index 125406497eda..000000000000 --- a/ext/standard/tests/array/array_diff_ukey_variation1.phpt +++ /dev/null @@ -1,215 +0,0 @@ ---TEST-- -Test array_diff_ukey() function : usage variation - Passing unexpected values to first argument ---FILE-- - 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); -$array3 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); - -function key_compare_func($key1, $key2) -{ - if ($key1 == $key2) { - return 0; - } - return ($key1 > $key2)? 1:-1; -} - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//resource variable -$fp = fopen(__FILE__, "r"); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = << 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource data - 'resource' => $fp, -); - -// loop through each element of the array for array1 -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_diff_ukey($value, $array2, 'key_compare_func') ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - try { - var_dump( array_diff_ukey($value, $array2, $array3, 'key_compare_func') ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -fclose($fp); -?> ---EXPECT-- -*** Testing array_diff_ukey() : usage variation *** - ---int 0-- -array_diff_ukey(): Argument #1 ($array) must be of type array, int given -array_diff_ukey(): Argument #1 ($array) must be of type array, int given - ---int 1-- -array_diff_ukey(): Argument #1 ($array) must be of type array, int given -array_diff_ukey(): Argument #1 ($array) must be of type array, int given - ---int 12345-- -array_diff_ukey(): Argument #1 ($array) must be of type array, int given -array_diff_ukey(): Argument #1 ($array) must be of type array, int given - ---int -12345-- -array_diff_ukey(): Argument #1 ($array) must be of type array, int given -array_diff_ukey(): Argument #1 ($array) must be of type array, int given - ---float 10.5-- -array_diff_ukey(): Argument #1 ($array) must be of type array, float given -array_diff_ukey(): Argument #1 ($array) must be of type array, float given - ---float -10.5-- -array_diff_ukey(): Argument #1 ($array) must be of type array, float given -array_diff_ukey(): Argument #1 ($array) must be of type array, float given - ---float 12.3456789000e10-- -array_diff_ukey(): Argument #1 ($array) must be of type array, float given -array_diff_ukey(): Argument #1 ($array) must be of type array, float given - ---float -12.3456789000e10-- -array_diff_ukey(): Argument #1 ($array) must be of type array, float given -array_diff_ukey(): Argument #1 ($array) must be of type array, float given - ---float .5-- -array_diff_ukey(): Argument #1 ($array) must be of type array, float given -array_diff_ukey(): Argument #1 ($array) must be of type array, float given - ---uppercase NULL-- -array_diff_ukey(): Argument #1 ($array) must be of type array, null given -array_diff_ukey(): Argument #1 ($array) must be of type array, null given - ---lowercase null-- -array_diff_ukey(): Argument #1 ($array) must be of type array, null given -array_diff_ukey(): Argument #1 ($array) must be of type array, null given - ---lowercase true-- -array_diff_ukey(): Argument #1 ($array) must be of type array, true given -array_diff_ukey(): Argument #1 ($array) must be of type array, true given - ---lowercase false-- -array_diff_ukey(): Argument #1 ($array) must be of type array, false given -array_diff_ukey(): Argument #1 ($array) must be of type array, false given - ---uppercase TRUE-- -array_diff_ukey(): Argument #1 ($array) must be of type array, true given -array_diff_ukey(): Argument #1 ($array) must be of type array, true given - ---uppercase FALSE-- -array_diff_ukey(): Argument #1 ($array) must be of type array, false given -array_diff_ukey(): Argument #1 ($array) must be of type array, false given - ---empty string DQ-- -array_diff_ukey(): Argument #1 ($array) must be of type array, string given -array_diff_ukey(): Argument #1 ($array) must be of type array, string given - ---empty string SQ-- -array_diff_ukey(): Argument #1 ($array) must be of type array, string given -array_diff_ukey(): Argument #1 ($array) must be of type array, string given - ---string DQ-- -array_diff_ukey(): Argument #1 ($array) must be of type array, string given -array_diff_ukey(): Argument #1 ($array) must be of type array, string given - ---string SQ-- -array_diff_ukey(): Argument #1 ($array) must be of type array, string given -array_diff_ukey(): Argument #1 ($array) must be of type array, string given - ---mixed case string-- -array_diff_ukey(): Argument #1 ($array) must be of type array, string given -array_diff_ukey(): Argument #1 ($array) must be of type array, string given - ---heredoc-- -array_diff_ukey(): Argument #1 ($array) must be of type array, string given -array_diff_ukey(): Argument #1 ($array) must be of type array, string given - ---instance of classWithToString-- -array_diff_ukey(): Argument #1 ($array) must be of type array, classWithToString given -array_diff_ukey(): Argument #1 ($array) must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_diff_ukey(): Argument #1 ($array) must be of type array, classWithoutToString given -array_diff_ukey(): Argument #1 ($array) must be of type array, classWithoutToString given - ---undefined var-- -array_diff_ukey(): Argument #1 ($array) must be of type array, null given -array_diff_ukey(): Argument #1 ($array) must be of type array, null given - ---unset var-- -array_diff_ukey(): Argument #1 ($array) must be of type array, null given -array_diff_ukey(): Argument #1 ($array) must be of type array, null given - ---resource-- -array_diff_ukey(): Argument #1 ($array) must be of type array, resource given -array_diff_ukey(): Argument #1 ($array) must be of type array, resource given diff --git a/ext/standard/tests/array/array_diff_ukey_variation10.phpt b/ext/standard/tests/array/array_diff_ukey_variation10.phpt deleted file mode 100644 index b8dfb73873bb..000000000000 --- a/ext/standard/tests/array/array_diff_ukey_variation10.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Test array_diff_ukey() function : usage variation - Passing non-existing function name to callback ---FILE-- - "green", "b" => "brown", "c" => "blue", "red"); -$array2 = array("a" => "green", "yellow", "red"); - -//function name within double quotes -try { - var_dump( array_diff_ukey($array1, $array1, "unknown_function") ); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -//function name within single quotes -try { - var_dump( array_diff_ukey($array1, $array1, 'unknown_function') ); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -?> ---EXPECT-- -*** Testing array_diff_ukey() : usage variation *** -array_diff_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid function name -array_diff_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid function name diff --git a/ext/standard/tests/array/array_diff_ukey_variation2.phpt b/ext/standard/tests/array/array_diff_ukey_variation2.phpt deleted file mode 100644 index cf71a26d22be..000000000000 --- a/ext/standard/tests/array/array_diff_ukey_variation2.phpt +++ /dev/null @@ -1,219 +0,0 @@ ---TEST-- -Test array_diff_ukey() function : usage variation - Passing unexpected values to second argument ---FILE-- - 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); -$array3 = array('blue' => 1, 'red' => 2, 'green' => 3, 'purple' => 4); - - -//Initialize key_comp_func of type callback -function key_compare_func($key1, $key2) -{ - if ($key1 == $key2) { - return 0; - } - return ($key1 > $key2)? 1:-1; -} - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -//resource variable -$fp = fopen(__FILE__, "r"); - -// define some classes -class classWithToString -{ - public function __toString() { - return "Class A object"; - } -} - -class classWithoutToString -{ -} - -// heredoc string -$heredoc = << 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, - - // resource data - 'resource' => $fp, - -); - -// loop through each element of the array for array2 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_diff_ukey($array1, $value, 'key_compare_func') ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - try { - var_dump( array_diff_ukey($array1, $value, $array3, 'key_compare_func') ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -fclose($fp); -?> ---EXPECT-- -*** Testing array_diff_ukey() : usage variation *** - ---int 0-- -array_diff_ukey(): Argument #2 must be of type array, int given -array_diff_ukey(): Argument #2 must be of type array, int given - ---int 1-- -array_diff_ukey(): Argument #2 must be of type array, int given -array_diff_ukey(): Argument #2 must be of type array, int given - ---int 12345-- -array_diff_ukey(): Argument #2 must be of type array, int given -array_diff_ukey(): Argument #2 must be of type array, int given - ---int -12345-- -array_diff_ukey(): Argument #2 must be of type array, int given -array_diff_ukey(): Argument #2 must be of type array, int given - ---float 10.5-- -array_diff_ukey(): Argument #2 must be of type array, float given -array_diff_ukey(): Argument #2 must be of type array, float given - ---float -10.5-- -array_diff_ukey(): Argument #2 must be of type array, float given -array_diff_ukey(): Argument #2 must be of type array, float given - ---float 12.3456789000e10-- -array_diff_ukey(): Argument #2 must be of type array, float given -array_diff_ukey(): Argument #2 must be of type array, float given - ---float -12.3456789000e10-- -array_diff_ukey(): Argument #2 must be of type array, float given -array_diff_ukey(): Argument #2 must be of type array, float given - ---float .5-- -array_diff_ukey(): Argument #2 must be of type array, float given -array_diff_ukey(): Argument #2 must be of type array, float given - ---uppercase NULL-- -array_diff_ukey(): Argument #2 must be of type array, null given -array_diff_ukey(): Argument #2 must be of type array, null given - ---lowercase null-- -array_diff_ukey(): Argument #2 must be of type array, null given -array_diff_ukey(): Argument #2 must be of type array, null given - ---lowercase true-- -array_diff_ukey(): Argument #2 must be of type array, true given -array_diff_ukey(): Argument #2 must be of type array, true given - ---lowercase false-- -array_diff_ukey(): Argument #2 must be of type array, false given -array_diff_ukey(): Argument #2 must be of type array, false given - ---uppercase TRUE-- -array_diff_ukey(): Argument #2 must be of type array, true given -array_diff_ukey(): Argument #2 must be of type array, true given - ---uppercase FALSE-- -array_diff_ukey(): Argument #2 must be of type array, false given -array_diff_ukey(): Argument #2 must be of type array, false given - ---empty string DQ-- -array_diff_ukey(): Argument #2 must be of type array, string given -array_diff_ukey(): Argument #2 must be of type array, string given - ---empty string SQ-- -array_diff_ukey(): Argument #2 must be of type array, string given -array_diff_ukey(): Argument #2 must be of type array, string given - ---string DQ-- -array_diff_ukey(): Argument #2 must be of type array, string given -array_diff_ukey(): Argument #2 must be of type array, string given - ---string SQ-- -array_diff_ukey(): Argument #2 must be of type array, string given -array_diff_ukey(): Argument #2 must be of type array, string given - ---mixed case string-- -array_diff_ukey(): Argument #2 must be of type array, string given -array_diff_ukey(): Argument #2 must be of type array, string given - ---heredoc-- -array_diff_ukey(): Argument #2 must be of type array, string given -array_diff_ukey(): Argument #2 must be of type array, string given - ---instance of classWithToString-- -array_diff_ukey(): Argument #2 must be of type array, classWithToString given -array_diff_ukey(): Argument #2 must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_diff_ukey(): Argument #2 must be of type array, classWithoutToString given -array_diff_ukey(): Argument #2 must be of type array, classWithoutToString given - ---undefined var-- -array_diff_ukey(): Argument #2 must be of type array, null given -array_diff_ukey(): Argument #2 must be of type array, null given - ---unset var-- -array_diff_ukey(): Argument #2 must be of type array, null given -array_diff_ukey(): Argument #2 must be of type array, null given - ---resource-- -array_diff_ukey(): Argument #2 must be of type array, resource given -array_diff_ukey(): Argument #2 must be of type array, resource given diff --git a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt b/ext/standard/tests/array/array_intersect_ukey_variation8.phpt deleted file mode 100644 index 71126a1eddfa..000000000000 --- a/ext/standard/tests/array/array_intersect_ukey_variation8.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Test array_intersect_ukey() function : usage variation - Passing non-existing function name to callback ---FILE-- - 1, 'red' => 2, 'green' => 3, 'purple' => 4); -$array2 = array('green' => 5, 'blue' => 6, 'yellow' => 7, 'cyan' => 8); - -//function name within double quotes -try { - var_dump( array_intersect_ukey($array1, $array2, "unknown_function") ); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -//function name within single quotes -try { - var_dump( array_intersect_ukey($array1, $array2, 'unknown_function') ); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -?> ---EXPECT-- -*** Testing array_intersect_ukey() : usage variation *** -array_intersect_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid function name -array_intersect_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid function name diff --git a/ext/standard/tests/array/array_intersect_variation2.phpt b/ext/standard/tests/array/array_intersect_variation2.phpt deleted file mode 100644 index b09683446b87..000000000000 --- a/ext/standard/tests/array/array_intersect_variation2.phpt +++ /dev/null @@ -1,188 +0,0 @@ ---TEST-- -Test array_intersect() function : usage variations - unexpected values for 'array2' argument ---FILE-- - 1, "two" => 2); - -// get an unset variable -$unset_var = 10; -unset ($unset_var); - -// get a class -class classA -{ - public function __toString() { - return "Class A object"; - } -} - -// heredoc string -$heredoc = <<getMessage(), "\n"; - } - - // Calling array_intersect() with more arguments - try { - var_dump( array_intersect($array1, $unexpected_value, $arr3) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - - $iterator++; -} - -// close the file resource used -fclose($fp); - -echo "Done"; -?> ---EXPECT-- -*** Testing array_intersect() : Passing non-array values to $array2 argument *** - --- Iterator 1 --array_intersect(): Argument #2 must be of type array, int given -array_intersect(): Argument #2 must be of type array, int given - --- Iterator 2 --array_intersect(): Argument #2 must be of type array, int given -array_intersect(): Argument #2 must be of type array, int given - --- Iterator 3 --array_intersect(): Argument #2 must be of type array, int given -array_intersect(): Argument #2 must be of type array, int given - --- Iterator 4 --array_intersect(): Argument #2 must be of type array, int given -array_intersect(): Argument #2 must be of type array, int given - --- Iterator 5 --array_intersect(): Argument #2 must be of type array, float given -array_intersect(): Argument #2 must be of type array, float given - --- Iterator 6 --array_intersect(): Argument #2 must be of type array, float given -array_intersect(): Argument #2 must be of type array, float given - --- Iterator 7 --array_intersect(): Argument #2 must be of type array, float given -array_intersect(): Argument #2 must be of type array, float given - --- Iterator 8 --array_intersect(): Argument #2 must be of type array, float given -array_intersect(): Argument #2 must be of type array, float given - --- Iterator 9 --array_intersect(): Argument #2 must be of type array, float given -array_intersect(): Argument #2 must be of type array, float given - --- Iterator 10 --array_intersect(): Argument #2 must be of type array, null given -array_intersect(): Argument #2 must be of type array, null given - --- Iterator 11 --array_intersect(): Argument #2 must be of type array, null given -array_intersect(): Argument #2 must be of type array, null given - --- Iterator 12 --array_intersect(): Argument #2 must be of type array, true given -array_intersect(): Argument #2 must be of type array, true given - --- Iterator 13 --array_intersect(): Argument #2 must be of type array, false given -array_intersect(): Argument #2 must be of type array, false given - --- Iterator 14 --array_intersect(): Argument #2 must be of type array, true given -array_intersect(): Argument #2 must be of type array, true given - --- Iterator 15 --array_intersect(): Argument #2 must be of type array, false given -array_intersect(): Argument #2 must be of type array, false given - --- Iterator 16 --array_intersect(): Argument #2 must be of type array, string given -array_intersect(): Argument #2 must be of type array, string given - --- Iterator 17 --array_intersect(): Argument #2 must be of type array, string given -array_intersect(): Argument #2 must be of type array, string given - --- Iterator 18 --array_intersect(): Argument #2 must be of type array, string given -array_intersect(): Argument #2 must be of type array, string given - --- Iterator 19 --array_intersect(): Argument #2 must be of type array, string given -array_intersect(): Argument #2 must be of type array, string given - --- Iterator 20 --array_intersect(): Argument #2 must be of type array, string given -array_intersect(): Argument #2 must be of type array, string given - --- Iterator 21 --array_intersect(): Argument #2 must be of type array, classA given -array_intersect(): Argument #2 must be of type array, classA given - --- Iterator 22 --array_intersect(): Argument #2 must be of type array, null given -array_intersect(): Argument #2 must be of type array, null given - --- Iterator 23 --array_intersect(): Argument #2 must be of type array, null given -array_intersect(): Argument #2 must be of type array, null given - --- Iterator 24 --array_intersect(): Argument #2 must be of type array, resource given -array_intersect(): Argument #2 must be of type array, resource given -Done diff --git a/ext/standard/tests/array/array_map_variation15.phpt b/ext/standard/tests/array/array_map_variation15.phpt deleted file mode 100644 index d053a7204639..000000000000 --- a/ext/standard/tests/array/array_map_variation15.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Test array_map() function : usage variations - non existent 'callback' function ---FILE-- -getMessage(), "\n"; -} - -echo "Done"; -?> ---EXPECT-- -*** Testing array_map() : non existent 'callback' function *** -array_map(): Argument #1 ($callback) must be a valid callback or null, function "non_existent" not found or invalid function name -Done diff --git a/ext/standard/tests/array/array_map_variation17.phpt b/ext/standard/tests/array/array_map_variation17.phpt deleted file mode 100644 index 751167baa04a..000000000000 --- a/ext/standard/tests/array/array_map_variation17.phpt +++ /dev/null @@ -1,137 +0,0 @@ ---TEST-- -Test array_map() function : usage variations - unexpected values for 'callback' argument ---FILE-- -getMessage(), "\n"; - } -}; - -fclose($fp); -echo "Done"; -?> ---EXPECT-- -*** Testing array_map() : unexpected values for 'callback' argument *** - --- Iteration 1 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 2 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 3 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 4 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 5 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 6 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 7 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 8 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 9 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 10 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 11 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 12 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 13 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 14 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, function "" not found or invalid function name - --- Iteration 15 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, function "" not found or invalid function name - --- Iteration 16 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, array callback must have exactly two members - --- Iteration 17 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, first array member is not a valid class name or object - --- Iteration 18 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, first array member is not a valid class name or object - --- Iteration 19 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given - --- Iteration 20 -- -array_map(): Argument #1 ($callback) must be a valid callback or null, no array or string given -Done diff --git a/ext/standard/tests/array/array_merge_recursive_variation1.phpt b/ext/standard/tests/array/array_merge_recursive_variation1.phpt deleted file mode 100644 index 121f7969d43c..000000000000 --- a/ext/standard/tests/array/array_merge_recursive_variation1.phpt +++ /dev/null @@ -1,210 +0,0 @@ ---TEST-- -Test array_merge_recursive() function : usage variations - unexpected values for $arr1 argument ---FILE-- -getMessage(), "\n"; - } - - // with more arguments - echo "-- With more arguments --"; - try { - var_dump( array_merge_recursive($arr1, $arr2) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } - - $iterator++; -} - -// close the file resource used -fclose($fp); - -echo "Done"; -?> ---EXPECT-- -*** Testing array_merge_recursive() : Passing non array values to $arr1 argument *** - --- Iteration 1 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, int given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, int given - --- Iteration 2 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, int given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, int given - --- Iteration 3 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, int given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, int given - --- Iteration 4 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, int given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, int given - --- Iteration 5 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, float given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, float given - --- Iteration 6 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, float given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, float given - --- Iteration 7 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, float given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, float given - --- Iteration 8 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, float given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, float given - --- Iteration 9 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, float given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, float given - --- Iteration 10 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, null given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, null given - --- Iteration 11 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, null given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, null given - --- Iteration 12 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, true given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, true given - --- Iteration 13 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, false given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, false given - --- Iteration 14 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, true given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, true given - --- Iteration 15 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, false given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, false given - --- Iteration 16 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, string given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, string given - --- Iteration 17 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, string given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, string given - --- Iteration 18 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, string given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, string given - --- Iteration 19 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, string given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, string given - --- Iteration 20 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, string given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, string given - --- Iteration 21 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, null given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, null given - --- Iteration 22 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, null given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, null given - --- Iteration 23 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, resource given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, resource given - --- Iteration 24 -- --- With default argument --array_merge_recursive(): Argument #1 must be of type array, A given --- With more arguments --array_merge_recursive(): Argument #1 must be of type array, A given -Done diff --git a/ext/standard/tests/array/array_merge_recursive_variation2.phpt b/ext/standard/tests/array/array_merge_recursive_variation2.phpt deleted file mode 100644 index 4588d8d160aa..000000000000 --- a/ext/standard/tests/array/array_merge_recursive_variation2.phpt +++ /dev/null @@ -1,150 +0,0 @@ ---TEST-- -Test array_merge_recursive() function : usage variations - unexpected values for $arr2 argument ---FILE-- -getMessage(), "\n"; - } - $iterator++; -} - -// close the file resource used -fclose($fp); - -echo "Done"; -?> ---EXPECT-- -*** Testing array_merge_recursive() : Passing non array values to $arr2 argument *** - --- Iteration 1 --array_merge_recursive(): Argument #2 must be of type array, int given - --- Iteration 2 --array_merge_recursive(): Argument #2 must be of type array, int given - --- Iteration 3 --array_merge_recursive(): Argument #2 must be of type array, int given - --- Iteration 4 --array_merge_recursive(): Argument #2 must be of type array, int given - --- Iteration 5 --array_merge_recursive(): Argument #2 must be of type array, float given - --- Iteration 6 --array_merge_recursive(): Argument #2 must be of type array, float given - --- Iteration 7 --array_merge_recursive(): Argument #2 must be of type array, float given - --- Iteration 8 --array_merge_recursive(): Argument #2 must be of type array, float given - --- Iteration 9 --array_merge_recursive(): Argument #2 must be of type array, float given - --- Iteration 10 --array_merge_recursive(): Argument #2 must be of type array, null given - --- Iteration 11 --array_merge_recursive(): Argument #2 must be of type array, null given - --- Iteration 12 --array_merge_recursive(): Argument #2 must be of type array, true given - --- Iteration 13 --array_merge_recursive(): Argument #2 must be of type array, false given - --- Iteration 14 --array_merge_recursive(): Argument #2 must be of type array, true given - --- Iteration 15 --array_merge_recursive(): Argument #2 must be of type array, false given - --- Iteration 16 --array_merge_recursive(): Argument #2 must be of type array, string given - --- Iteration 17 --array_merge_recursive(): Argument #2 must be of type array, string given - --- Iteration 18 --array_merge_recursive(): Argument #2 must be of type array, string given - --- Iteration 19 --array_merge_recursive(): Argument #2 must be of type array, string given - --- Iteration 20 --array_merge_recursive(): Argument #2 must be of type array, string given - --- Iteration 21 --array_merge_recursive(): Argument #2 must be of type array, null given - --- Iteration 22 --array_merge_recursive(): Argument #2 must be of type array, null given - --- Iteration 23 --array_merge_recursive(): Argument #2 must be of type array, resource given - --- Iteration 24 --array_merge_recursive(): Argument #2 must be of type array, A given -Done diff --git a/ext/standard/tests/array/array_merge_variation1.phpt b/ext/standard/tests/array/array_merge_variation1.phpt deleted file mode 100644 index 47045017fa67..000000000000 --- a/ext/standard/tests/array/array_merge_variation1.phpt +++ /dev/null @@ -1,104 +0,0 @@ ---TEST-- -Test array_merge() function : usage variations - Pass different data types to $arr1 arg ---FILE-- - ---EXPECTF-- -*** Testing array_merge() : usage variations *** - --- Iteration 1 -- - -Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, int given in %s:%d -Stack trace: -#0 %s(%d): array_merge(0, Array) -#1 {main} - thrown in %s on line %d diff --git a/ext/standard/tests/array/array_merge_variation2.phpt b/ext/standard/tests/array/array_merge_variation2.phpt deleted file mode 100644 index 2ef55565742f..000000000000 --- a/ext/standard/tests/array/array_merge_variation2.phpt +++ /dev/null @@ -1,181 +0,0 @@ ---TEST-- -Test array_merge() function : usage variations - Pass different data types as $arr2 arg ---FILE-- -getMessage(), "\n"; - } - $iterator++; -}; - -fclose($fp); - -echo "Done"; -?> ---EXPECT-- -*** Testing array_merge() : usage variations *** - --- Iteration 1 -- -array_merge(): Argument #2 must be of type array, int given - --- Iteration 2 -- -array_merge(): Argument #2 must be of type array, int given - --- Iteration 3 -- -array_merge(): Argument #2 must be of type array, int given - --- Iteration 4 -- -array_merge(): Argument #2 must be of type array, int given - --- Iteration 5 -- -array_merge(): Argument #2 must be of type array, float given - --- Iteration 6 -- -array_merge(): Argument #2 must be of type array, float given - --- Iteration 7 -- -array_merge(): Argument #2 must be of type array, float given - --- Iteration 8 -- -array_merge(): Argument #2 must be of type array, float given - --- Iteration 9 -- -array_merge(): Argument #2 must be of type array, float given - --- Iteration 10 -- -array_merge(): Argument #2 must be of type array, null given - --- Iteration 11 -- -array_merge(): Argument #2 must be of type array, null given - --- Iteration 12 -- -array_merge(): Argument #2 must be of type array, true given - --- Iteration 13 -- -array_merge(): Argument #2 must be of type array, false given - --- Iteration 14 -- -array_merge(): Argument #2 must be of type array, true given - --- Iteration 15 -- -array_merge(): Argument #2 must be of type array, false given - --- Iteration 16 -- -array_merge(): Argument #2 must be of type array, string given - --- Iteration 17 -- -array_merge(): Argument #2 must be of type array, string given - --- Iteration 18 -- -array(2) { - [0]=> - int(1) - [1]=> - int(2) -} - --- Iteration 19 -- -array_merge(): Argument #2 must be of type array, string given - --- Iteration 20 -- -array_merge(): Argument #2 must be of type array, string given - --- Iteration 21 -- -array_merge(): Argument #2 must be of type array, string given - --- Iteration 22 -- -array_merge(): Argument #2 must be of type array, classA given - --- Iteration 23 -- -array_merge(): Argument #2 must be of type array, null given - --- Iteration 24 -- -array_merge(): Argument #2 must be of type array, null given - --- Iteration 25 -- -array_merge(): Argument #2 must be of type array, resource given -Done diff --git a/ext/standard/tests/array/array_udiff_assoc_variation1.phpt b/ext/standard/tests/array/array_udiff_assoc_variation1.phpt deleted file mode 100644 index 3cc54bdc4e78..000000000000 --- a/ext/standard/tests/array/array_udiff_assoc_variation1.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test array_udiff_assoc() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array1 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_udiff_assoc($value, $array2, $key_comp_func) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -?> ---EXPECT-- -*** Testing array_udiff_assoc() : usage variation *** - ---int 0-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, int given - ---int 1-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, int given - ---int 12345-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, int given - ---int -12345-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, int given - ---float 10.5-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, float given - ---float -10.5-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, float given - ---float 12.3456789000e10-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, float given - ---float -12.3456789000e10-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, float given - ---float .5-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, float given - ---uppercase NULL-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, null given - ---lowercase null-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, null given - ---lowercase true-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, true given - ---lowercase false-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, false given - ---uppercase TRUE-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, true given - ---uppercase FALSE-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, false given - ---empty string DQ-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, string given - ---empty string SQ-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, string given - ---string DQ-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, string given - ---string SQ-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, string given - ---mixed case string-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, string given - ---heredoc-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, string given - ---instance of classWithToString-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, classWithoutToString given - ---undefined var-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, null given - ---unset var-- -array_udiff_assoc(): Argument #1 ($array) must be of type array, null given diff --git a/ext/standard/tests/array/array_udiff_assoc_variation2.phpt b/ext/standard/tests/array/array_udiff_assoc_variation2.phpt deleted file mode 100644 index 9e5c796484ae..000000000000 --- a/ext/standard/tests/array/array_udiff_assoc_variation2.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test array_udiff_assoc() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array2 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_udiff_assoc($array1, $value, $key_comp_func) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -?> ---EXPECT-- -*** Testing array_udiff_assoc() : usage variation *** - ---int 0-- -array_udiff_assoc(): Argument #2 must be of type array, int given - ---int 1-- -array_udiff_assoc(): Argument #2 must be of type array, int given - ---int 12345-- -array_udiff_assoc(): Argument #2 must be of type array, int given - ---int -12345-- -array_udiff_assoc(): Argument #2 must be of type array, int given - ---float 10.5-- -array_udiff_assoc(): Argument #2 must be of type array, float given - ---float -10.5-- -array_udiff_assoc(): Argument #2 must be of type array, float given - ---float 12.3456789000e10-- -array_udiff_assoc(): Argument #2 must be of type array, float given - ---float -12.3456789000e10-- -array_udiff_assoc(): Argument #2 must be of type array, float given - ---float .5-- -array_udiff_assoc(): Argument #2 must be of type array, float given - ---uppercase NULL-- -array_udiff_assoc(): Argument #2 must be of type array, null given - ---lowercase null-- -array_udiff_assoc(): Argument #2 must be of type array, null given - ---lowercase true-- -array_udiff_assoc(): Argument #2 must be of type array, true given - ---lowercase false-- -array_udiff_assoc(): Argument #2 must be of type array, false given - ---uppercase TRUE-- -array_udiff_assoc(): Argument #2 must be of type array, true given - ---uppercase FALSE-- -array_udiff_assoc(): Argument #2 must be of type array, false given - ---empty string DQ-- -array_udiff_assoc(): Argument #2 must be of type array, string given - ---empty string SQ-- -array_udiff_assoc(): Argument #2 must be of type array, string given - ---string DQ-- -array_udiff_assoc(): Argument #2 must be of type array, string given - ---string SQ-- -array_udiff_assoc(): Argument #2 must be of type array, string given - ---mixed case string-- -array_udiff_assoc(): Argument #2 must be of type array, string given - ---heredoc-- -array_udiff_assoc(): Argument #2 must be of type array, string given - ---instance of classWithToString-- -array_udiff_assoc(): Argument #2 must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_udiff_assoc(): Argument #2 must be of type array, classWithoutToString given - ---undefined var-- -array_udiff_assoc(): Argument #2 must be of type array, null given - ---unset var-- -array_udiff_assoc(): Argument #2 must be of type array, null given diff --git a/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt b/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt deleted file mode 100644 index 4bf85a3c2098..000000000000 --- a/ext/standard/tests/array/array_udiff_uassoc_variation1.phpt +++ /dev/null @@ -1,174 +0,0 @@ ---TEST-- -Test array_udiff_uassoc() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array1 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_udiff_uassoc($value, $array2, $data_comp_func, $key_comp_func) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -?> ---EXPECT-- -*** Testing array_udiff_uassoc() : usage variation *** - ---int 0-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, int given - ---int 1-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, int given - ---int 12345-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, int given - ---int -12345-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, int given - ---float 10.5-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, float given - ---float -10.5-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, float given - ---float 12.3456789000e10-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, float given - ---float -12.3456789000e10-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, float given - ---float .5-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, float given - ---uppercase NULL-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, null given - ---lowercase null-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, null given - ---lowercase true-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, true given - ---lowercase false-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, false given - ---uppercase TRUE-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, true given - ---uppercase FALSE-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, false given - ---empty string DQ-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, string given - ---empty string SQ-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, string given - ---string DQ-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, string given - ---string SQ-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, string given - ---mixed case string-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, string given - ---heredoc-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, string given - ---instance of classWithToString-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, classWithoutToString given - ---undefined var-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, null given - ---unset var-- -array_udiff_uassoc(): Argument #1 ($array) must be of type array, null given diff --git a/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt b/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt deleted file mode 100644 index 765e159bab54..000000000000 --- a/ext/standard/tests/array/array_udiff_uassoc_variation2.phpt +++ /dev/null @@ -1,174 +0,0 @@ ---TEST-- -Test array_udiff_uassoc() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array2 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_udiff_uassoc($array1, $value, $data_comp_func, $key_comp_func) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -?> ---EXPECT-- -*** Testing array_udiff_uassoc() : usage variation *** - ---int 0-- -array_udiff_uassoc(): Argument #2 must be of type array, int given - ---int 1-- -array_udiff_uassoc(): Argument #2 must be of type array, int given - ---int 12345-- -array_udiff_uassoc(): Argument #2 must be of type array, int given - ---int -12345-- -array_udiff_uassoc(): Argument #2 must be of type array, int given - ---float 10.5-- -array_udiff_uassoc(): Argument #2 must be of type array, float given - ---float -10.5-- -array_udiff_uassoc(): Argument #2 must be of type array, float given - ---float 12.3456789000e10-- -array_udiff_uassoc(): Argument #2 must be of type array, float given - ---float -12.3456789000e10-- -array_udiff_uassoc(): Argument #2 must be of type array, float given - ---float .5-- -array_udiff_uassoc(): Argument #2 must be of type array, float given - ---uppercase NULL-- -array_udiff_uassoc(): Argument #2 must be of type array, null given - ---lowercase null-- -array_udiff_uassoc(): Argument #2 must be of type array, null given - ---lowercase true-- -array_udiff_uassoc(): Argument #2 must be of type array, true given - ---lowercase false-- -array_udiff_uassoc(): Argument #2 must be of type array, false given - ---uppercase TRUE-- -array_udiff_uassoc(): Argument #2 must be of type array, true given - ---uppercase FALSE-- -array_udiff_uassoc(): Argument #2 must be of type array, false given - ---empty string DQ-- -array_udiff_uassoc(): Argument #2 must be of type array, string given - ---empty string SQ-- -array_udiff_uassoc(): Argument #2 must be of type array, string given - ---string DQ-- -array_udiff_uassoc(): Argument #2 must be of type array, string given - ---string SQ-- -array_udiff_uassoc(): Argument #2 must be of type array, string given - ---mixed case string-- -array_udiff_uassoc(): Argument #2 must be of type array, string given - ---heredoc-- -array_udiff_uassoc(): Argument #2 must be of type array, string given - ---instance of classWithToString-- -array_udiff_uassoc(): Argument #2 must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_udiff_uassoc(): Argument #2 must be of type array, classWithoutToString given - ---undefined var-- -array_udiff_uassoc(): Argument #2 must be of type array, null given - ---unset var-- -array_udiff_uassoc(): Argument #2 must be of type array, null given diff --git a/ext/standard/tests/array/array_udiff_variation1.phpt b/ext/standard/tests/array/array_udiff_variation1.phpt deleted file mode 100644 index 59cfca596864..000000000000 --- a/ext/standard/tests/array/array_udiff_variation1.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test array_udiff() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array1 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_udiff($value, $array2, $data_comp_func) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -?> ---EXPECT-- -*** Testing array_udiff() : usage variation *** - ---int 0-- -array_udiff(): Argument #1 ($array) must be of type array, int given - ---int 1-- -array_udiff(): Argument #1 ($array) must be of type array, int given - ---int 12345-- -array_udiff(): Argument #1 ($array) must be of type array, int given - ---int -12345-- -array_udiff(): Argument #1 ($array) must be of type array, int given - ---float 10.5-- -array_udiff(): Argument #1 ($array) must be of type array, float given - ---float -10.5-- -array_udiff(): Argument #1 ($array) must be of type array, float given - ---float 12.3456789000e10-- -array_udiff(): Argument #1 ($array) must be of type array, float given - ---float -12.3456789000e10-- -array_udiff(): Argument #1 ($array) must be of type array, float given - ---float .5-- -array_udiff(): Argument #1 ($array) must be of type array, float given - ---uppercase NULL-- -array_udiff(): Argument #1 ($array) must be of type array, null given - ---lowercase null-- -array_udiff(): Argument #1 ($array) must be of type array, null given - ---lowercase true-- -array_udiff(): Argument #1 ($array) must be of type array, true given - ---lowercase false-- -array_udiff(): Argument #1 ($array) must be of type array, false given - ---uppercase TRUE-- -array_udiff(): Argument #1 ($array) must be of type array, true given - ---uppercase FALSE-- -array_udiff(): Argument #1 ($array) must be of type array, false given - ---empty string DQ-- -array_udiff(): Argument #1 ($array) must be of type array, string given - ---empty string SQ-- -array_udiff(): Argument #1 ($array) must be of type array, string given - ---string DQ-- -array_udiff(): Argument #1 ($array) must be of type array, string given - ---string SQ-- -array_udiff(): Argument #1 ($array) must be of type array, string given - ---mixed case string-- -array_udiff(): Argument #1 ($array) must be of type array, string given - ---heredoc-- -array_udiff(): Argument #1 ($array) must be of type array, string given - ---instance of classWithToString-- -array_udiff(): Argument #1 ($array) must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_udiff(): Argument #1 ($array) must be of type array, classWithoutToString given - ---undefined var-- -array_udiff(): Argument #1 ($array) must be of type array, null given - ---unset var-- -array_udiff(): Argument #1 ($array) must be of type array, null given diff --git a/ext/standard/tests/array/array_udiff_variation2.phpt b/ext/standard/tests/array/array_udiff_variation2.phpt deleted file mode 100644 index 6637692e0b25..000000000000 --- a/ext/standard/tests/array/array_udiff_variation2.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test array_udiff() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array2 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_udiff($array1, $value, $data_comp_func) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -?> ---EXPECT-- -*** Testing array_udiff() : usage variation *** - ---int 0-- -array_udiff(): Argument #2 must be of type array, int given - ---int 1-- -array_udiff(): Argument #2 must be of type array, int given - ---int 12345-- -array_udiff(): Argument #2 must be of type array, int given - ---int -12345-- -array_udiff(): Argument #2 must be of type array, int given - ---float 10.5-- -array_udiff(): Argument #2 must be of type array, float given - ---float -10.5-- -array_udiff(): Argument #2 must be of type array, float given - ---float 12.3456789000e10-- -array_udiff(): Argument #2 must be of type array, float given - ---float -12.3456789000e10-- -array_udiff(): Argument #2 must be of type array, float given - ---float .5-- -array_udiff(): Argument #2 must be of type array, float given - ---uppercase NULL-- -array_udiff(): Argument #2 must be of type array, null given - ---lowercase null-- -array_udiff(): Argument #2 must be of type array, null given - ---lowercase true-- -array_udiff(): Argument #2 must be of type array, true given - ---lowercase false-- -array_udiff(): Argument #2 must be of type array, false given - ---uppercase TRUE-- -array_udiff(): Argument #2 must be of type array, true given - ---uppercase FALSE-- -array_udiff(): Argument #2 must be of type array, false given - ---empty string DQ-- -array_udiff(): Argument #2 must be of type array, string given - ---empty string SQ-- -array_udiff(): Argument #2 must be of type array, string given - ---string DQ-- -array_udiff(): Argument #2 must be of type array, string given - ---string SQ-- -array_udiff(): Argument #2 must be of type array, string given - ---mixed case string-- -array_udiff(): Argument #2 must be of type array, string given - ---heredoc-- -array_udiff(): Argument #2 must be of type array, string given - ---instance of classWithToString-- -array_udiff(): Argument #2 must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_udiff(): Argument #2 must be of type array, classWithoutToString given - ---undefined var-- -array_udiff(): Argument #2 must be of type array, null given - ---unset var-- -array_udiff(): Argument #2 must be of type array, null given diff --git a/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt b/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt deleted file mode 100644 index 64e21a30d1ae..000000000000 --- a/ext/standard/tests/array/array_uintersect_assoc_variation1.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test array_uintersect_assoc() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array1 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_uintersect_assoc($value, $array2, $data_compare_function) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -?> ---EXPECT-- -*** Testing array_uintersect_assoc() : usage variation *** - ---int 0-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, int given - ---int 1-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, int given - ---int 12345-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, int given - ---int -12345-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, int given - ---float 10.5-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, float given - ---float -10.5-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, float given - ---float 12.3456789000e10-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, float given - ---float -12.3456789000e10-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, float given - ---float .5-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, float given - ---uppercase NULL-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, null given - ---lowercase null-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, null given - ---lowercase true-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, true given - ---lowercase false-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, false given - ---uppercase TRUE-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, true given - ---uppercase FALSE-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, false given - ---empty string DQ-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, string given - ---empty string SQ-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, string given - ---string DQ-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, string given - ---string SQ-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, string given - ---mixed case string-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, string given - ---heredoc-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, string given - ---instance of classWithToString-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, classWithoutToString given - ---undefined var-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, null given - ---unset var-- -array_uintersect_assoc(): Argument #1 ($array) must be of type array, null given diff --git a/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt b/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt deleted file mode 100644 index 4078bec27dcc..000000000000 --- a/ext/standard/tests/array/array_uintersect_assoc_variation2.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test array_uintersect_assoc() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array2 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_uintersect_assoc($array1, $value, $data_compare_function) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -?> ---EXPECT-- -*** Testing array_uintersect_assoc() : usage variation *** - ---int 0-- -array_uintersect_assoc(): Argument #2 must be of type array, int given - ---int 1-- -array_uintersect_assoc(): Argument #2 must be of type array, int given - ---int 12345-- -array_uintersect_assoc(): Argument #2 must be of type array, int given - ---int -12345-- -array_uintersect_assoc(): Argument #2 must be of type array, int given - ---float 10.5-- -array_uintersect_assoc(): Argument #2 must be of type array, float given - ---float -10.5-- -array_uintersect_assoc(): Argument #2 must be of type array, float given - ---float 12.3456789000e10-- -array_uintersect_assoc(): Argument #2 must be of type array, float given - ---float -12.3456789000e10-- -array_uintersect_assoc(): Argument #2 must be of type array, float given - ---float .5-- -array_uintersect_assoc(): Argument #2 must be of type array, float given - ---uppercase NULL-- -array_uintersect_assoc(): Argument #2 must be of type array, null given - ---lowercase null-- -array_uintersect_assoc(): Argument #2 must be of type array, null given - ---lowercase true-- -array_uintersect_assoc(): Argument #2 must be of type array, true given - ---lowercase false-- -array_uintersect_assoc(): Argument #2 must be of type array, false given - ---uppercase TRUE-- -array_uintersect_assoc(): Argument #2 must be of type array, true given - ---uppercase FALSE-- -array_uintersect_assoc(): Argument #2 must be of type array, false given - ---empty string DQ-- -array_uintersect_assoc(): Argument #2 must be of type array, string given - ---empty string SQ-- -array_uintersect_assoc(): Argument #2 must be of type array, string given - ---string DQ-- -array_uintersect_assoc(): Argument #2 must be of type array, string given - ---string SQ-- -array_uintersect_assoc(): Argument #2 must be of type array, string given - ---mixed case string-- -array_uintersect_assoc(): Argument #2 must be of type array, string given - ---heredoc-- -array_uintersect_assoc(): Argument #2 must be of type array, string given - ---instance of classWithToString-- -array_uintersect_assoc(): Argument #2 must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_uintersect_assoc(): Argument #2 must be of type array, classWithoutToString given - ---undefined var-- -array_uintersect_assoc(): Argument #2 must be of type array, null given - ---unset var-- -array_uintersect_assoc(): Argument #2 must be of type array, null given diff --git a/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt b/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt deleted file mode 100644 index 651e78e62855..000000000000 --- a/ext/standard/tests/array/array_uintersect_uassoc_variation1.phpt +++ /dev/null @@ -1,174 +0,0 @@ ---TEST-- -Test array_uintersect_uassoc() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array1 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_uintersect_uassoc($value, $array2, $data_compare_func, $key_compare_func) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -?> ---EXPECT-- -*** Testing array_uintersect_uassoc() : usage variation *** - ---int 0-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, int given - ---int 1-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, int given - ---int 12345-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, int given - ---int -12345-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, int given - ---float 10.5-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, float given - ---float -10.5-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, float given - ---float 12.3456789000e10-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, float given - ---float -12.3456789000e10-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, float given - ---float .5-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, float given - ---uppercase NULL-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, null given - ---lowercase null-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, null given - ---lowercase true-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, true given - ---lowercase false-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, false given - ---uppercase TRUE-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, true given - ---uppercase FALSE-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, false given - ---empty string DQ-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, string given - ---empty string SQ-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, string given - ---string DQ-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, string given - ---string SQ-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, string given - ---mixed case string-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, string given - ---heredoc-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, string given - ---instance of classWithToString-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, classWithoutToString given - ---undefined var-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, null given - ---unset var-- -array_uintersect_uassoc(): Argument #1 ($array) must be of type array, null given diff --git a/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt b/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt deleted file mode 100644 index e01d3b4e9572..000000000000 --- a/ext/standard/tests/array/array_uintersect_uassoc_variation2.phpt +++ /dev/null @@ -1,174 +0,0 @@ ---TEST-- -Test array_uintersect_uassoc() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array2 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_uintersect_uassoc($array1, $value, $data_compare_func, $key_compare_func) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -?> ---EXPECT-- -*** Testing array_uintersect_uassoc() : usage variation *** - ---int 0-- -array_uintersect_uassoc(): Argument #2 must be of type array, int given - ---int 1-- -array_uintersect_uassoc(): Argument #2 must be of type array, int given - ---int 12345-- -array_uintersect_uassoc(): Argument #2 must be of type array, int given - ---int -12345-- -array_uintersect_uassoc(): Argument #2 must be of type array, int given - ---float 10.5-- -array_uintersect_uassoc(): Argument #2 must be of type array, float given - ---float -10.5-- -array_uintersect_uassoc(): Argument #2 must be of type array, float given - ---float 12.3456789000e10-- -array_uintersect_uassoc(): Argument #2 must be of type array, float given - ---float -12.3456789000e10-- -array_uintersect_uassoc(): Argument #2 must be of type array, float given - ---float .5-- -array_uintersect_uassoc(): Argument #2 must be of type array, float given - ---uppercase NULL-- -array_uintersect_uassoc(): Argument #2 must be of type array, null given - ---lowercase null-- -array_uintersect_uassoc(): Argument #2 must be of type array, null given - ---lowercase true-- -array_uintersect_uassoc(): Argument #2 must be of type array, true given - ---lowercase false-- -array_uintersect_uassoc(): Argument #2 must be of type array, false given - ---uppercase TRUE-- -array_uintersect_uassoc(): Argument #2 must be of type array, true given - ---uppercase FALSE-- -array_uintersect_uassoc(): Argument #2 must be of type array, false given - ---empty string DQ-- -array_uintersect_uassoc(): Argument #2 must be of type array, string given - ---empty string SQ-- -array_uintersect_uassoc(): Argument #2 must be of type array, string given - ---string DQ-- -array_uintersect_uassoc(): Argument #2 must be of type array, string given - ---string SQ-- -array_uintersect_uassoc(): Argument #2 must be of type array, string given - ---mixed case string-- -array_uintersect_uassoc(): Argument #2 must be of type array, string given - ---heredoc-- -array_uintersect_uassoc(): Argument #2 must be of type array, string given - ---instance of classWithToString-- -array_uintersect_uassoc(): Argument #2 must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_uintersect_uassoc(): Argument #2 must be of type array, classWithoutToString given - ---undefined var-- -array_uintersect_uassoc(): Argument #2 must be of type array, null given - ---unset var-- -array_uintersect_uassoc(): Argument #2 must be of type array, null given diff --git a/ext/standard/tests/array/array_uintersect_variation1.phpt b/ext/standard/tests/array/array_uintersect_variation1.phpt deleted file mode 100644 index 390fc6137401..000000000000 --- a/ext/standard/tests/array/array_uintersect_variation1.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test array_uintersect() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array1 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_uintersect($value, $array2, $data_compare_function) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -?> ---EXPECT-- -*** Testing array_uintersect() : usage variation *** - ---int 0-- -array_uintersect(): Argument #1 ($array) must be of type array, int given - ---int 1-- -array_uintersect(): Argument #1 ($array) must be of type array, int given - ---int 12345-- -array_uintersect(): Argument #1 ($array) must be of type array, int given - ---int -12345-- -array_uintersect(): Argument #1 ($array) must be of type array, int given - ---float 10.5-- -array_uintersect(): Argument #1 ($array) must be of type array, float given - ---float -10.5-- -array_uintersect(): Argument #1 ($array) must be of type array, float given - ---float 12.3456789000e10-- -array_uintersect(): Argument #1 ($array) must be of type array, float given - ---float -12.3456789000e10-- -array_uintersect(): Argument #1 ($array) must be of type array, float given - ---float .5-- -array_uintersect(): Argument #1 ($array) must be of type array, float given - ---uppercase NULL-- -array_uintersect(): Argument #1 ($array) must be of type array, null given - ---lowercase null-- -array_uintersect(): Argument #1 ($array) must be of type array, null given - ---lowercase true-- -array_uintersect(): Argument #1 ($array) must be of type array, true given - ---lowercase false-- -array_uintersect(): Argument #1 ($array) must be of type array, false given - ---uppercase TRUE-- -array_uintersect(): Argument #1 ($array) must be of type array, true given - ---uppercase FALSE-- -array_uintersect(): Argument #1 ($array) must be of type array, false given - ---empty string DQ-- -array_uintersect(): Argument #1 ($array) must be of type array, string given - ---empty string SQ-- -array_uintersect(): Argument #1 ($array) must be of type array, string given - ---string DQ-- -array_uintersect(): Argument #1 ($array) must be of type array, string given - ---string SQ-- -array_uintersect(): Argument #1 ($array) must be of type array, string given - ---mixed case string-- -array_uintersect(): Argument #1 ($array) must be of type array, string given - ---heredoc-- -array_uintersect(): Argument #1 ($array) must be of type array, string given - ---instance of classWithToString-- -array_uintersect(): Argument #1 ($array) must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_uintersect(): Argument #1 ($array) must be of type array, classWithoutToString given - ---undefined var-- -array_uintersect(): Argument #1 ($array) must be of type array, null given - ---unset var-- -array_uintersect(): Argument #1 ($array) must be of type array, null given diff --git a/ext/standard/tests/array/array_uintersect_variation2.phpt b/ext/standard/tests/array/array_uintersect_variation2.phpt deleted file mode 100644 index ca3a4bff3a90..000000000000 --- a/ext/standard/tests/array/array_uintersect_variation2.phpt +++ /dev/null @@ -1,173 +0,0 @@ ---TEST-- -Test array_uintersect() function : usage variation ---FILE-- - 1, 'two' => 2); - -//array of values to iterate over -$inputs = array( - - // int data - 'int 0' => 0, - 'int 1' => 1, - 'int 12345' => 12345, - 'int -12345' => -2345, - - // float data - 'float 10.5' => 10.5, - 'float -10.5' => -10.5, - 'float 12.3456789000e10' => 12.3456789000e10, - 'float -12.3456789000e10' => -12.3456789000e10, - 'float .5' => .5, - - // null data - 'uppercase NULL' => NULL, - 'lowercase null' => null, - - // boolean data - 'lowercase true' => true, - 'lowercase false' =>false, - 'uppercase TRUE' =>TRUE, - 'uppercase FALSE' =>FALSE, - - // empty data - 'empty string DQ' => "", - 'empty string SQ' => '', - - // string data - 'string DQ' => "string", - 'string SQ' => 'string', - 'mixed case string' => "sTrInG", - 'heredoc' => $heredoc, - - // object data - 'instance of classWithToString' => new classWithToString(), - 'instance of classWithoutToString' => new classWithoutToString(), - - // undefined data - 'undefined var' => @$undefined_var, - - // unset data - 'unset var' => @$unset_var, -); - -// loop through each element of the array for array2 - -foreach($inputs as $key =>$value) { - echo "\n--$key--\n"; - try { - var_dump( array_uintersect($array1, $value, $data_compare_function) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -?> ---EXPECT-- -*** Testing array_uintersect() : usage variation *** - ---int 0-- -array_uintersect(): Argument #2 must be of type array, int given - ---int 1-- -array_uintersect(): Argument #2 must be of type array, int given - ---int 12345-- -array_uintersect(): Argument #2 must be of type array, int given - ---int -12345-- -array_uintersect(): Argument #2 must be of type array, int given - ---float 10.5-- -array_uintersect(): Argument #2 must be of type array, float given - ---float -10.5-- -array_uintersect(): Argument #2 must be of type array, float given - ---float 12.3456789000e10-- -array_uintersect(): Argument #2 must be of type array, float given - ---float -12.3456789000e10-- -array_uintersect(): Argument #2 must be of type array, float given - ---float .5-- -array_uintersect(): Argument #2 must be of type array, float given - ---uppercase NULL-- -array_uintersect(): Argument #2 must be of type array, null given - ---lowercase null-- -array_uintersect(): Argument #2 must be of type array, null given - ---lowercase true-- -array_uintersect(): Argument #2 must be of type array, true given - ---lowercase false-- -array_uintersect(): Argument #2 must be of type array, false given - ---uppercase TRUE-- -array_uintersect(): Argument #2 must be of type array, true given - ---uppercase FALSE-- -array_uintersect(): Argument #2 must be of type array, false given - ---empty string DQ-- -array_uintersect(): Argument #2 must be of type array, string given - ---empty string SQ-- -array_uintersect(): Argument #2 must be of type array, string given - ---string DQ-- -array_uintersect(): Argument #2 must be of type array, string given - ---string SQ-- -array_uintersect(): Argument #2 must be of type array, string given - ---mixed case string-- -array_uintersect(): Argument #2 must be of type array, string given - ---heredoc-- -array_uintersect(): Argument #2 must be of type array, string given - ---instance of classWithToString-- -array_uintersect(): Argument #2 must be of type array, classWithToString given - ---instance of classWithoutToString-- -array_uintersect(): Argument #2 must be of type array, classWithoutToString given - ---undefined var-- -array_uintersect(): Argument #2 must be of type array, null given - ---unset var-- -array_uintersect(): Argument #2 must be of type array, null given diff --git a/ext/standard/tests/class_object/get_class_variation_001.phpt b/ext/standard/tests/class_object/get_class_variation_001.phpt deleted file mode 100644 index 09f995c21fb6..000000000000 --- a/ext/standard/tests/class_object/get_class_variation_001.phpt +++ /dev/null @@ -1,158 +0,0 @@ ---TEST-- -Test get_class() function : usage variations - passing unexpected types. ---FILE-- - 'red', 'item' => 'pen'), - - // null data - NULL, - null, - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // string data - "string", - 'string', - - // undefined data - $undefined_var, - - // unset data - $unset_var, -); - -// loop through each element of the array for object - -foreach($values as $value) { - echo @"\nArg value: $value (type: " . gettype($value) . ")\n"; - try { - var_dump( get_class($value) ); - } catch (TypeError $e) { - echo $e->getMessage(), "\n"; - } -}; - -echo "Done"; -?> ---EXPECTF-- -*** Testing get_class() : usage variations *** - -Warning: Undefined variable $undefined_var in %s on line %d - -Warning: Undefined variable $unset_var in %s on line %d - -Arg value: 0 (type: integer) -get_class(): Argument #1 ($object) must be of type object, int given - -Arg value: 1 (type: integer) -get_class(): Argument #1 ($object) must be of type object, int given - -Arg value: 12345 (type: integer) -get_class(): Argument #1 ($object) must be of type object, int given - -Arg value: -2345 (type: integer) -get_class(): Argument #1 ($object) must be of type object, int given - -Arg value: 10.5 (type: double) -get_class(): Argument #1 ($object) must be of type object, float given - -Arg value: -10.5 (type: double) -get_class(): Argument #1 ($object) must be of type object, float given - -Arg value: 101234567000 (type: double) -get_class(): Argument #1 ($object) must be of type object, float given - -Arg value: 1.07654321E-9 (type: double) -get_class(): Argument #1 ($object) must be of type object, float given - -Arg value: 0.5 (type: double) -get_class(): Argument #1 ($object) must be of type object, float given - -Arg value: Array (type: array) -get_class(): Argument #1 ($object) must be of type object, array given - -Arg value: Array (type: array) -get_class(): Argument #1 ($object) must be of type object, array given - -Arg value: Array (type: array) -get_class(): Argument #1 ($object) must be of type object, array given - -Arg value: Array (type: array) -get_class(): Argument #1 ($object) must be of type object, array given - -Arg value: Array (type: array) -get_class(): Argument #1 ($object) must be of type object, array given - -Arg value: (type: NULL) -get_class(): Argument #1 ($object) must be of type object, null given - -Arg value: (type: NULL) -get_class(): Argument #1 ($object) must be of type object, null given - -Arg value: 1 (type: boolean) -get_class(): Argument #1 ($object) must be of type object, true given - -Arg value: (type: boolean) -get_class(): Argument #1 ($object) must be of type object, false given - -Arg value: 1 (type: boolean) -get_class(): Argument #1 ($object) must be of type object, true given - -Arg value: (type: boolean) -get_class(): Argument #1 ($object) must be of type object, false given - -Arg value: (type: string) -get_class(): Argument #1 ($object) must be of type object, string given - -Arg value: (type: string) -get_class(): Argument #1 ($object) must be of type object, string given - -Arg value: string (type: string) -get_class(): Argument #1 ($object) must be of type object, string given - -Arg value: string (type: string) -get_class(): Argument #1 ($object) must be of type object, string given - -Arg value: (type: NULL) -get_class(): Argument #1 ($object) must be of type object, null given - -Arg value: (type: NULL) -get_class(): Argument #1 ($object) must be of type object, null given -Done diff --git a/ext/standard/tests/class_object/property_exists_error.phpt b/ext/standard/tests/class_object/property_exists_error.phpt deleted file mode 100644 index 3d8927882c60..000000000000 --- a/ext/standard/tests/class_object/property_exists_error.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -Test property_exists() function : error conditions ---FILE-- -getMessage() . \PHP_EOL; -} - -?> ---EXPECT-- -*** Testing property_exists() : error conditions *** - --- Testing property_exists() function with incorrect arguments -- -property_exists(): Argument #1 ($object_or_class) must be of type object|string, int given diff --git a/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt b/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt deleted file mode 100644 index 752b1dfa7e33..000000000000 --- a/ext/standard/tests/general_functions/escapeshellarg_variation1-win32.phpt +++ /dev/null @@ -1,107 +0,0 @@ ---TEST-- -Test escapeshellarg() function : usage variations - different data types as $arg arg ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing escapeshellarg() : usage variations *** - --- Iteration 1 -- -string(3) ""0"" - --- Iteration 2 -- -string(3) ""1"" - --- Iteration 3 -- -string(4) ""12"" - --- Iteration 4 -- -string(5) ""-12"" - --- Iteration 5 -- -string(12) ""2147483647"" - --- Iteration 6 -- -string(6) ""10.5"" - --- Iteration 7 -- -string(7) ""-10.5"" - --- Iteration 8 -- -string(10) ""123.4567"" - --- Iteration 9 -- -string(12) ""0.01234567"" - --- Iteration 10 -- -string(5) ""0.5"" - --- Iteration 11 -- -string(3) ""1"" - --- Iteration 12 -- -string(2) """" - --- Iteration 13 -- -string(3) ""1"" - --- Iteration 14 -- -string(2) """" - --- Iteration 15 -- -string(2) """" - --- Iteration 16 -- -string(2) """" diff --git a/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt b/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt deleted file mode 100644 index 028b987eece2..000000000000 --- a/ext/standard/tests/general_functions/escapeshellarg_variation1.phpt +++ /dev/null @@ -1,106 +0,0 @@ ---TEST-- -Test escapeshellarg() function : usage variations - different data types as $y arg ---SKIPIF-- - ---FILE-- - ---EXPECT-- -*** Testing escapeshellarg() : usage variations *** - --- Iteration 1 -- -string(3) "'0'" - --- Iteration 2 -- -string(3) "'1'" - --- Iteration 3 -- -string(4) "'12'" - --- Iteration 4 -- -string(5) "'-12'" - --- Iteration 5 -- -string(12) "'2147483647'" - --- Iteration 6 -- -string(6) "'10.5'" - --- Iteration 7 -- -string(7) "'-10.5'" - --- Iteration 8 -- -string(10) "'123.4567'" - --- Iteration 9 -- -string(12) "'0.01234567'" - --- Iteration 10 -- -string(5) "'0.5'" - --- Iteration 11 -- -string(3) "'1'" - --- Iteration 12 -- -string(2) "''" - --- Iteration 13 -- -string(3) "'1'" - --- Iteration 14 -- -string(2) "''" - --- Iteration 15 -- -string(2) "''" - --- Iteration 16 -- -string(2) "''" diff --git a/ext/standard/tests/math/abs_variation.phpt b/ext/standard/tests/math/abs_variation.phpt deleted file mode 100644 index d7f878bc01bb..000000000000 --- a/ext/standard/tests/math/abs_variation.phpt +++ /dev/null @@ -1,138 +0,0 @@ ---TEST-- -Test abs() function : usage variations - different data types as $number arg ---FILE-- -getMessage(), "\n"; - } - $iterator++; -}; - -fclose($fp); -?> ---EXPECTF-- -*** Testing abs() : usage variations *** - --- Iteration 1 -- - -Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -int(0) - --- Iteration 2 -- - -Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -int(0) - --- Iteration 3 -- -int(1) - --- Iteration 4 -- -int(0) - --- Iteration 5 -- -int(1) - --- Iteration 6 -- -int(0) - --- Iteration 7 -- -abs(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 8 -- -abs(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 9 -- -abs(): Argument #1 ($num) must be of type int|float, array given - --- Iteration 10 -- -abs(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 11 -- -abs(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 12 -- -abs(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 13 -- -abs(): Argument #1 ($num) must be of type int|float, classA given - --- Iteration 14 -- - -Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -int(0) - --- Iteration 15 -- - -Deprecated: abs(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -int(0) - --- Iteration 16 -- -abs(): Argument #1 ($num) must be of type int|float, resource given diff --git a/ext/standard/tests/math/ceil_variation1.phpt b/ext/standard/tests/math/ceil_variation1.phpt deleted file mode 100644 index 7751946ea954..000000000000 --- a/ext/standard/tests/math/ceil_variation1.phpt +++ /dev/null @@ -1,131 +0,0 @@ ---TEST-- -Test ceil() function : usage variations - different data types as $value arg ---INI-- -precision=14 ---FILE-- -getMessage(), "\n"; - } - $iterator++; -}; -fclose($fp); -?> ---EXPECTF-- -*** Testing ceil() : usage variations *** - --- Iteration 1 -- - -Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -float(0) - --- Iteration 2 -- - -Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -float(0) - --- Iteration 3 -- -float(1) - --- Iteration 4 -- -float(0) - --- Iteration 5 -- -float(1) - --- Iteration 6 -- -float(0) - --- Iteration 7 -- -ceil(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 8 -- -ceil(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 9 -- -ceil(): Argument #1 ($num) must be of type int|float, array given - --- Iteration 10 -- -ceil(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 11 -- -ceil(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 12 -- -ceil(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 13 -- -ceil(): Argument #1 ($num) must be of type int|float, classA given - --- Iteration 14 -- - -Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -float(0) - --- Iteration 15 -- - -Deprecated: ceil(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -float(0) - --- Iteration 16 -- -ceil(): Argument #1 ($num) must be of type int|float, resource given diff --git a/ext/standard/tests/math/floor_variation1.phpt b/ext/standard/tests/math/floor_variation1.phpt deleted file mode 100644 index c9ec5e710c51..000000000000 --- a/ext/standard/tests/math/floor_variation1.phpt +++ /dev/null @@ -1,131 +0,0 @@ ---TEST-- -Test floor() function : usage variations - different data types as $value arg ---INI-- -precision=14 ---FILE-- -getMessage(), "\n"; - } - $iterator++; -}; -fclose($fp); -?> ---EXPECTF-- -*** Testing floor() : usage variations *** - --- Iteration 1 -- - -Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -float(0) - --- Iteration 2 -- - -Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -float(0) - --- Iteration 3 -- -float(1) - --- Iteration 4 -- -float(0) - --- Iteration 5 -- -float(1) - --- Iteration 6 -- -float(0) - --- Iteration 7 -- -floor(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 8 -- -floor(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 9 -- -floor(): Argument #1 ($num) must be of type int|float, array given - --- Iteration 10 -- -floor(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 11 -- -floor(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 12 -- -floor(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 13 -- -floor(): Argument #1 ($num) must be of type int|float, classA given - --- Iteration 14 -- - -Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -float(0) - --- Iteration 15 -- - -Deprecated: floor(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -float(0) - --- Iteration 16 -- -floor(): Argument #1 ($num) must be of type int|float, resource given diff --git a/ext/standard/tests/math/round_variation1.phpt b/ext/standard/tests/math/round_variation1.phpt deleted file mode 100644 index 2a2adf27cae0..000000000000 --- a/ext/standard/tests/math/round_variation1.phpt +++ /dev/null @@ -1,175 +0,0 @@ ---TEST-- -Test round() function : usage variations - different data types as $val argument ---INI-- -precision=14 ---FILE-- -getMessage(), "\n"; - } - $iterator++; -}; -fclose($fp); -?> ---EXPECTF-- -*** Testing round() : usage variations *** - --- Iteration 1 -- -float(0) - --- Iteration 2 -- -float(1) - --- Iteration 3 -- -float(12345) - --- Iteration 4 -- -float(-2345) - --- Iteration 5 -- -float(2147483647) - --- Iteration 6 -- -float(10.5) - --- Iteration 7 -- -float(-10.5) - --- Iteration 8 -- -float(123456789000) - --- Iteration 9 -- -float(1.23457E-9) - --- Iteration 10 -- -float(0.5) - --- Iteration 11 -- - -Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -float(0) - --- Iteration 12 -- - -Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -float(0) - --- Iteration 13 -- -float(1) - --- Iteration 14 -- -float(0) - --- Iteration 15 -- -float(1) - --- Iteration 16 -- -float(0) - --- Iteration 17 -- -round(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 18 -- -round(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 19 -- -round(): Argument #1 ($num) must be of type int|float, array given - --- Iteration 20 -- -round(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 21 -- -round(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 22 -- -round(): Argument #1 ($num) must be of type int|float, string given - --- Iteration 23 -- -round(): Argument #1 ($num) must be of type int|float, classA given - --- Iteration 24 -- - -Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -float(0) - --- Iteration 25 -- - -Deprecated: round(): Passing null to parameter #1 ($num) of type int|float is deprecated in %s on line %d -float(0) - --- Iteration 26 -- -round(): Argument #1 ($num) must be of type int|float, resource given diff --git a/ext/standard/tests/password/password_hash_error.phpt b/ext/standard/tests/password/password_hash_error.phpt deleted file mode 100644 index a9e26f091675..000000000000 --- a/ext/standard/tests/password/password_hash_error.phpt +++ /dev/null @@ -1,43 +0,0 @@ ---TEST-- -Test error operation of password_hash() ---FILE-- -getMessage(), "\n"; -} - -try { - password_hash("foo", array()); -} catch (TypeError $exception) { - echo $exception->getMessage() . "\n"; -} - -try { - var_dump(password_hash("foo", 19, new StdClass)); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -try { - var_dump(password_hash("foo", PASSWORD_BCRYPT, "baz")); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -try { - var_dump(password_hash(array(), PASSWORD_BCRYPT)); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -?> ---EXPECT-- -password_hash() expects at least 2 arguments, 1 given -password_hash(): Argument #2 ($algo) must be of type string|int|null, array given -password_hash(): Argument #3 ($options) must be of type array, stdClass given -password_hash(): Argument #3 ($options) must be of type array, string given -password_hash(): Argument #1 ($password) must be of type string, array given diff --git a/ext/standard/tests/password/password_needs_rehash_error.phpt b/ext/standard/tests/password/password_needs_rehash_error.phpt deleted file mode 100644 index 283a6b5387e0..000000000000 --- a/ext/standard/tests/password/password_needs_rehash_error.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Test error operation of password_needs_rehash() ---FILE-- -getMessage(), "\n"; -} - -try { - var_dump(password_needs_rehash('', [])); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -try { - var_dump(password_needs_rehash(array(), PASSWORD_BCRYPT)); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -try { - var_dump(password_needs_rehash("", PASSWORD_BCRYPT, "foo")); -} catch (TypeError $e) { - echo $e->getMessage(), "\n"; -} - -echo "OK!"; -?> ---EXPECT-- -password_needs_rehash() expects at least 2 arguments, 1 given -password_needs_rehash(): Argument #2 ($algo) must be of type string|int|null, array given -password_needs_rehash(): Argument #1 ($hash) must be of type string, array given -password_needs_rehash(): Argument #3 ($options) must be of type array, string given -OK! diff --git a/ext/standard/tests/password/password_verify_error.phpt b/ext/standard/tests/password/password_verify_error.phpt deleted file mode 100644 index 76c4f6dcb65e..000000000000 --- a/ext/standard/tests/password/password_verify_error.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Test error operation of password_verify() ---FILE-- -getMessage(), "\n"; -} - -?> ---EXPECT-- -password_verify() expects exactly 2 arguments, 1 given diff --git a/ext/standard/tests/strings/join_error1.phpt b/ext/standard/tests/strings/join_error1.phpt deleted file mode 100644 index 0bb451a73d98..000000000000 --- a/ext/standard/tests/strings/join_error1.phpt +++ /dev/null @@ -1,149 +0,0 @@ ---TEST-- -Test join() function : usage variations - unexpected values for 'pieces' argument(Bug#42789) ---FILE-- -getMessage(), "\n"; - } - - $counter ++; -} - -// close the resources used -fclose($fp); - -echo "Done\n"; -?> ---EXPECT-- -*** Testing join() : usage variations *** - ---- Testing join() by supplying different values for 'pieces' argument --- --- Iteration 1 -- -join(): Argument #2 ($array) must be of type ?array, int given --- Iteration 2 -- -join(): Argument #2 ($array) must be of type ?array, int given --- Iteration 3 -- -join(): Argument #2 ($array) must be of type ?array, int given --- Iteration 4 -- -join(): Argument #2 ($array) must be of type ?array, int given --- Iteration 5 -- -join(): Argument #2 ($array) must be of type ?array, float given --- Iteration 6 -- -join(): Argument #2 ($array) must be of type ?array, float given --- Iteration 7 -- -join(): Argument #2 ($array) must be of type ?array, float given --- Iteration 8 -- -join(): Argument #2 ($array) must be of type ?array, float given --- Iteration 9 -- -join(): Argument #2 ($array) must be of type ?array, float given --- Iteration 10 -- -join(): Argument #2 ($array) must be of type ?array, true given --- Iteration 11 -- -join(): Argument #2 ($array) must be of type ?array, false given --- Iteration 12 -- -join(): Argument #2 ($array) must be of type ?array, true given --- Iteration 13 -- -join(): Argument #2 ($array) must be of type ?array, false given --- Iteration 14 -- -join(): Argument #2 ($array) must be of type ?array, string given --- Iteration 15 -- -join(): Argument #2 ($array) must be of type ?array, string given --- Iteration 16 -- -join(): Argument #2 ($array) must be of type ?array, test given --- Iteration 17 -- -join(): Argument #2 ($array) must be of type ?array, string given --- Iteration 18 -- -join(): Argument #2 ($array) must be of type ?array, string given --- Iteration 19 -- -join(): If argument #1 ($separator) is of type string, argument #2 ($array) must be of type array, null given --- Iteration 20 -- -join(): If argument #1 ($separator) is of type string, argument #2 ($array) must be of type array, null given --- Iteration 21 -- -join(): Argument #2 ($array) must be of type ?array, resource given --- Iteration 22 -- -join(): If argument #1 ($separator) is of type string, argument #2 ($array) must be of type array, null given --- Iteration 23 -- -join(): If argument #1 ($separator) is of type string, argument #2 ($array) must be of type array, null given -Done diff --git a/ext/standard/tests/strings/join_variation1.phpt b/ext/standard/tests/strings/join_variation1.phpt deleted file mode 100644 index 256f361460b2..000000000000 --- a/ext/standard/tests/strings/join_variation1.phpt +++ /dev/null @@ -1,133 +0,0 @@ ---TEST-- -Test join() function : usage variations - unexpected values for 'glue' argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean values - true, - false, - TRUE, - FALSE, - - // objects - new test(), - - // empty string - "", - '', - - // resource variable - $fp, -); - - -// loop through each element of the array and check the working of join() -// when $glue argument is supplied with different values -echo "\n--- Testing join() by supplying different values for 'glue' argument ---\n"; -$counter = 1; -for($index = 0; $index < count($values); $index ++) { - echo "-- Iteration $counter --\n"; - $glue = $values [$index]; - - try { - var_dump(join($glue, $pieces)); - } catch (TypeError $exception) { - echo $exception->getMessage() . "\n"; - } - - $counter++; -} - -echo "Done\n"; -?> ---EXPECT-- -*** Testing join() : usage variations *** - ---- Testing join() by supplying different values for 'glue' argument --- --- Iteration 1 -- -string(17) "element10element2" --- Iteration 2 -- -string(17) "element11element2" --- Iteration 3 -- -string(21) "element112345element2" --- Iteration 4 -- -string(21) "element1-2345element2" --- Iteration 5 -- -string(20) "element110.5element2" --- Iteration 6 -- -string(21) "element1-10.5element2" --- Iteration 7 -- -string(28) "element1101234567000element2" --- Iteration 8 -- -string(29) "element11.07654321E-9element2" --- Iteration 9 -- -string(19) "element10.5element2" --- Iteration 10 -- -join(): Argument #1 ($separator) must be of type string, array given --- Iteration 11 -- -join(): Argument #1 ($separator) must be of type string, array given --- Iteration 12 -- -join(): Argument #1 ($separator) must be of type string, array given --- Iteration 13 -- -join(): Argument #1 ($separator) must be of type string, array given --- Iteration 14 -- -join(): Argument #1 ($separator) must be of type string, array given --- Iteration 15 -- -string(17) "element11element2" --- Iteration 16 -- -string(16) "element1element2" --- Iteration 17 -- -string(17) "element11element2" --- Iteration 18 -- -string(16) "element1element2" --- Iteration 19 -- -string(26) "element1testObjectelement2" --- Iteration 20 -- -string(16) "element1element2" --- Iteration 21 -- -string(16) "element1element2" --- Iteration 22 -- -join(): Argument #1 ($separator) must be of type array|string, resource given -Done diff --git a/ext/standard/tests/strings/sprintf_variation1.phpt b/ext/standard/tests/strings/sprintf_variation1.phpt deleted file mode 100644 index 6b9430e38666..000000000000 --- a/ext/standard/tests/strings/sprintf_variation1.phpt +++ /dev/null @@ -1,213 +0,0 @@ ---TEST-- -Test sprintf() function : usage variations - unexpected values for format argument ---FILE-- - 'red', 'item' => 'pen'), - - // boolean data - true, - false, - TRUE, - FALSE, - - // empty data - "", - '', - - // object data - new sample(), - - // resource data - $file_handle -); - -// loop through each element of the array for format - -$count = 1; -foreach($values as $value) { - echo "\n-- Iteration $count --\n"; - - // with default argument - try { - var_dump(sprintf($value)); - } catch (TypeError $exception) { - echo $exception->getMessage() . "\n"; - } - - // with two arguments - try { - var_dump(sprintf($value, $arg1)); - } catch (TypeError $exception) { - echo $exception->getMessage() . "\n"; - } - - // with three arguments - try { - var_dump(sprintf($value, $arg1, $arg2)); - } catch (TypeError $exception) { - echo $exception->getMessage() . "\n"; - } - - $count++; -} - -// close the resource -fclose($file_handle); - -echo "Done"; -?> ---EXPECT-- -*** Testing sprintf() : with unexpected values for format argument *** - --- Iteration 1 -- -string(1) "0" -string(1) "0" -string(1) "0" - --- Iteration 2 -- -string(1) "1" -string(1) "1" -string(1) "1" - --- Iteration 3 -- -string(5) "12345" -string(5) "12345" -string(5) "12345" - --- Iteration 4 -- -string(5) "-2345" -string(5) "-2345" -string(5) "-2345" - --- Iteration 5 -- -string(4) "10.5" -string(4) "10.5" -string(4) "10.5" - --- Iteration 6 -- -string(5) "-10.5" -string(5) "-10.5" -string(5) "-10.5" - --- Iteration 7 -- -string(12) "101234567000" -string(12) "101234567000" -string(12) "101234567000" - --- Iteration 8 -- -string(13) "1.07654321E-9" -string(13) "1.07654321E-9" -string(13) "1.07654321E-9" - --- Iteration 9 -- -string(3) "0.5" -string(3) "0.5" -string(3) "0.5" - --- Iteration 10 -- -sprintf(): Argument #1 ($format) must be of type string, array given -sprintf(): Argument #1 ($format) must be of type string, array given -sprintf(): Argument #1 ($format) must be of type string, array given - --- Iteration 11 -- -sprintf(): Argument #1 ($format) must be of type string, array given -sprintf(): Argument #1 ($format) must be of type string, array given -sprintf(): Argument #1 ($format) must be of type string, array given - --- Iteration 12 -- -sprintf(): Argument #1 ($format) must be of type string, array given -sprintf(): Argument #1 ($format) must be of type string, array given -sprintf(): Argument #1 ($format) must be of type string, array given - --- Iteration 13 -- -sprintf(): Argument #1 ($format) must be of type string, array given -sprintf(): Argument #1 ($format) must be of type string, array given -sprintf(): Argument #1 ($format) must be of type string, array given - --- Iteration 14 -- -sprintf(): Argument #1 ($format) must be of type string, array given -sprintf(): Argument #1 ($format) must be of type string, array given -sprintf(): Argument #1 ($format) must be of type string, array given - --- Iteration 15 -- -string(1) "1" -string(1) "1" -string(1) "1" - --- Iteration 16 -- -string(0) "" -string(0) "" -string(0) "" - --- Iteration 17 -- -string(1) "1" -string(1) "1" -string(1) "1" - --- Iteration 18 -- -string(0) "" -string(0) "" -string(0) "" - --- Iteration 19 -- -string(0) "" -string(0) "" -string(0) "" - --- Iteration 20 -- -string(0) "" -string(0) "" -string(0) "" - --- Iteration 21 -- -string(6) "Object" -string(6) "Object" -string(6) "Object" - --- Iteration 22 -- -sprintf(): Argument #1 ($format) must be of type string, resource given -sprintf(): Argument #1 ($format) must be of type string, resource given -sprintf(): Argument #1 ($format) must be of type string, resource given -Done diff --git a/ext/standard/tests/strings/vprintf_variation2.phpt b/ext/standard/tests/strings/vprintf_variation2.phpt deleted file mode 100644 index f6d92e577402..000000000000 --- a/ext/standard/tests/strings/vprintf_variation2.phpt +++ /dev/null @@ -1,168 +0,0 @@ ---TEST-- -Test vprintf() function : usage variations - unexpected values for args argument ---FILE-- -getMessage(), "\n"; - } catch (\ValueError $e) { - echo $e->getMessage(), "\n"; - } - $counter++; -}; - -// closing the resource -fclose($file_handle); - -?> ---EXPECT-- -*** Testing vprintf() : with unexpected values for args argument *** - --- Iteration 1 -- -vprintf(): Argument #2 ($values) must be of type array, int given - --- Iteration 2 -- -vprintf(): Argument #2 ($values) must be of type array, int given - --- Iteration 3 -- -vprintf(): Argument #2 ($values) must be of type array, int given - --- Iteration 4 -- -vprintf(): Argument #2 ($values) must be of type array, int given - --- Iteration 5 -- -vprintf(): Argument #2 ($values) must be of type array, float given - --- Iteration 6 -- -vprintf(): Argument #2 ($values) must be of type array, float given - --- Iteration 7 -- -vprintf(): Argument #2 ($values) must be of type array, float given - --- Iteration 8 -- -vprintf(): Argument #2 ($values) must be of type array, float given - --- Iteration 9 -- -vprintf(): Argument #2 ($values) must be of type array, float given - --- Iteration 10 -- -vprintf(): Argument #2 ($values) must be of type array, null given - --- Iteration 11 -- -vprintf(): Argument #2 ($values) must be of type array, null given - --- Iteration 12 -- -vprintf(): Argument #2 ($values) must be of type array, true given - --- Iteration 13 -- -vprintf(): Argument #2 ($values) must be of type array, false given - --- Iteration 14 -- -vprintf(): Argument #2 ($values) must be of type array, true given - --- Iteration 15 -- -vprintf(): Argument #2 ($values) must be of type array, false given - --- Iteration 16 -- -vprintf(): Argument #2 ($values) must be of type array, string given - --- Iteration 17 -- -vprintf(): Argument #2 ($values) must be of type array, string given - --- Iteration 18 -- -vprintf(): Argument #2 ($values) must be of type array, string given - --- Iteration 19 -- -vprintf(): Argument #2 ($values) must be of type array, string given - --- Iteration 20 -- -vprintf(): Argument #2 ($values) must be of type array, sample given - --- Iteration 21 -- -vprintf(): Argument #2 ($values) must be of type array, null given - --- Iteration 22 -- -vprintf(): Argument #2 ($values) must be of type array, null given - --- Iteration 23 -- -vprintf(): Argument #2 ($values) must be of type array, resource given From a56499295f80b1c78d90865304a0cd73130fc1a6 Mon Sep 17 00:00:00 2001 From: NickSdot Date: Sat, 22 Aug 2026 23:08:52 +0700 Subject: [PATCH 3/3] review: restored coverage loss --- .../array/array_column_argument_types.phpt | 30 +++++++++++++++++++ .../array/array_diff_argument_errors.phpt | 14 +++++++++ .../array/array_diff_key_argument_errors.phpt | 14 +++++++++ .../array_diff_uassoc_argument_errors.phpt | 22 ++++++++++++++ ...array_intersect_assoc_argument_errors.phpt | 14 +++++++++ ...rray_intersect_uassoc_argument_errors.phpt | 22 ++++++++++++++ .../array/array_merge_argument_errors.phpt | 14 +++++++++ .../tests/math/abs_argument_errors.phpt | 14 +++++++++ .../tests/math/ceil_argument_errors.phpt | 14 +++++++++ .../tests/math/floor_argument_errors.phpt | 14 +++++++++ .../tests/math/round_argument_errors.phpt | 14 +++++++++ .../password_hash_argument_errors.phpt | 24 +++++++++++++++ ...password_needs_rehash_argument_errors.phpt | 24 +++++++++++++++ .../password_verify_argument_errors.phpt | 14 +++++++++ .../tests/strings/join_argument_errors.phpt | 20 +++++++++++++ .../strings/sprintf_argument_errors.phpt | 14 +++++++++ .../strings/vprintf_argument_errors.phpt | 14 +++++++++ 17 files changed, 296 insertions(+) create mode 100644 ext/standard/tests/array/array_column_argument_types.phpt create mode 100644 ext/standard/tests/array/array_diff_argument_errors.phpt create mode 100644 ext/standard/tests/array/array_diff_key_argument_errors.phpt create mode 100644 ext/standard/tests/array/array_diff_uassoc_argument_errors.phpt create mode 100644 ext/standard/tests/array/array_intersect_assoc_argument_errors.phpt create mode 100644 ext/standard/tests/array/array_intersect_uassoc_argument_errors.phpt create mode 100644 ext/standard/tests/array/array_merge_argument_errors.phpt create mode 100644 ext/standard/tests/math/abs_argument_errors.phpt create mode 100644 ext/standard/tests/math/ceil_argument_errors.phpt create mode 100644 ext/standard/tests/math/floor_argument_errors.phpt create mode 100644 ext/standard/tests/math/round_argument_errors.phpt create mode 100644 ext/standard/tests/password/password_hash_argument_errors.phpt create mode 100644 ext/standard/tests/password/password_needs_rehash_argument_errors.phpt create mode 100644 ext/standard/tests/password/password_verify_argument_errors.phpt create mode 100644 ext/standard/tests/strings/join_argument_errors.phpt create mode 100644 ext/standard/tests/strings/sprintf_argument_errors.phpt create mode 100644 ext/standard/tests/strings/vprintf_argument_errors.phpt diff --git a/ext/standard/tests/array/array_column_argument_types.phpt b/ext/standard/tests/array/array_column_argument_types.phpt new file mode 100644 index 000000000000..4dc9f8599f49 --- /dev/null +++ b/ext/standard/tests/array/array_column_argument_types.phpt @@ -0,0 +1,30 @@ +--TEST-- +Test array_column() - argument types +--FILE-- + array_column([['first', 'second']], false), + fn() => array_column([], []), + fn() => array_column([['value' => 1, 0 => 'key']], 'value', false), + fn() => array_column([], null, []), +] as $callback) { + try { + var_dump($callback()); + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; + } +} + +?> +--EXPECT-- +array(1) { + [0]=> + string(5) "first" +} +TypeError: array_column(): Argument #2 ($column_key) must be of type string|int|null, array given +array(1) { + ["key"]=> + int(1) +} +TypeError: array_column(): Argument #3 ($index_key) must be of type string|int|null, array given diff --git a/ext/standard/tests/array/array_diff_argument_errors.phpt b/ext/standard/tests/array/array_diff_argument_errors.phpt new file mode 100644 index 000000000000..64b553a0626c --- /dev/null +++ b/ext/standard/tests/array/array_diff_argument_errors.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test array_diff() - argument errors +--FILE-- +getMessage(), "\n"; +} + +?> +--EXPECT-- +TypeError: array_diff(): Argument #2 must be of type array, int given diff --git a/ext/standard/tests/array/array_diff_key_argument_errors.phpt b/ext/standard/tests/array/array_diff_key_argument_errors.phpt new file mode 100644 index 000000000000..cd0098370b6a --- /dev/null +++ b/ext/standard/tests/array/array_diff_key_argument_errors.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test array_diff_key() - argument errors +--FILE-- +getMessage(), "\n"; +} + +?> +--EXPECT-- +TypeError: array_diff_key(): Argument #2 must be of type array, int given diff --git a/ext/standard/tests/array/array_diff_uassoc_argument_errors.phpt b/ext/standard/tests/array/array_diff_uassoc_argument_errors.phpt new file mode 100644 index 000000000000..a8cd6fc89a10 --- /dev/null +++ b/ext/standard/tests/array/array_diff_uassoc_argument_errors.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test array_diff_uassoc() - argument errors +--FILE-- + 0; + +foreach ([ + fn() => array_diff_uassoc([], [], 'invalid'), + fn() => array_diff_uassoc([], 1, $compare), +] as $callback) { + try { + $callback(); + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; + } +} + +?> +--EXPECT-- +TypeError: array_diff_uassoc(): Argument #3 must be a valid callback, function "invalid" not found or invalid function name +TypeError: array_diff_uassoc(): Argument #2 must be of type array, int given diff --git a/ext/standard/tests/array/array_intersect_assoc_argument_errors.phpt b/ext/standard/tests/array/array_intersect_assoc_argument_errors.phpt new file mode 100644 index 000000000000..f139056a762c --- /dev/null +++ b/ext/standard/tests/array/array_intersect_assoc_argument_errors.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test array_intersect_assoc() - argument errors +--FILE-- +getMessage(), "\n"; +} + +?> +--EXPECT-- +TypeError: array_intersect_assoc(): Argument #2 must be of type array, int given diff --git a/ext/standard/tests/array/array_intersect_uassoc_argument_errors.phpt b/ext/standard/tests/array/array_intersect_uassoc_argument_errors.phpt new file mode 100644 index 000000000000..bd5791e2f220 --- /dev/null +++ b/ext/standard/tests/array/array_intersect_uassoc_argument_errors.phpt @@ -0,0 +1,22 @@ +--TEST-- +Test array_intersect_uassoc() - argument errors +--FILE-- + 0; + +foreach ([ + fn() => array_intersect_uassoc([], [], 'invalid'), + fn() => array_intersect_uassoc([], 1, $compare), +] as $callback) { + try { + $callback(); + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; + } +} + +?> +--EXPECT-- +TypeError: array_intersect_uassoc(): Argument #3 must be a valid callback, function "invalid" not found or invalid function name +TypeError: array_intersect_uassoc(): Argument #2 must be of type array, int given diff --git a/ext/standard/tests/array/array_merge_argument_errors.phpt b/ext/standard/tests/array/array_merge_argument_errors.phpt new file mode 100644 index 000000000000..9242dbfb959f --- /dev/null +++ b/ext/standard/tests/array/array_merge_argument_errors.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test array_merge() - argument errors +--FILE-- +getMessage(), "\n"; +} + +?> +--EXPECT-- +TypeError: array_merge(): Argument #2 must be of type array, int given diff --git a/ext/standard/tests/math/abs_argument_errors.phpt b/ext/standard/tests/math/abs_argument_errors.phpt new file mode 100644 index 000000000000..9f6dbb6b0b9a --- /dev/null +++ b/ext/standard/tests/math/abs_argument_errors.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test abs() - argument errors +--FILE-- +getMessage(), "\n"; +} + +?> +--EXPECT-- +TypeError: abs(): Argument #1 ($num) must be of type int|float, array given diff --git a/ext/standard/tests/math/ceil_argument_errors.phpt b/ext/standard/tests/math/ceil_argument_errors.phpt new file mode 100644 index 000000000000..19dee7835a55 --- /dev/null +++ b/ext/standard/tests/math/ceil_argument_errors.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test ceil() - argument errors +--FILE-- +getMessage(), "\n"; +} + +?> +--EXPECT-- +TypeError: ceil(): Argument #1 ($num) must be of type int|float, array given diff --git a/ext/standard/tests/math/floor_argument_errors.phpt b/ext/standard/tests/math/floor_argument_errors.phpt new file mode 100644 index 000000000000..785a9fb1dacd --- /dev/null +++ b/ext/standard/tests/math/floor_argument_errors.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test floor() - argument errors +--FILE-- +getMessage(), "\n"; +} + +?> +--EXPECT-- +TypeError: floor(): Argument #1 ($num) must be of type int|float, array given diff --git a/ext/standard/tests/math/round_argument_errors.phpt b/ext/standard/tests/math/round_argument_errors.phpt new file mode 100644 index 000000000000..a578d5d79e45 --- /dev/null +++ b/ext/standard/tests/math/round_argument_errors.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test round() - argument errors +--FILE-- +getMessage(), "\n"; +} + +?> +--EXPECT-- +TypeError: round(): Argument #1 ($num) must be of type int|float, array given diff --git a/ext/standard/tests/password/password_hash_argument_errors.phpt b/ext/standard/tests/password/password_hash_argument_errors.phpt new file mode 100644 index 000000000000..c2e37c30449f --- /dev/null +++ b/ext/standard/tests/password/password_hash_argument_errors.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test password_hash() - argument errors +--FILE-- + password_hash('password'), + fn() => password_hash([], PASSWORD_BCRYPT), + fn() => password_hash('password', []), + fn() => password_hash('password', PASSWORD_BCRYPT, 'options'), +] as $callback) { + try { + $callback(); + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; + } +} + +?> +--EXPECT-- +ArgumentCountError: password_hash() expects at least 2 arguments, 1 given +TypeError: password_hash(): Argument #1 ($password) must be of type string, array given +TypeError: password_hash(): Argument #2 ($algo) must be of type string|int|null, array given +TypeError: password_hash(): Argument #3 ($options) must be of type array, string given diff --git a/ext/standard/tests/password/password_needs_rehash_argument_errors.phpt b/ext/standard/tests/password/password_needs_rehash_argument_errors.phpt new file mode 100644 index 000000000000..dee1bf73b553 --- /dev/null +++ b/ext/standard/tests/password/password_needs_rehash_argument_errors.phpt @@ -0,0 +1,24 @@ +--TEST-- +Test password_needs_rehash() - argument errors +--FILE-- + password_needs_rehash('hash'), + fn() => password_needs_rehash([], PASSWORD_BCRYPT), + fn() => password_needs_rehash('hash', []), + fn() => password_needs_rehash('hash', PASSWORD_BCRYPT, 'options'), +] as $callback) { + try { + $callback(); + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; + } +} + +?> +--EXPECT-- +ArgumentCountError: password_needs_rehash() expects at least 2 arguments, 1 given +TypeError: password_needs_rehash(): Argument #1 ($hash) must be of type string, array given +TypeError: password_needs_rehash(): Argument #2 ($algo) must be of type string|int|null, array given +TypeError: password_needs_rehash(): Argument #3 ($options) must be of type array, string given diff --git a/ext/standard/tests/password/password_verify_argument_errors.phpt b/ext/standard/tests/password/password_verify_argument_errors.phpt new file mode 100644 index 000000000000..5a3027a219ad --- /dev/null +++ b/ext/standard/tests/password/password_verify_argument_errors.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test password_verify() - argument errors +--FILE-- +getMessage(), "\n"; +} + +?> +--EXPECT-- +ArgumentCountError: password_verify() expects exactly 2 arguments, 1 given diff --git a/ext/standard/tests/strings/join_argument_errors.phpt b/ext/standard/tests/strings/join_argument_errors.phpt new file mode 100644 index 000000000000..d389d0854ba1 --- /dev/null +++ b/ext/standard/tests/strings/join_argument_errors.phpt @@ -0,0 +1,20 @@ +--TEST-- +Test join() - argument errors +--FILE-- + join(STDIN, []), + fn() => join(',', new stdClass()), +] as $callback) { + try { + $callback(); + } catch (Throwable $e) { + echo $e::class, ': ', $e->getMessage(), "\n"; + } +} + +?> +--EXPECT-- +TypeError: join(): Argument #1 ($separator) must be of type array|string, resource given +TypeError: join(): Argument #2 ($array) must be of type ?array, stdClass given diff --git a/ext/standard/tests/strings/sprintf_argument_errors.phpt b/ext/standard/tests/strings/sprintf_argument_errors.phpt new file mode 100644 index 000000000000..ad7ad18db99a --- /dev/null +++ b/ext/standard/tests/strings/sprintf_argument_errors.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test sprintf() - argument errors +--FILE-- +getMessage(), "\n"; +} + +?> +--EXPECT-- +TypeError: sprintf(): Argument #1 ($format) must be of type string, array given diff --git a/ext/standard/tests/strings/vprintf_argument_errors.phpt b/ext/standard/tests/strings/vprintf_argument_errors.phpt new file mode 100644 index 000000000000..e00a0a9835c2 --- /dev/null +++ b/ext/standard/tests/strings/vprintf_argument_errors.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test vprintf() - argument errors +--FILE-- +getMessage(), "\n"; +} + +?> +--EXPECT-- +TypeError: vprintf(): Argument #2 ($values) must be of type array, string given