diff options
Diffstat (limited to 'ext/standard/tests/array')
51 files changed, 0 insertions, 12072 deletions
diff --git a/ext/standard/tests/array/001.phpt b/ext/standard/tests/array/001.phpt deleted file mode 100644 index 797a79781f..0000000000 --- a/ext/standard/tests/array/001.phpt +++ /dev/null @@ -1,157 +0,0 @@ ---TEST-- -Test array_merge and array_walk ---INI-- -precision=14 ---FILE-- -<?php -require(dirname(__FILE__) . '/data.inc'); -/* -** Create sample arrays -** Test alpha, numeric (decimal, hex, octal) and special data -** -** -*/ - -/* Helper function to build testing arrays */ -function make_nested_array ($depth, $breadth, $function = NULL, $args = array ()) { - for ($x = 0; $x < $breadth; ++$x) { - if (NULL === $function) { - $array = array (0); - } else { - $array = array (call_user_func_array ($function, $args)); - } - for ($y = 1; $y < $depth; ++$y) { - $array[0] = array ($array[0]); - } - $temp[$x] = $array; - } - return $temp; -} - -/* Nested array */ -$data2 = make_nested_array (3, 3); -$data = array_merge($data, $data2); - -var_dump ($data); - -function echo_kv ($value, $key) { - var_dump ($key); - var_dump ($value); -} - -echo " -- Testing array_walk() -- \n"; -array_walk ($data, 'echo_kv'); - -?> ---EXPECT-- -array(11) { - [0]=> - string(3) "PHP" - [1]=> - string(27) "PHP: Hypertext Preprocessor" - [2]=> - string(4) "Test" - ["test"]=> - int(27) - [3]=> - string(4) "test" - [4]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [5]=> - string(6) "monkey" - [6]=> - float(-0.33333333333333) - [7]=> - array(1) { - [0]=> - array(1) { - [0]=> - array(1) { - [0]=> - int(0) - } - } - } - [8]=> - array(1) { - [0]=> - array(1) { - [0]=> - array(1) { - [0]=> - int(0) - } - } - } - [9]=> - array(1) { - [0]=> - array(1) { - [0]=> - array(1) { - [0]=> - int(0) - } - } - } -} - -- Testing array_walk() -- -int(0) -string(3) "PHP" -int(1) -string(27) "PHP: Hypertext Preprocessor" -int(2) -string(4) "Test" -string(4) "test" -int(27) -int(3) -string(4) "test" -int(4) -array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" -} -int(5) -string(6) "monkey" -int(6) -float(-0.33333333333333) -int(7) -array(1) { - [0]=> - array(1) { - [0]=> - array(1) { - [0]=> - int(0) - } - } -} -int(8) -array(1) { - [0]=> - array(1) { - [0]=> - array(1) { - [0]=> - int(0) - } - } -} -int(9) -array(1) { - [0]=> - array(1) { - [0]=> - array(1) { - [0]=> - int(0) - } - } -} diff --git a/ext/standard/tests/array/002.phpt b/ext/standard/tests/array/002.phpt deleted file mode 100644 index f33cf42067..0000000000 --- a/ext/standard/tests/array/002.phpt +++ /dev/null @@ -1,644 +0,0 @@ ---TEST-- -Test arsort, asort, krsort, ksort, rsort, and sort ---INI-- -precision=14 ---FILE-- -<?php -require(dirname(__FILE__) . '/data.inc'); - -function test_sort ($sort_function, $data) { - echo "\n -- Testing $sort_function() -- \n"; - echo "No second argument:\n"; - $sort_function ($data); - var_dump ($data); - echo "Using SORT_REGULAR:\n"; - $sort_function ($data, SORT_REGULAR); - var_dump ($data); - echo "Using SORT_NUMERIC:\n"; - $sort_function ($data, SORT_NUMERIC); - var_dump ($data); - echo "Using SORT_STRING\n"; - $sort_function ($data, SORT_STRING); - var_dump ($data); -} - -echo "Unsorted data:\n"; -var_dump ($data); -foreach (array ('arsort', 'asort', 'krsort', 'ksort', 'rsort', 'sort') as $test_function) { - test_sort ($test_function, $data); -} - -?> ---EXPECT-- -Unsorted data: -array(8) { - [0]=> - string(3) "PHP" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(4) "Test" - ["test"]=> - int(27) - [1000]=> - string(4) "test" - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [1001]=> - string(6) "monkey" - [16777216]=> - float(-0.33333333333333) -} - - -- Testing arsort() -- -No second argument: -array(8) { - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - ["test"]=> - int(27) - [1000]=> - string(4) "test" - [1001]=> - string(6) "monkey" - [5]=> - string(4) "Test" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [0]=> - string(3) "PHP" - [16777216]=> - float(-0.33333333333333) -} -Using SORT_REGULAR: -array(8) { - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - ["test"]=> - int(27) - [1000]=> - string(4) "test" - [1001]=> - string(6) "monkey" - [5]=> - string(4) "Test" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [0]=> - string(3) "PHP" - [16777216]=> - float(-0.33333333333333) -} -Using SORT_NUMERIC: -array(8) { - ["test"]=> - int(27) - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [0]=> - string(3) "PHP" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [1001]=> - string(6) "monkey" - [5]=> - string(4) "Test" - [1000]=> - string(4) "test" - [16777216]=> - float(-0.33333333333333) -} -Using SORT_STRING -array(8) { - [1000]=> - string(4) "test" - [1001]=> - string(6) "monkey" - [5]=> - string(4) "Test" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [0]=> - string(3) "PHP" - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - ["test"]=> - int(27) - [16777216]=> - float(-0.33333333333333) -} - - -- Testing asort() -- -No second argument: -array(8) { - [16777216]=> - float(-0.33333333333333) - [0]=> - string(3) "PHP" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(4) "Test" - [1001]=> - string(6) "monkey" - [1000]=> - string(4) "test" - ["test"]=> - int(27) - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } -} -Using SORT_REGULAR: -array(8) { - [16777216]=> - float(-0.33333333333333) - [0]=> - string(3) "PHP" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(4) "Test" - [1001]=> - string(6) "monkey" - [1000]=> - string(4) "test" - ["test"]=> - int(27) - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } -} -Using SORT_NUMERIC: -array(8) { - [16777216]=> - float(-0.33333333333333) - [1001]=> - string(6) "monkey" - [1000]=> - string(4) "test" - [5]=> - string(4) "Test" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [0]=> - string(3) "PHP" - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - ["test"]=> - int(27) -} -Using SORT_STRING -array(8) { - [16777216]=> - float(-0.33333333333333) - ["test"]=> - int(27) - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [0]=> - string(3) "PHP" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(4) "Test" - [1001]=> - string(6) "monkey" - [1000]=> - string(4) "test" -} - - -- Testing krsort() -- -No second argument: -array(8) { - [16777216]=> - float(-0.33333333333333) - [1001]=> - string(6) "monkey" - [1000]=> - string(4) "test" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(4) "Test" - ["test"]=> - int(27) - [0]=> - string(3) "PHP" - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } -} -Using SORT_REGULAR: -array(8) { - [16777216]=> - float(-0.33333333333333) - [1001]=> - string(6) "monkey" - [1000]=> - string(4) "test" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(4) "Test" - [0]=> - string(3) "PHP" - ["test"]=> - int(27) - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } -} -Using SORT_NUMERIC: -array(8) { - [16777216]=> - float(-0.33333333333333) - [1001]=> - string(6) "monkey" - [1000]=> - string(4) "test" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(4) "Test" - ["test"]=> - int(27) - [0]=> - string(3) "PHP" - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } -} -Using SORT_STRING -array(8) { - ["test"]=> - int(27) - [5]=> - string(4) "Test" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [16777216]=> - float(-0.33333333333333) - [1001]=> - string(6) "monkey" - [1000]=> - string(4) "test" - [0]=> - string(3) "PHP" - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } -} - - -- Testing ksort() -- -No second argument: -array(8) { - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [0]=> - string(3) "PHP" - ["test"]=> - int(27) - [5]=> - string(4) "Test" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [1000]=> - string(4) "test" - [1001]=> - string(6) "monkey" - [16777216]=> - float(-0.33333333333333) -} -Using SORT_REGULAR: -array(8) { - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - ["test"]=> - int(27) - [0]=> - string(3) "PHP" - [5]=> - string(4) "Test" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [1000]=> - string(4) "test" - [1001]=> - string(6) "monkey" - [16777216]=> - float(-0.33333333333333) -} -Using SORT_NUMERIC: -array(8) { - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [0]=> - string(3) "PHP" - ["test"]=> - int(27) - [5]=> - string(4) "Test" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [1000]=> - string(4) "test" - [1001]=> - string(6) "monkey" - [16777216]=> - float(-0.33333333333333) -} -Using SORT_STRING -array(8) { - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [0]=> - string(3) "PHP" - [1000]=> - string(4) "test" - [1001]=> - string(6) "monkey" - [16777216]=> - float(-0.33333333333333) - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(4) "Test" - ["test"]=> - int(27) -} - - -- Testing rsort() -- -No second argument: -array(8) { - [0]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [1]=> - int(27) - [2]=> - string(4) "test" - [3]=> - string(6) "monkey" - [4]=> - string(4) "Test" - [5]=> - string(27) "PHP: Hypertext Preprocessor" - [6]=> - string(3) "PHP" - [7]=> - float(-0.33333333333333) -} -Using SORT_REGULAR: -array(8) { - [0]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [1]=> - int(27) - [2]=> - string(4) "test" - [3]=> - string(6) "monkey" - [4]=> - string(4) "Test" - [5]=> - string(27) "PHP: Hypertext Preprocessor" - [6]=> - string(3) "PHP" - [7]=> - float(-0.33333333333333) -} -Using SORT_NUMERIC: -array(8) { - [0]=> - int(27) - [1]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [2]=> - string(3) "PHP" - [3]=> - string(27) "PHP: Hypertext Preprocessor" - [4]=> - string(6) "monkey" - [5]=> - string(4) "Test" - [6]=> - string(4) "test" - [7]=> - float(-0.33333333333333) -} -Using SORT_STRING -array(8) { - [0]=> - string(4) "test" - [1]=> - string(6) "monkey" - [2]=> - string(4) "Test" - [3]=> - string(27) "PHP: Hypertext Preprocessor" - [4]=> - string(3) "PHP" - [5]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [6]=> - int(27) - [7]=> - float(-0.33333333333333) -} - - -- Testing sort() -- -No second argument: -array(8) { - [0]=> - float(-0.33333333333333) - [1]=> - string(3) "PHP" - [2]=> - string(27) "PHP: Hypertext Preprocessor" - [3]=> - string(4) "Test" - [4]=> - string(6) "monkey" - [5]=> - string(4) "test" - [6]=> - int(27) - [7]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } -} -Using SORT_REGULAR: -array(8) { - [0]=> - float(-0.33333333333333) - [1]=> - string(3) "PHP" - [2]=> - string(27) "PHP: Hypertext Preprocessor" - [3]=> - string(4) "Test" - [4]=> - string(6) "monkey" - [5]=> - string(4) "test" - [6]=> - int(27) - [7]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } -} -Using SORT_NUMERIC: -array(8) { - [0]=> - float(-0.33333333333333) - [1]=> - string(6) "monkey" - [2]=> - string(4) "test" - [3]=> - string(4) "Test" - [4]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(3) "PHP" - [6]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [7]=> - int(27) -} -Using SORT_STRING -array(8) { - [0]=> - float(-0.33333333333333) - [1]=> - int(27) - [2]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [3]=> - string(3) "PHP" - [4]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(4) "Test" - [6]=> - string(6) "monkey" - [7]=> - string(4) "test" -} diff --git a/ext/standard/tests/array/003.phpt b/ext/standard/tests/array/003.phpt deleted file mode 100644 index f307186553..0000000000 --- a/ext/standard/tests/array/003.phpt +++ /dev/null @@ -1,104 +0,0 @@ ---TEST-- -Test usort, uksort and uasort ---INI-- -precision=14 ---FILE-- -<?php -require(dirname(__FILE__) . '/data.inc'); - -function cmp ($a, $b) { - is_array ($a) - and $a = array_sum ($a); - is_array ($b) - and $b = array_sum ($b); - return strcmp ($a, $b); -} - -echo " -- Testing uasort() -- \n"; -uasort ($data, 'cmp'); -var_dump ($data); - - -echo "\n -- Testing uksort() -- \n"; -uksort ($data, 'cmp'); -var_dump ($data); - -echo "\n -- Testing usort() -- \n"; -usort ($data, 'cmp'); -var_dump ($data); -?> ---EXPECT-- --- Testing uasort() -- -array(8) { - [16777216]=> - float(-0.33333333333333) - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - ["test"]=> - int(27) - [0]=> - string(3) "PHP" - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(4) "Test" - [1001]=> - string(6) "monkey" - [1000]=> - string(4) "test" -} - - -- Testing uksort() -- -array(8) { - [-1000]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [0]=> - string(3) "PHP" - [1000]=> - string(4) "test" - [1001]=> - string(6) "monkey" - [16777216]=> - float(-0.33333333333333) - [17]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(4) "Test" - ["test"]=> - int(27) -} - - -- Testing usort() -- -array(8) { - [0]=> - float(-0.33333333333333) - [1]=> - array(2) { - [0]=> - string(6) "banana" - [1]=> - string(6) "orange" - } - [2]=> - int(27) - [3]=> - string(3) "PHP" - [4]=> - string(27) "PHP: Hypertext Preprocessor" - [5]=> - string(4) "Test" - [6]=> - string(6) "monkey" - [7]=> - string(4) "test" -} diff --git a/ext/standard/tests/array/004.phpt b/ext/standard/tests/array/004.phpt deleted file mode 100644 index 1074134890..0000000000 --- a/ext/standard/tests/array/004.phpt +++ /dev/null @@ -1,59 +0,0 @@ ---TEST-- -Test natsort and natcasesort ---INI-- -precision=14 ---FILE-- -<?php -$data = array( - 'Test1', - 'teST2'=>0, - 5=>'test2', - 'abc'=>'test10', - 'test21' -); - -var_dump($data); - -natsort($data); -var_dump($data); - -natcasesort($data); -var_dump($data); -?> ---EXPECT-- -array(5) { - [0]=> - string(5) "Test1" - ["teST2"]=> - int(0) - [5]=> - string(5) "test2" - ["abc"]=> - string(6) "test10" - [6]=> - string(6) "test21" -} -array(5) { - ["teST2"]=> - int(0) - [0]=> - string(5) "Test1" - [5]=> - string(5) "test2" - ["abc"]=> - string(6) "test10" - [6]=> - string(6) "test21" -} -array(5) { - ["teST2"]=> - int(0) - [0]=> - string(5) "Test1" - [5]=> - string(5) "test2" - ["abc"]=> - string(6) "test10" - [6]=> - string(6) "test21" -}
\ No newline at end of file diff --git a/ext/standard/tests/array/005.phpt b/ext/standard/tests/array/005.phpt deleted file mode 100644 index cdf731827d..0000000000 --- a/ext/standard/tests/array/005.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Test array_shift behaviour ---FILE-- -<?php - -array_shift($GLOBALS); - -$a = array("foo", "bar", "fubar"); -$b = array("3" => "foo", "4" => "bar", "5" => "fubar"); -$c = array("a" => "foo", "b" => "bar", "c" => "fubar"); - -/* simple array */ -echo array_shift($a), "\n"; -var_dump($a); - -/* numerical assoc indices */ -echo array_shift($b), "\n"; -var_dump($b); - -/* assoc indices */ -echo array_shift($c), "\n"; -var_dump($c); - -?> ---EXPECT-- -foo -array(2) { - [0]=> - string(3) "bar" - [1]=> - string(5) "fubar" -} -foo -array(2) { - [0]=> - string(3) "bar" - [1]=> - string(5) "fubar" -} -foo -array(2) { - ["b"]=> - string(3) "bar" - ["c"]=> - string(5) "fubar" -} diff --git a/ext/standard/tests/array/006.phpt b/ext/standard/tests/array/006.phpt deleted file mode 100644 index 4893ad3f06..0000000000 --- a/ext/standard/tests/array/006.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -Test array_pop behaviour ---FILE-- -<?php - -array_pop($GLOBALS); - -$a = array("foo", "bar", "fubar"); -$b = array("3" => "foo", "4" => "bar", "5" => "fubar"); -$c = array("a" => "foo", "b" => "bar", "c" => "fubar"); - -/* simple array */ -echo array_pop($a), "\n"; -array_push($a, "foobar"); -var_dump($a); - -/* numerical assoc indices */ -echo array_pop($b), "\n"; -var_dump($b); - -/* assoc indices */ -echo array_pop($c), "\n"; -var_dump($c); - -?> ---EXPECT-- -fubar -array(3) { - [0]=> - string(3) "foo" - [1]=> - string(3) "bar" - [2]=> - string(6) "foobar" -} -fubar -array(2) { - [3]=> - string(3) "foo" - [4]=> - string(3) "bar" -} -fubar -array(2) { - ["a"]=> - string(3) "foo" - ["b"]=> - string(3) "bar" -} diff --git a/ext/standard/tests/array/007.phpt b/ext/standard/tests/array/007.phpt deleted file mode 100644 index 95479e18bb..0000000000 --- a/ext/standard/tests/array/007.phpt +++ /dev/null @@ -1,651 +0,0 @@ ---TEST-- -Test array_diff and array_diff_assoc behaviour ---FILE-- -<?php -$a = array(1,"big"=>2,3,6,3,5,3,3,3,3,3,3,3,3,3,3); -$b = array(2,2,3,3,3,3,3,3,3,3,3,3,3,3,3); -$c = array(-1,1); -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo '$c='.var_export($c,TRUE).";\n"; -var_dump(array_diff($a,$b,$c)); -var_dump(array_diff_assoc($a,$b,$c)); -$a = array( -'a'=>2, -'b'=>'some', -'c'=>'done', -'z'=>'foo', -'f'=>5, -'fan'=>'fen', -7=>18, -9=>25, -11=>42, -12=>42, -45=>42, -73=>'foo', -95=>'some', -'som3'=>'some', -'want'=>'wanna'); -$b = array( -'a'=>7, -7=>18, -9=>13, -11=>42, -45=>46, -'som3'=>'some', -'foo'=>'some', -'goo'=>'foo', -'f'=>5, -'z'=>'equal' -); -$c = array( -73=>'foo', -95=>'some'); -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo '$c='.var_export($c,TRUE).";\n"; -echo "Results:\n\n"; -var_dump(array_diff($a,$b,$c)); -var_dump(array_diff_assoc($a,$b,$c)); - -echo "-=-=-=-=-=-=-=-=- New functionality from 5.0.0 -=-=-=-=-=-=-=-\n"; -error_reporting(E_ALL); -class cr { - private $priv_member; - public $public_member; - function cr($val) { - $this->priv_member = $val; - $this->public_member = $val; - } - static function comp_func_cr($a, $b) { - if ($a->priv_member === $b->priv_member) return 0; - return ($a->priv_member > $b->priv_member)? 1:-1; - } -} - -function comp_func($a, $b) { - if ($a === $b) return 0; - return ($a > $b)? 1:-1; - -} - -function comp_func_cr($a, $b) { - if ($a->public_member === $b->public_member) return 0; - return ($a->public_member > $b->public_member)? 1:-1; -} - - -/* -$a = array(1,"big"=>2,3,6,3,5,3,3,3,3,3,3,3,3,3,3); -$b = array(2,2,3,3,3,3,3,3,3,3,3,3,3,3,3); -$c = array(-1,1); -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo '$c='.var_export($c,TRUE).";\n"; -var_dump(array_diff($a,$b,$c)); -var_dump(array_diff_assoc($a,$b,$c)); -var_dump(array_udiff($a, $b, $c, "comp_func")); -var_dump(array_diff_uassoc($a,$b,$c, "comp_func")); -*/ - -/* - $a = array(new cr(9),new cr(12),new cr(23),new cr(4),new cr(-15),); - $b = array(new cr(9),new cr(22),new cr( 3),new cr(4),new cr(-15),); - var_dump(array_udiff($a, $b, "comp_func_cr")); -*/ -$a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1=> new cr(4), 2 => new cr(-15),); -$b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr( 3), 1=> new cr(4), 2 => new cr(-15),); - -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo 'var_dump(array_udiff_uassoc($a, $b, "comp_func_cr", "comp_func"));'."\n"; -var_dump(array_udiff_uassoc($a, $b, "comp_func_cr", "comp_func")); - - -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo 'var_dump(array_udiff_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func"));'."\n"; -var_dump(array_udiff_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func")); - - -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo 'var_dump(array_diff_assoc($a, $b));'."\n"; -var_dump(@array_diff_assoc($a, $b)); - - -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo 'var_dump(array_udiff($a, $b, "comp_func_cr"));'."\n"; -var_dump(array_udiff($a, $b, "comp_func_cr")); - - -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo 'var_dump(array_udiff_assoc($a, $b, "comp_func_cr"));'."\n"; -var_dump(array_udiff_assoc($a, $b, "comp_func_cr")); - -?> ---EXPECTF-- -$a=array ( - 0 => 1, - 'big' => 2, - 1 => 3, - 2 => 6, - 3 => 3, - 4 => 5, - 5 => 3, - 6 => 3, - 7 => 3, - 8 => 3, - 9 => 3, - 10 => 3, - 11 => 3, - 12 => 3, - 13 => 3, - 14 => 3, -); -$b=array ( - 0 => 2, - 1 => 2, - 2 => 3, - 3 => 3, - 4 => 3, - 5 => 3, - 6 => 3, - 7 => 3, - 8 => 3, - 9 => 3, - 10 => 3, - 11 => 3, - 12 => 3, - 13 => 3, - 14 => 3, -); -$c=array ( - 0 => -1, - 1 => 1, -); -array(2) { - [2]=> - int(6) - [4]=> - int(5) -} -array(5) { - [0]=> - int(1) - ["big"]=> - int(2) - [1]=> - int(3) - [2]=> - int(6) - [4]=> - int(5) -} -$a=array ( - 'a' => 2, - 'b' => 'some', - 'c' => 'done', - 'z' => 'foo', - 'f' => 5, - 'fan' => 'fen', - 7 => 18, - 9 => 25, - 11 => 42, - 12 => 42, - 45 => 42, - 73 => 'foo', - 95 => 'some', - 'som3' => 'some', - 'want' => 'wanna', -); -$b=array ( - 'a' => 7, - 7 => 18, - 9 => 13, - 11 => 42, - 45 => 46, - 'som3' => 'some', - 'foo' => 'some', - 'goo' => 'foo', - 'f' => 5, - 'z' => 'equal', -); -$c=array ( - 73 => 'foo', - 95 => 'some', -); -Results: - -array(5) { - ["a"]=> - int(2) - ["c"]=> - string(4) "done" - ["fan"]=> - string(3) "fen" - [9]=> - int(25) - ["want"]=> - string(5) "wanna" -} -array(9) { - ["a"]=> - int(2) - ["b"]=> - string(4) "some" - ["c"]=> - string(4) "done" - ["z"]=> - string(3) "foo" - ["fan"]=> - string(3) "fen" - [9]=> - int(25) - [12]=> - int(42) - [45]=> - int(42) - ["want"]=> - string(5) "wanna" -} --=-=-=-=-=-=-=-=- New functionality from 5.0.0 -=-=-=-=-=-=-=- -$a=array ( - '0.1' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 12; - public $public_member = 12; - }, - 0 => - class cr { - private $priv_member = 23; - public $public_member = 23; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -$b=array ( - '0.2' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 22; - public $public_member = 22; - }, - 0 => - class cr { - private $priv_member = 3; - public $public_member = 3; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -var_dump(array_udiff_uassoc($a, $b, "comp_func_cr", "comp_func")); -array(3) { - ["0.1"]=> - object(cr)#1 (2) { - ["priv_member:private"]=> - int(9) - ["public_member"]=> - int(9) - } - ["0.5"]=> - object(cr)#2 (2) { - ["priv_member:private"]=> - int(12) - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#3 (2) { - ["priv_member:private"]=> - int(23) - ["public_member"]=> - int(23) - } -} -$a=array ( - '0.1' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 12; - public $public_member = 12; - }, - 0 => - class cr { - private $priv_member = 23; - public $public_member = 23; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -$b=array ( - '0.2' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 22; - public $public_member = 22; - }, - 0 => - class cr { - private $priv_member = 3; - public $public_member = 3; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -var_dump(array_udiff_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func")); -array(3) { - ["0.1"]=> - object(cr)#1 (2) { - ["priv_member:private"]=> - int(9) - ["public_member"]=> - int(9) - } - ["0.5"]=> - object(cr)#2 (2) { - ["priv_member:private"]=> - int(12) - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#3 (2) { - ["priv_member:private"]=> - int(23) - ["public_member"]=> - int(23) - } -} -$a=array ( - '0.1' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 12; - public $public_member = 12; - }, - 0 => - class cr { - private $priv_member = 23; - public $public_member = 23; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -$b=array ( - '0.2' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 22; - public $public_member = 22; - }, - 0 => - class cr { - private $priv_member = 3; - public $public_member = 3; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -var_dump(array_diff_assoc($a, $b)); -array(5) { - ["0.1"]=> - object(cr)#1 (2) { - ["priv_member:private"]=> - int(9) - ["public_member"]=> - int(9) - } - ["0.5"]=> - object(cr)#2 (2) { - ["priv_member:private"]=> - int(12) - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#3 (2) { - ["priv_member:private"]=> - int(23) - ["public_member"]=> - int(23) - } - [1]=> - object(cr)#4 (2) { - ["priv_member:private"]=> - int(4) - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#5 (2) { - ["priv_member:private"]=> - int(-15) - ["public_member"]=> - int(-15) - } -} -$a=array ( - '0.1' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 12; - public $public_member = 12; - }, - 0 => - class cr { - private $priv_member = 23; - public $public_member = 23; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -$b=array ( - '0.2' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 22; - public $public_member = 22; - }, - 0 => - class cr { - private $priv_member = 3; - public $public_member = 3; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -var_dump(array_udiff($a, $b, "comp_func_cr")); -array(2) { - ["0.5"]=> - object(cr)#2 (2) { - ["priv_member:private"]=> - int(12) - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#3 (2) { - ["priv_member:private"]=> - int(23) - ["public_member"]=> - int(23) - } -} -$a=array ( - '0.1' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 12; - public $public_member = 12; - }, - 0 => - class cr { - private $priv_member = 23; - public $public_member = 23; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -$b=array ( - '0.2' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 22; - public $public_member = 22; - }, - 0 => - class cr { - private $priv_member = 3; - public $public_member = 3; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -var_dump(array_udiff_assoc($a, $b, "comp_func_cr")); -array(3) { - ["0.1"]=> - object(cr)#1 (2) { - ["priv_member:private"]=> - int(9) - ["public_member"]=> - int(9) - } - ["0.5"]=> - object(cr)#2 (2) { - ["priv_member:private"]=> - int(12) - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#3 (2) { - ["priv_member:private"]=> - int(23) - ["public_member"]=> - int(23) - } -} diff --git a/ext/standard/tests/array/008.phpt b/ext/standard/tests/array/008.phpt deleted file mode 100644 index a3dde36296..0000000000 --- a/ext/standard/tests/array/008.phpt +++ /dev/null @@ -1,310 +0,0 @@ ---TEST-- -Test array_intersect and array_intersect_assoc behaviour ---FILE-- -<?php -//-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=- TEST 1 -=-=-=-=- -$a = array(1,"big"=>2,2,6,3,5,3,3,454,'some_string',3,3,3,3,3,3,3,3,17); -$b = array(2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,17,25,'some_string',7,8,9,109,78,17); -$c = array(-1,2,1,15,25,17); -echo str_repeat("-=",10)." TEST 1 ".str_repeat("-=",20)."\n"; -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo '$c='.var_export($c,TRUE).";\n"; - -echo 'array_intersect($a,$b,$c);'."\n"; -var_dump(array_intersect($a,$b,$c)); - -echo 'array_intersect_assoc($a,$b,$c);'."\n"; -var_dump(array_intersect_assoc($a,$b,$c)); - -echo 'array_intersect($a,$b);'."\n"; -var_dump(array_intersect($a,$b)); - -echo 'array_intersect_assoc($a,$b);'."\n"; -var_dump(array_intersect_assoc($a,$b)); - -//-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=- TEST 2 -=-=-=-=-=- -$a = array( -'a'=>2, -'b'=>'some', -'c'=>'done', -'z'=>'foo', -'f'=>5, -'fan'=>'fen', -'bad'=>'bed', -'gate'=>'web', -7=>18, -9=>25, -11=>42, -12=>42, -45=>42, -73=>'foo', -95=>'some', -'som3'=>'some', -'want'=>'wanna'); - - -$b = array( -'a'=>7, -7=>18, -9=>13, -11=>42, -45=>46, -'som3'=>'some', -'foo'=>'some', -'goo'=>'foo', -'f'=>5, -'z'=>'equal', -'gate'=>'web' -); -$c = array( -'gate'=>'web', -73=>'foo', -95=>'some' -); - -echo str_repeat("-=",10)." TEST 2 ".str_repeat("-=",20)."\n"; -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo '$c='.var_export($c,TRUE).";\n"; -echo "\n\nResults:\n\n"; - -echo 'array_intersect($a,$b,$c);'."\n"; -var_dump(array_intersect($a,$b,$c)); - -echo 'array_intersect_assoc($a,$b,$c);'."\n"; -var_dump(array_intersect_assoc($a,$b,$c)); - -echo 'array_intersect($a,$b);'."\n"; -var_dump(array_intersect($a,$b)); - -echo 'array_intersect_assoc($a,$b);'."\n"; -var_dump(array_intersect_assoc($a,$b)); -?> ---EXPECT-- --=-=-=-=-=-=-=-=-=-= TEST 1 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -$a=array ( - 0 => 1, - 'big' => 2, - 1 => 2, - 2 => 6, - 3 => 3, - 4 => 5, - 5 => 3, - 6 => 3, - 7 => 454, - 8 => 'some_string', - 9 => 3, - 10 => 3, - 11 => 3, - 12 => 3, - 13 => 3, - 14 => 3, - 15 => 3, - 16 => 3, - 17 => 17, -); -$b=array ( - 0 => 2, - 1 => 2, - 2 => 3, - 3 => 3, - 4 => 3, - 5 => 3, - 6 => 3, - 7 => 3, - 8 => 3, - 9 => 3, - 10 => 3, - 11 => 3, - 12 => 3, - 13 => 3, - 14 => 3, - 15 => 17, - 16 => 25, - 17 => 'some_string', - 18 => 7, - 19 => 8, - 20 => 9, - 21 => 109, - 22 => 78, - 23 => 17, -); -$c=array ( - 0 => -1, - 1 => 2, - 2 => 1, - 3 => 15, - 4 => 25, - 5 => 17, -); -array_intersect($a,$b,$c); -array(3) { - ["big"]=> - int(2) - [1]=> - int(2) - [17]=> - int(17) -} -array_intersect_assoc($a,$b,$c); -array(1) { - [1]=> - int(2) -} -array_intersect($a,$b); -array(15) { - ["big"]=> - int(2) - [1]=> - int(2) - [3]=> - int(3) - [5]=> - int(3) - [6]=> - int(3) - [8]=> - string(11) "some_string" - [9]=> - int(3) - [10]=> - int(3) - [11]=> - int(3) - [12]=> - int(3) - [13]=> - int(3) - [14]=> - int(3) - [15]=> - int(3) - [16]=> - int(3) - [17]=> - int(17) -} -array_intersect_assoc($a,$b); -array(10) { - [1]=> - int(2) - [3]=> - int(3) - [5]=> - int(3) - [6]=> - int(3) - [9]=> - int(3) - [10]=> - int(3) - [11]=> - int(3) - [12]=> - int(3) - [13]=> - int(3) - [14]=> - int(3) -} --=-=-=-=-=-=-=-=-=-= TEST 2 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -$a=array ( - 'a' => 2, - 'b' => 'some', - 'c' => 'done', - 'z' => 'foo', - 'f' => 5, - 'fan' => 'fen', - 'bad' => 'bed', - 'gate' => 'web', - 7 => 18, - 9 => 25, - 11 => 42, - 12 => 42, - 45 => 42, - 73 => 'foo', - 95 => 'some', - 'som3' => 'some', - 'want' => 'wanna', -); -$b=array ( - 'a' => 7, - 7 => 18, - 9 => 13, - 11 => 42, - 45 => 46, - 'som3' => 'some', - 'foo' => 'some', - 'goo' => 'foo', - 'f' => 5, - 'z' => 'equal', - 'gate' => 'web', -); -$c=array ( - 'gate' => 'web', - 73 => 'foo', - 95 => 'some', -); - - -Results: - -array_intersect($a,$b,$c); -array(6) { - ["b"]=> - string(4) "some" - ["z"]=> - string(3) "foo" - ["gate"]=> - string(3) "web" - [73]=> - string(3) "foo" - [95]=> - string(4) "some" - ["som3"]=> - string(4) "some" -} -array_intersect_assoc($a,$b,$c); -array(1) { - ["gate"]=> - string(3) "web" -} -array_intersect($a,$b); -array(11) { - ["b"]=> - string(4) "some" - ["z"]=> - string(3) "foo" - ["f"]=> - int(5) - ["gate"]=> - string(3) "web" - [7]=> - int(18) - [11]=> - int(42) - [12]=> - int(42) - [45]=> - int(42) - [73]=> - string(3) "foo" - [95]=> - string(4) "some" - ["som3"]=> - string(4) "some" -} -array_intersect_assoc($a,$b); -array(5) { - ["f"]=> - int(5) - ["gate"]=> - string(3) "web" - [7]=> - int(18) - [11]=> - int(42) - ["som3"]=> - string(4) "some" -} diff --git a/ext/standard/tests/array/array_change_key_case.phpt b/ext/standard/tests/array/array_change_key_case.phpt deleted file mode 100644 index 0cd1d8203a..0000000000 --- a/ext/standard/tests/array/array_change_key_case.phpt +++ /dev/null @@ -1,769 +0,0 @@ ---TEST-- -array_change_key_case() ---FILE-- -<?php -$arrays = array ( - array (), - array (0), - array (1), - array (-1), - array (0, 2, 3, 4, 5), - array (1, 2, 3, 4, 5), - array ("" => 1), - array ("a" => 1), - array ("Z" => 1), - array ("one" => 1), - array ("ONE" => 1), - array ("OnE" => 1), - array ("oNe" => 1), - array ("one" => 1, "two" => 2), - array ("ONE" => 1, "two" => 2), - array ("OnE" => 1, "two" => 2), - array ("oNe" => 1, "two" => 2), - array ("one" => 1, "TWO" => 2), - array ("ONE" => 1, "TWO" => 2), - array ("OnE" => 1, "TWO" => 2), - array ("oNe" => 1, "TWO" => 2), - array ("one" => 1, "TwO" => 2), - array ("ONE" => 1, "TwO" => 2), - array ("OnE" => 1, "TwO" => 2), - array ("oNe" => 1, "TwO" => 2), - array ("one" => 1, "tWo" => 2), - array ("ONE" => 1, "tWo" => 2), - array ("OnE" => 1, "tWo" => 2), - array ("oNe" => 1, "tWo" => 2), - array ("one" => 1, 2), - array ("ONE" => 1, 2), - array ("OnE" => 1, 2), - array ("oNe" => 1, 2), - array ("ONE" => 1, "TWO" => 2, "THREE" => 3, "FOUR" => "four"), - array ("one" => 1, "two" => 2, "three" => 3, "four" => "FOUR"), - array ("ONE" => 1, "TWO" => 2, "three" => 3, "four" => "FOUR"), - array ("one" => 1, "two" => 2, "THREE" => 3, "FOUR" => "four") -); - -foreach ($arrays as $item) { - var_dump(array_change_key_case($item)); - var_dump(array_change_key_case($item, CASE_UPPER)); - var_dump(array_change_key_case($item, CASE_LOWER)); - echo "\n"; -} -echo "end\n"; -?> ---EXPECT-- -array(0) { -} -array(0) { -} -array(0) { -} - -array(1) { - [0]=> - int(0) -} -array(1) { - [0]=> - int(0) -} -array(1) { - [0]=> - int(0) -} - -array(1) { - [0]=> - int(1) -} -array(1) { - [0]=> - int(1) -} -array(1) { - [0]=> - int(1) -} - -array(1) { - [0]=> - int(-1) -} -array(1) { - [0]=> - int(-1) -} -array(1) { - [0]=> - int(-1) -} - -array(5) { - [0]=> - int(0) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) -} -array(5) { - [0]=> - int(0) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) -} -array(5) { - [0]=> - int(0) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) -} - -array(5) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) -} -array(5) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) -} -array(5) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) -} - -array(1) { - [""]=> - int(1) -} -array(1) { - [""]=> - int(1) -} -array(1) { - [""]=> - int(1) -} - -array(1) { - ["a"]=> - int(1) -} -array(1) { - ["A"]=> - int(1) -} -array(1) { - ["a"]=> - int(1) -} - -array(1) { - ["z"]=> - int(1) -} -array(1) { - ["Z"]=> - int(1) -} -array(1) { - ["z"]=> - int(1) -} - -array(1) { - ["one"]=> - int(1) -} -array(1) { - ["ONE"]=> - int(1) -} -array(1) { - ["one"]=> - int(1) -} - -array(1) { - ["one"]=> - int(1) -} -array(1) { - ["ONE"]=> - int(1) -} -array(1) { - ["one"]=> - int(1) -} - -array(1) { - ["one"]=> - int(1) -} -array(1) { - ["ONE"]=> - int(1) -} -array(1) { - ["one"]=> - int(1) -} - -array(1) { - ["one"]=> - int(1) -} -array(1) { - ["ONE"]=> - int(1) -} -array(1) { - ["one"]=> - int(1) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - ["two"]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - [0]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - [0]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - [0]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - [0]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - [0]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - [0]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - [0]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - [0]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - [0]=> - int(2) -} - -array(2) { - ["one"]=> - int(1) - [0]=> - int(2) -} -array(2) { - ["ONE"]=> - int(1) - [0]=> - int(2) -} -array(2) { - ["one"]=> - int(1) - [0]=> - int(2) -} - -array(4) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) - ["four"]=> - string(4) "four" -} -array(4) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) - ["THREE"]=> - int(3) - ["FOUR"]=> - string(4) "four" -} -array(4) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) - ["four"]=> - string(4) "four" -} - -array(4) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) - ["four"]=> - string(4) "FOUR" -} -array(4) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) - ["THREE"]=> - int(3) - ["FOUR"]=> - string(4) "FOUR" -} -array(4) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) - ["four"]=> - string(4) "FOUR" -} - -array(4) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) - ["four"]=> - string(4) "FOUR" -} -array(4) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) - ["THREE"]=> - int(3) - ["FOUR"]=> - string(4) "FOUR" -} -array(4) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) - ["four"]=> - string(4) "FOUR" -} - -array(4) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) - ["four"]=> - string(4) "four" -} -array(4) { - ["ONE"]=> - int(1) - ["TWO"]=> - int(2) - ["THREE"]=> - int(3) - ["FOUR"]=> - string(4) "four" -} -array(4) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) - ["four"]=> - string(4) "four" -} - -end diff --git a/ext/standard/tests/array/array_chunk.phpt b/ext/standard/tests/array/array_chunk.phpt deleted file mode 100644 index 061c6994bf..0000000000 --- a/ext/standard/tests/array/array_chunk.phpt +++ /dev/null @@ -1,5326 +0,0 @@ ---TEST-- -array_chunk() ---FILE-- -<?php -$arrays = array ( - array (), - array (0), - array (1), - array (-1), - array (0, 2), - array (1, 2, 3), - - array (1 => 0), - array (2 => 1), - array (3 => -1), - - array (1 => 0, 2 => 2), - array (1 => 1, 2 => 2, 3 => 3), - array (0 => 0, 3 => 2), - array (1 => 1, 5 => 2, 8 => 3), - - array (1, 2), - array (0, 1, 2), - array (1, 2, 3), - array (0, 1, 2, 3), - array (1, 2, 3, 4), - array (0, 1, 2, 3, 4), - array (1, 2, 3, 4, 5, 6, 7, 8, 9, 10), - array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10), - - array ("a" => 1), - array ("b" => 1, "c" => 2), - array ("p" => 1, "q" => 2, "r" => 3, "s" => 4, "u" => 5, "v" => 6), - - array ("a" => "A"), - array ("p" => "A", "q" => "B", "r" => "C", "s" => "D", "u" => "E", "v" => "F"), -); - -foreach ($arrays as $item) { - echo "===========================================\n"; - var_dump ($item); - echo "-------------------------------------------\n"; - for ($i = 0; $i < (sizeof($item) + 1); $i++) { - echo "[$i]\n"; - var_dump (@array_chunk ($item, $i)); - var_dump (@array_chunk ($item, $i, TRUE)); - var_dump (@array_chunk ($item, $i, FALSE)); - echo "\n"; - } - echo "\n"; -} -echo "end\n"; -?> ---EXPECT-- -=========================================== -array(0) { -} -------------------------------------------- -[0] -NULL -NULL -NULL - - -=========================================== -array(1) { - [0]=> - int(0) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(1) { - [0]=> - array(1) { - [0]=> - int(0) - } -} -array(1) { - [0]=> - array(1) { - [0]=> - int(0) - } -} -array(1) { - [0]=> - array(1) { - [0]=> - int(0) - } -} - - -=========================================== -array(1) { - [0]=> - int(1) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(1) { - [0]=> - array(1) { - [0]=> - int(1) - } -} -array(1) { - [0]=> - array(1) { - [0]=> - int(1) - } -} -array(1) { - [0]=> - array(1) { - [0]=> - int(1) - } -} - - -=========================================== -array(1) { - [0]=> - int(-1) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(1) { - [0]=> - array(1) { - [0]=> - int(-1) - } -} -array(1) { - [0]=> - array(1) { - [0]=> - int(-1) - } -} -array(1) { - [0]=> - array(1) { - [0]=> - int(-1) - } -} - - -=========================================== -array(2) { - [0]=> - int(0) - [1]=> - int(2) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(2) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [1]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} - -[2] -array(1) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(2) - } -} - - -=========================================== -array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(3) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } -} -array(3) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [1]=> - int(2) - } - [2]=> - array(1) { - [2]=> - int(3) - } -} -array(3) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } -} - -[2] -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(1) { - [0]=> - int(3) - } -} -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(1) { - [2]=> - int(3) - } -} -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(1) { - [0]=> - int(3) - } -} - -[3] -array(1) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } -} -array(1) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } -} -array(1) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } -} - - -=========================================== -array(1) { - [1]=> - int(0) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(1) { - [0]=> - array(1) { - [0]=> - int(0) - } -} -array(1) { - [0]=> - array(1) { - [1]=> - int(0) - } -} -array(1) { - [0]=> - array(1) { - [0]=> - int(0) - } -} - - -=========================================== -array(1) { - [2]=> - int(1) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(1) { - [0]=> - array(1) { - [0]=> - int(1) - } -} -array(1) { - [0]=> - array(1) { - [2]=> - int(1) - } -} -array(1) { - [0]=> - array(1) { - [0]=> - int(1) - } -} - - -=========================================== -array(1) { - [3]=> - int(-1) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(1) { - [0]=> - array(1) { - [0]=> - int(-1) - } -} -array(1) { - [0]=> - array(1) { - [3]=> - int(-1) - } -} -array(1) { - [0]=> - array(1) { - [0]=> - int(-1) - } -} - - -=========================================== -array(2) { - [1]=> - int(0) - [2]=> - int(2) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(2) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [1]=> - int(0) - } - [1]=> - array(1) { - [2]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} - -[2] -array(1) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [1]=> - int(0) - [2]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(2) - } -} - - -=========================================== -array(3) { - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(3) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } -} -array(3) { - [0]=> - array(1) { - [1]=> - int(1) - } - [1]=> - array(1) { - [2]=> - int(2) - } - [2]=> - array(1) { - [3]=> - int(3) - } -} -array(3) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } -} - -[2] -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(1) { - [0]=> - int(3) - } -} -array(2) { - [0]=> - array(2) { - [1]=> - int(1) - [2]=> - int(2) - } - [1]=> - array(1) { - [3]=> - int(3) - } -} -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(1) { - [0]=> - int(3) - } -} - -[3] -array(1) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } -} -array(1) { - [0]=> - array(3) { - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - } -} -array(1) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } -} - - -=========================================== -array(2) { - [0]=> - int(0) - [3]=> - int(2) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(2) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [3]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} - -[2] -array(1) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [0]=> - int(0) - [3]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(2) - } -} - - -=========================================== -array(3) { - [1]=> - int(1) - [5]=> - int(2) - [8]=> - int(3) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(3) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } -} -array(3) { - [0]=> - array(1) { - [1]=> - int(1) - } - [1]=> - array(1) { - [5]=> - int(2) - } - [2]=> - array(1) { - [8]=> - int(3) - } -} -array(3) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } -} - -[2] -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(1) { - [0]=> - int(3) - } -} -array(2) { - [0]=> - array(2) { - [1]=> - int(1) - [5]=> - int(2) - } - [1]=> - array(1) { - [8]=> - int(3) - } -} -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(1) { - [0]=> - int(3) - } -} - -[3] -array(1) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } -} -array(1) { - [0]=> - array(3) { - [1]=> - int(1) - [5]=> - int(2) - [8]=> - int(3) - } -} -array(1) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } -} - - -=========================================== -array(2) { - [0]=> - int(1) - [1]=> - int(2) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(2) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [1]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} - -[2] -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - - -=========================================== -array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(3) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(1) - } - [2]=> - array(1) { - [0]=> - int(2) - } -} -array(3) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [1]=> - int(1) - } - [2]=> - array(1) { - [2]=> - int(2) - } -} -array(3) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(1) - } - [2]=> - array(1) { - [0]=> - int(2) - } -} - -[2] -array(2) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} -array(2) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(1) - } - [1]=> - array(1) { - [2]=> - int(2) - } -} -array(2) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} - -[3] -array(1) { - [0]=> - array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - } -} -array(1) { - [0]=> - array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - } -} -array(1) { - [0]=> - array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - } -} - - -=========================================== -array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(3) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } -} -array(3) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [1]=> - int(2) - } - [2]=> - array(1) { - [2]=> - int(3) - } -} -array(3) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } -} - -[2] -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(1) { - [0]=> - int(3) - } -} -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(1) { - [2]=> - int(3) - } -} -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(1) { - [0]=> - int(3) - } -} - -[3] -array(1) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } -} -array(1) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } -} -array(1) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } -} - - -=========================================== -array(4) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(4) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(1) - } - [2]=> - array(1) { - [0]=> - int(2) - } - [3]=> - array(1) { - [0]=> - int(3) - } -} -array(4) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [1]=> - int(1) - } - [2]=> - array(1) { - [2]=> - int(2) - } - [3]=> - array(1) { - [3]=> - int(3) - } -} -array(4) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(1) - } - [2]=> - array(1) { - [0]=> - int(2) - } - [3]=> - array(1) { - [0]=> - int(3) - } -} - -[2] -array(2) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(1) - } - [1]=> - array(2) { - [0]=> - int(2) - [1]=> - int(3) - } -} -array(2) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(1) - } - [1]=> - array(2) { - [2]=> - int(2) - [3]=> - int(3) - } -} -array(2) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(1) - } - [1]=> - array(2) { - [0]=> - int(2) - [1]=> - int(3) - } -} - -[3] -array(2) { - [0]=> - array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - } - [1]=> - array(1) { - [0]=> - int(3) - } -} -array(2) { - [0]=> - array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - } - [1]=> - array(1) { - [3]=> - int(3) - } -} -array(2) { - [0]=> - array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - } - [1]=> - array(1) { - [0]=> - int(3) - } -} - -[4] -array(1) { - [0]=> - array(4) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - } -} -array(1) { - [0]=> - array(4) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - } -} -array(1) { - [0]=> - array(4) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - } -} - - -=========================================== -array(4) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(4) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } - [3]=> - array(1) { - [0]=> - int(4) - } -} -array(4) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [1]=> - int(2) - } - [2]=> - array(1) { - [2]=> - int(3) - } - [3]=> - array(1) { - [3]=> - int(4) - } -} -array(4) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } - [3]=> - array(1) { - [0]=> - int(4) - } -} - -[2] -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(2) { - [0]=> - int(3) - [1]=> - int(4) - } -} -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(2) { - [2]=> - int(3) - [3]=> - int(4) - } -} -array(2) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(2) { - [0]=> - int(3) - [1]=> - int(4) - } -} - -[3] -array(2) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } - [1]=> - array(1) { - [0]=> - int(4) - } -} -array(2) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } - [1]=> - array(1) { - [3]=> - int(4) - } -} -array(2) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } - [1]=> - array(1) { - [0]=> - int(4) - } -} - -[4] -array(1) { - [0]=> - array(4) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - } -} -array(1) { - [0]=> - array(4) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - } -} -array(1) { - [0]=> - array(4) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - } -} - - -=========================================== -array(5) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(5) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(1) - } - [2]=> - array(1) { - [0]=> - int(2) - } - [3]=> - array(1) { - [0]=> - int(3) - } - [4]=> - array(1) { - [0]=> - int(4) - } -} -array(5) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [1]=> - int(1) - } - [2]=> - array(1) { - [2]=> - int(2) - } - [3]=> - array(1) { - [3]=> - int(3) - } - [4]=> - array(1) { - [4]=> - int(4) - } -} -array(5) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(1) - } - [2]=> - array(1) { - [0]=> - int(2) - } - [3]=> - array(1) { - [0]=> - int(3) - } - [4]=> - array(1) { - [0]=> - int(4) - } -} - -[2] -array(3) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(1) - } - [1]=> - array(2) { - [0]=> - int(2) - [1]=> - int(3) - } - [2]=> - array(1) { - [0]=> - int(4) - } -} -array(3) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(1) - } - [1]=> - array(2) { - [2]=> - int(2) - [3]=> - int(3) - } - [2]=> - array(1) { - [4]=> - int(4) - } -} -array(3) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(1) - } - [1]=> - array(2) { - [0]=> - int(2) - [1]=> - int(3) - } - [2]=> - array(1) { - [0]=> - int(4) - } -} - -[3] -array(2) { - [0]=> - array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - } - [1]=> - array(2) { - [0]=> - int(3) - [1]=> - int(4) - } -} -array(2) { - [0]=> - array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - } - [1]=> - array(2) { - [3]=> - int(3) - [4]=> - int(4) - } -} -array(2) { - [0]=> - array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - } - [1]=> - array(2) { - [0]=> - int(3) - [1]=> - int(4) - } -} - -[4] -array(2) { - [0]=> - array(4) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - } - [1]=> - array(1) { - [0]=> - int(4) - } -} -array(2) { - [0]=> - array(4) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - } - [1]=> - array(1) { - [4]=> - int(4) - } -} -array(2) { - [0]=> - array(4) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - } - [1]=> - array(1) { - [0]=> - int(4) - } -} - -[5] -array(1) { - [0]=> - array(5) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - } -} -array(1) { - [0]=> - array(5) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - } -} -array(1) { - [0]=> - array(5) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - } -} - - -=========================================== -array(10) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - [9]=> - int(10) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(10) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } - [3]=> - array(1) { - [0]=> - int(4) - } - [4]=> - array(1) { - [0]=> - int(5) - } - [5]=> - array(1) { - [0]=> - int(6) - } - [6]=> - array(1) { - [0]=> - int(7) - } - [7]=> - array(1) { - [0]=> - int(8) - } - [8]=> - array(1) { - [0]=> - int(9) - } - [9]=> - array(1) { - [0]=> - int(10) - } -} -array(10) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [1]=> - int(2) - } - [2]=> - array(1) { - [2]=> - int(3) - } - [3]=> - array(1) { - [3]=> - int(4) - } - [4]=> - array(1) { - [4]=> - int(5) - } - [5]=> - array(1) { - [5]=> - int(6) - } - [6]=> - array(1) { - [6]=> - int(7) - } - [7]=> - array(1) { - [7]=> - int(8) - } - [8]=> - array(1) { - [8]=> - int(9) - } - [9]=> - array(1) { - [9]=> - int(10) - } -} -array(10) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } - [3]=> - array(1) { - [0]=> - int(4) - } - [4]=> - array(1) { - [0]=> - int(5) - } - [5]=> - array(1) { - [0]=> - int(6) - } - [6]=> - array(1) { - [0]=> - int(7) - } - [7]=> - array(1) { - [0]=> - int(8) - } - [8]=> - array(1) { - [0]=> - int(9) - } - [9]=> - array(1) { - [0]=> - int(10) - } -} - -[2] -array(5) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(2) { - [0]=> - int(3) - [1]=> - int(4) - } - [2]=> - array(2) { - [0]=> - int(5) - [1]=> - int(6) - } - [3]=> - array(2) { - [0]=> - int(7) - [1]=> - int(8) - } - [4]=> - array(2) { - [0]=> - int(9) - [1]=> - int(10) - } -} -array(5) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(2) { - [2]=> - int(3) - [3]=> - int(4) - } - [2]=> - array(2) { - [4]=> - int(5) - [5]=> - int(6) - } - [3]=> - array(2) { - [6]=> - int(7) - [7]=> - int(8) - } - [4]=> - array(2) { - [8]=> - int(9) - [9]=> - int(10) - } -} -array(5) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(2) { - [0]=> - int(3) - [1]=> - int(4) - } - [2]=> - array(2) { - [0]=> - int(5) - [1]=> - int(6) - } - [3]=> - array(2) { - [0]=> - int(7) - [1]=> - int(8) - } - [4]=> - array(2) { - [0]=> - int(9) - [1]=> - int(10) - } -} - -[3] -array(4) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } - [1]=> - array(3) { - [0]=> - int(4) - [1]=> - int(5) - [2]=> - int(6) - } - [2]=> - array(3) { - [0]=> - int(7) - [1]=> - int(8) - [2]=> - int(9) - } - [3]=> - array(1) { - [0]=> - int(10) - } -} -array(4) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } - [1]=> - array(3) { - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - } - [2]=> - array(3) { - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - } - [3]=> - array(1) { - [9]=> - int(10) - } -} -array(4) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } - [1]=> - array(3) { - [0]=> - int(4) - [1]=> - int(5) - [2]=> - int(6) - } - [2]=> - array(3) { - [0]=> - int(7) - [1]=> - int(8) - [2]=> - int(9) - } - [3]=> - array(1) { - [0]=> - int(10) - } -} - -[4] -array(3) { - [0]=> - array(4) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - } - [1]=> - array(4) { - [0]=> - int(5) - [1]=> - int(6) - [2]=> - int(7) - [3]=> - int(8) - } - [2]=> - array(2) { - [0]=> - int(9) - [1]=> - int(10) - } -} -array(3) { - [0]=> - array(4) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - } - [1]=> - array(4) { - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - } - [2]=> - array(2) { - [8]=> - int(9) - [9]=> - int(10) - } -} -array(3) { - [0]=> - array(4) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - } - [1]=> - array(4) { - [0]=> - int(5) - [1]=> - int(6) - [2]=> - int(7) - [3]=> - int(8) - } - [2]=> - array(2) { - [0]=> - int(9) - [1]=> - int(10) - } -} - -[5] -array(2) { - [0]=> - array(5) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - } - [1]=> - array(5) { - [0]=> - int(6) - [1]=> - int(7) - [2]=> - int(8) - [3]=> - int(9) - [4]=> - int(10) - } -} -array(2) { - [0]=> - array(5) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - } - [1]=> - array(5) { - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - [9]=> - int(10) - } -} -array(2) { - [0]=> - array(5) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - } - [1]=> - array(5) { - [0]=> - int(6) - [1]=> - int(7) - [2]=> - int(8) - [3]=> - int(9) - [4]=> - int(10) - } -} - -[6] -array(2) { - [0]=> - array(6) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - } - [1]=> - array(4) { - [0]=> - int(7) - [1]=> - int(8) - [2]=> - int(9) - [3]=> - int(10) - } -} -array(2) { - [0]=> - array(6) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - } - [1]=> - array(4) { - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - [9]=> - int(10) - } -} -array(2) { - [0]=> - array(6) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - } - [1]=> - array(4) { - [0]=> - int(7) - [1]=> - int(8) - [2]=> - int(9) - [3]=> - int(10) - } -} - -[7] -array(2) { - [0]=> - array(7) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - } - [1]=> - array(3) { - [0]=> - int(8) - [1]=> - int(9) - [2]=> - int(10) - } -} -array(2) { - [0]=> - array(7) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - } - [1]=> - array(3) { - [7]=> - int(8) - [8]=> - int(9) - [9]=> - int(10) - } -} -array(2) { - [0]=> - array(7) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - } - [1]=> - array(3) { - [0]=> - int(8) - [1]=> - int(9) - [2]=> - int(10) - } -} - -[8] -array(2) { - [0]=> - array(8) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - } - [1]=> - array(2) { - [0]=> - int(9) - [1]=> - int(10) - } -} -array(2) { - [0]=> - array(8) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - } - [1]=> - array(2) { - [8]=> - int(9) - [9]=> - int(10) - } -} -array(2) { - [0]=> - array(8) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - } - [1]=> - array(2) { - [0]=> - int(9) - [1]=> - int(10) - } -} - -[9] -array(2) { - [0]=> - array(9) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - } - [1]=> - array(1) { - [0]=> - int(10) - } -} -array(2) { - [0]=> - array(9) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - } - [1]=> - array(1) { - [9]=> - int(10) - } -} -array(2) { - [0]=> - array(9) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - } - [1]=> - array(1) { - [0]=> - int(10) - } -} - -[10] -array(1) { - [0]=> - array(10) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - [9]=> - int(10) - } -} -array(1) { - [0]=> - array(10) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - [9]=> - int(10) - } -} -array(1) { - [0]=> - array(10) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - [9]=> - int(10) - } -} - - -=========================================== -array(11) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - [9]=> - int(9) - [10]=> - int(10) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(11) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(1) - } - [2]=> - array(1) { - [0]=> - int(2) - } - [3]=> - array(1) { - [0]=> - int(3) - } - [4]=> - array(1) { - [0]=> - int(4) - } - [5]=> - array(1) { - [0]=> - int(5) - } - [6]=> - array(1) { - [0]=> - int(6) - } - [7]=> - array(1) { - [0]=> - int(7) - } - [8]=> - array(1) { - [0]=> - int(8) - } - [9]=> - array(1) { - [0]=> - int(9) - } - [10]=> - array(1) { - [0]=> - int(10) - } -} -array(11) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [1]=> - int(1) - } - [2]=> - array(1) { - [2]=> - int(2) - } - [3]=> - array(1) { - [3]=> - int(3) - } - [4]=> - array(1) { - [4]=> - int(4) - } - [5]=> - array(1) { - [5]=> - int(5) - } - [6]=> - array(1) { - [6]=> - int(6) - } - [7]=> - array(1) { - [7]=> - int(7) - } - [8]=> - array(1) { - [8]=> - int(8) - } - [9]=> - array(1) { - [9]=> - int(9) - } - [10]=> - array(1) { - [10]=> - int(10) - } -} -array(11) { - [0]=> - array(1) { - [0]=> - int(0) - } - [1]=> - array(1) { - [0]=> - int(1) - } - [2]=> - array(1) { - [0]=> - int(2) - } - [3]=> - array(1) { - [0]=> - int(3) - } - [4]=> - array(1) { - [0]=> - int(4) - } - [5]=> - array(1) { - [0]=> - int(5) - } - [6]=> - array(1) { - [0]=> - int(6) - } - [7]=> - array(1) { - [0]=> - int(7) - } - [8]=> - array(1) { - [0]=> - int(8) - } - [9]=> - array(1) { - [0]=> - int(9) - } - [10]=> - array(1) { - [0]=> - int(10) - } -} - -[2] -array(6) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(1) - } - [1]=> - array(2) { - [0]=> - int(2) - [1]=> - int(3) - } - [2]=> - array(2) { - [0]=> - int(4) - [1]=> - int(5) - } - [3]=> - array(2) { - [0]=> - int(6) - [1]=> - int(7) - } - [4]=> - array(2) { - [0]=> - int(8) - [1]=> - int(9) - } - [5]=> - array(1) { - [0]=> - int(10) - } -} -array(6) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(1) - } - [1]=> - array(2) { - [2]=> - int(2) - [3]=> - int(3) - } - [2]=> - array(2) { - [4]=> - int(4) - [5]=> - int(5) - } - [3]=> - array(2) { - [6]=> - int(6) - [7]=> - int(7) - } - [4]=> - array(2) { - [8]=> - int(8) - [9]=> - int(9) - } - [5]=> - array(1) { - [10]=> - int(10) - } -} -array(6) { - [0]=> - array(2) { - [0]=> - int(0) - [1]=> - int(1) - } - [1]=> - array(2) { - [0]=> - int(2) - [1]=> - int(3) - } - [2]=> - array(2) { - [0]=> - int(4) - [1]=> - int(5) - } - [3]=> - array(2) { - [0]=> - int(6) - [1]=> - int(7) - } - [4]=> - array(2) { - [0]=> - int(8) - [1]=> - int(9) - } - [5]=> - array(1) { - [0]=> - int(10) - } -} - -[3] -array(4) { - [0]=> - array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - } - [1]=> - array(3) { - [0]=> - int(3) - [1]=> - int(4) - [2]=> - int(5) - } - [2]=> - array(3) { - [0]=> - int(6) - [1]=> - int(7) - [2]=> - int(8) - } - [3]=> - array(2) { - [0]=> - int(9) - [1]=> - int(10) - } -} -array(4) { - [0]=> - array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - } - [1]=> - array(3) { - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - } - [2]=> - array(3) { - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - } - [3]=> - array(2) { - [9]=> - int(9) - [10]=> - int(10) - } -} -array(4) { - [0]=> - array(3) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - } - [1]=> - array(3) { - [0]=> - int(3) - [1]=> - int(4) - [2]=> - int(5) - } - [2]=> - array(3) { - [0]=> - int(6) - [1]=> - int(7) - [2]=> - int(8) - } - [3]=> - array(2) { - [0]=> - int(9) - [1]=> - int(10) - } -} - -[4] -array(3) { - [0]=> - array(4) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - } - [1]=> - array(4) { - [0]=> - int(4) - [1]=> - int(5) - [2]=> - int(6) - [3]=> - int(7) - } - [2]=> - array(3) { - [0]=> - int(8) - [1]=> - int(9) - [2]=> - int(10) - } -} -array(3) { - [0]=> - array(4) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - } - [1]=> - array(4) { - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - } - [2]=> - array(3) { - [8]=> - int(8) - [9]=> - int(9) - [10]=> - int(10) - } -} -array(3) { - [0]=> - array(4) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - } - [1]=> - array(4) { - [0]=> - int(4) - [1]=> - int(5) - [2]=> - int(6) - [3]=> - int(7) - } - [2]=> - array(3) { - [0]=> - int(8) - [1]=> - int(9) - [2]=> - int(10) - } -} - -[5] -array(3) { - [0]=> - array(5) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - } - [1]=> - array(5) { - [0]=> - int(5) - [1]=> - int(6) - [2]=> - int(7) - [3]=> - int(8) - [4]=> - int(9) - } - [2]=> - array(1) { - [0]=> - int(10) - } -} -array(3) { - [0]=> - array(5) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - } - [1]=> - array(5) { - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - [9]=> - int(9) - } - [2]=> - array(1) { - [10]=> - int(10) - } -} -array(3) { - [0]=> - array(5) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - } - [1]=> - array(5) { - [0]=> - int(5) - [1]=> - int(6) - [2]=> - int(7) - [3]=> - int(8) - [4]=> - int(9) - } - [2]=> - array(1) { - [0]=> - int(10) - } -} - -[6] -array(2) { - [0]=> - array(6) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - } - [1]=> - array(5) { - [0]=> - int(6) - [1]=> - int(7) - [2]=> - int(8) - [3]=> - int(9) - [4]=> - int(10) - } -} -array(2) { - [0]=> - array(6) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - } - [1]=> - array(5) { - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - [9]=> - int(9) - [10]=> - int(10) - } -} -array(2) { - [0]=> - array(6) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - } - [1]=> - array(5) { - [0]=> - int(6) - [1]=> - int(7) - [2]=> - int(8) - [3]=> - int(9) - [4]=> - int(10) - } -} - -[7] -array(2) { - [0]=> - array(7) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - } - [1]=> - array(4) { - [0]=> - int(7) - [1]=> - int(8) - [2]=> - int(9) - [3]=> - int(10) - } -} -array(2) { - [0]=> - array(7) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - } - [1]=> - array(4) { - [7]=> - int(7) - [8]=> - int(8) - [9]=> - int(9) - [10]=> - int(10) - } -} -array(2) { - [0]=> - array(7) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - } - [1]=> - array(4) { - [0]=> - int(7) - [1]=> - int(8) - [2]=> - int(9) - [3]=> - int(10) - } -} - -[8] -array(2) { - [0]=> - array(8) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - } - [1]=> - array(3) { - [0]=> - int(8) - [1]=> - int(9) - [2]=> - int(10) - } -} -array(2) { - [0]=> - array(8) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - } - [1]=> - array(3) { - [8]=> - int(8) - [9]=> - int(9) - [10]=> - int(10) - } -} -array(2) { - [0]=> - array(8) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - } - [1]=> - array(3) { - [0]=> - int(8) - [1]=> - int(9) - [2]=> - int(10) - } -} - -[9] -array(2) { - [0]=> - array(9) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - } - [1]=> - array(2) { - [0]=> - int(9) - [1]=> - int(10) - } -} -array(2) { - [0]=> - array(9) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - } - [1]=> - array(2) { - [9]=> - int(9) - [10]=> - int(10) - } -} -array(2) { - [0]=> - array(9) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - } - [1]=> - array(2) { - [0]=> - int(9) - [1]=> - int(10) - } -} - -[10] -array(2) { - [0]=> - array(10) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - [9]=> - int(9) - } - [1]=> - array(1) { - [0]=> - int(10) - } -} -array(2) { - [0]=> - array(10) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - [9]=> - int(9) - } - [1]=> - array(1) { - [10]=> - int(10) - } -} -array(2) { - [0]=> - array(10) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - [9]=> - int(9) - } - [1]=> - array(1) { - [0]=> - int(10) - } -} - -[11] -array(1) { - [0]=> - array(11) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - [9]=> - int(9) - [10]=> - int(10) - } -} -array(1) { - [0]=> - array(11) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - [9]=> - int(9) - [10]=> - int(10) - } -} -array(1) { - [0]=> - array(11) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - [4]=> - int(4) - [5]=> - int(5) - [6]=> - int(6) - [7]=> - int(7) - [8]=> - int(8) - [9]=> - int(9) - [10]=> - int(10) - } -} - - -=========================================== -array(1) { - ["a"]=> - int(1) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(1) { - [0]=> - array(1) { - [0]=> - int(1) - } -} -array(1) { - [0]=> - array(1) { - ["a"]=> - int(1) - } -} -array(1) { - [0]=> - array(1) { - [0]=> - int(1) - } -} - - -=========================================== -array(2) { - ["b"]=> - int(1) - ["c"]=> - int(2) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(2) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - ["b"]=> - int(1) - } - [1]=> - array(1) { - ["c"]=> - int(2) - } -} -array(2) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } -} - -[2] -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - ["b"]=> - int(1) - ["c"]=> - int(2) - } -} -array(1) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } -} - - -=========================================== -array(6) { - ["p"]=> - int(1) - ["q"]=> - int(2) - ["r"]=> - int(3) - ["s"]=> - int(4) - ["u"]=> - int(5) - ["v"]=> - int(6) -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(6) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } - [3]=> - array(1) { - [0]=> - int(4) - } - [4]=> - array(1) { - [0]=> - int(5) - } - [5]=> - array(1) { - [0]=> - int(6) - } -} -array(6) { - [0]=> - array(1) { - ["p"]=> - int(1) - } - [1]=> - array(1) { - ["q"]=> - int(2) - } - [2]=> - array(1) { - ["r"]=> - int(3) - } - [3]=> - array(1) { - ["s"]=> - int(4) - } - [4]=> - array(1) { - ["u"]=> - int(5) - } - [5]=> - array(1) { - ["v"]=> - int(6) - } -} -array(6) { - [0]=> - array(1) { - [0]=> - int(1) - } - [1]=> - array(1) { - [0]=> - int(2) - } - [2]=> - array(1) { - [0]=> - int(3) - } - [3]=> - array(1) { - [0]=> - int(4) - } - [4]=> - array(1) { - [0]=> - int(5) - } - [5]=> - array(1) { - [0]=> - int(6) - } -} - -[2] -array(3) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(2) { - [0]=> - int(3) - [1]=> - int(4) - } - [2]=> - array(2) { - [0]=> - int(5) - [1]=> - int(6) - } -} -array(3) { - [0]=> - array(2) { - ["p"]=> - int(1) - ["q"]=> - int(2) - } - [1]=> - array(2) { - ["r"]=> - int(3) - ["s"]=> - int(4) - } - [2]=> - array(2) { - ["u"]=> - int(5) - ["v"]=> - int(6) - } -} -array(3) { - [0]=> - array(2) { - [0]=> - int(1) - [1]=> - int(2) - } - [1]=> - array(2) { - [0]=> - int(3) - [1]=> - int(4) - } - [2]=> - array(2) { - [0]=> - int(5) - [1]=> - int(6) - } -} - -[3] -array(2) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } - [1]=> - array(3) { - [0]=> - int(4) - [1]=> - int(5) - [2]=> - int(6) - } -} -array(2) { - [0]=> - array(3) { - ["p"]=> - int(1) - ["q"]=> - int(2) - ["r"]=> - int(3) - } - [1]=> - array(3) { - ["s"]=> - int(4) - ["u"]=> - int(5) - ["v"]=> - int(6) - } -} -array(2) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } - [1]=> - array(3) { - [0]=> - int(4) - [1]=> - int(5) - [2]=> - int(6) - } -} - -[4] -array(2) { - [0]=> - array(4) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - } - [1]=> - array(2) { - [0]=> - int(5) - [1]=> - int(6) - } -} -array(2) { - [0]=> - array(4) { - ["p"]=> - int(1) - ["q"]=> - int(2) - ["r"]=> - int(3) - ["s"]=> - int(4) - } - [1]=> - array(2) { - ["u"]=> - int(5) - ["v"]=> - int(6) - } -} -array(2) { - [0]=> - array(4) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - } - [1]=> - array(2) { - [0]=> - int(5) - [1]=> - int(6) - } -} - -[5] -array(2) { - [0]=> - array(5) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - } - [1]=> - array(1) { - [0]=> - int(6) - } -} -array(2) { - [0]=> - array(5) { - ["p"]=> - int(1) - ["q"]=> - int(2) - ["r"]=> - int(3) - ["s"]=> - int(4) - ["u"]=> - int(5) - } - [1]=> - array(1) { - ["v"]=> - int(6) - } -} -array(2) { - [0]=> - array(5) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - } - [1]=> - array(1) { - [0]=> - int(6) - } -} - -[6] -array(1) { - [0]=> - array(6) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - } -} -array(1) { - [0]=> - array(6) { - ["p"]=> - int(1) - ["q"]=> - int(2) - ["r"]=> - int(3) - ["s"]=> - int(4) - ["u"]=> - int(5) - ["v"]=> - int(6) - } -} -array(1) { - [0]=> - array(6) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - } -} - - -=========================================== -array(1) { - ["a"]=> - string(1) "A" -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(1) { - [0]=> - array(1) { - [0]=> - string(1) "A" - } -} -array(1) { - [0]=> - array(1) { - ["a"]=> - string(1) "A" - } -} -array(1) { - [0]=> - array(1) { - [0]=> - string(1) "A" - } -} - - -=========================================== -array(6) { - ["p"]=> - string(1) "A" - ["q"]=> - string(1) "B" - ["r"]=> - string(1) "C" - ["s"]=> - string(1) "D" - ["u"]=> - string(1) "E" - ["v"]=> - string(1) "F" -} -------------------------------------------- -[0] -NULL -NULL -NULL - -[1] -array(6) { - [0]=> - array(1) { - [0]=> - string(1) "A" - } - [1]=> - array(1) { - [0]=> - string(1) "B" - } - [2]=> - array(1) { - [0]=> - string(1) "C" - } - [3]=> - array(1) { - [0]=> - string(1) "D" - } - [4]=> - array(1) { - [0]=> - string(1) "E" - } - [5]=> - array(1) { - [0]=> - string(1) "F" - } -} -array(6) { - [0]=> - array(1) { - ["p"]=> - string(1) "A" - } - [1]=> - array(1) { - ["q"]=> - string(1) "B" - } - [2]=> - array(1) { - ["r"]=> - string(1) "C" - } - [3]=> - array(1) { - ["s"]=> - string(1) "D" - } - [4]=> - array(1) { - ["u"]=> - string(1) "E" - } - [5]=> - array(1) { - ["v"]=> - string(1) "F" - } -} -array(6) { - [0]=> - array(1) { - [0]=> - string(1) "A" - } - [1]=> - array(1) { - [0]=> - string(1) "B" - } - [2]=> - array(1) { - [0]=> - string(1) "C" - } - [3]=> - array(1) { - [0]=> - string(1) "D" - } - [4]=> - array(1) { - [0]=> - string(1) "E" - } - [5]=> - array(1) { - [0]=> - string(1) "F" - } -} - -[2] -array(3) { - [0]=> - array(2) { - [0]=> - string(1) "A" - [1]=> - string(1) "B" - } - [1]=> - array(2) { - [0]=> - string(1) "C" - [1]=> - string(1) "D" - } - [2]=> - array(2) { - [0]=> - string(1) "E" - [1]=> - string(1) "F" - } -} -array(3) { - [0]=> - array(2) { - ["p"]=> - string(1) "A" - ["q"]=> - string(1) "B" - } - [1]=> - array(2) { - ["r"]=> - string(1) "C" - ["s"]=> - string(1) "D" - } - [2]=> - array(2) { - ["u"]=> - string(1) "E" - ["v"]=> - string(1) "F" - } -} -array(3) { - [0]=> - array(2) { - [0]=> - string(1) "A" - [1]=> - string(1) "B" - } - [1]=> - array(2) { - [0]=> - string(1) "C" - [1]=> - string(1) "D" - } - [2]=> - array(2) { - [0]=> - string(1) "E" - [1]=> - string(1) "F" - } -} - -[3] -array(2) { - [0]=> - array(3) { - [0]=> - string(1) "A" - [1]=> - string(1) "B" - [2]=> - string(1) "C" - } - [1]=> - array(3) { - [0]=> - string(1) "D" - [1]=> - string(1) "E" - [2]=> - string(1) "F" - } -} -array(2) { - [0]=> - array(3) { - ["p"]=> - string(1) "A" - ["q"]=> - string(1) "B" - ["r"]=> - string(1) "C" - } - [1]=> - array(3) { - ["s"]=> - string(1) "D" - ["u"]=> - string(1) "E" - ["v"]=> - string(1) "F" - } -} -array(2) { - [0]=> - array(3) { - [0]=> - string(1) "A" - [1]=> - string(1) "B" - [2]=> - string(1) "C" - } - [1]=> - array(3) { - [0]=> - string(1) "D" - [1]=> - string(1) "E" - [2]=> - string(1) "F" - } -} - -[4] -array(2) { - [0]=> - array(4) { - [0]=> - string(1) "A" - [1]=> - string(1) "B" - [2]=> - string(1) "C" - [3]=> - string(1) "D" - } - [1]=> - array(2) { - [0]=> - string(1) "E" - [1]=> - string(1) "F" - } -} -array(2) { - [0]=> - array(4) { - ["p"]=> - string(1) "A" - ["q"]=> - string(1) "B" - ["r"]=> - string(1) "C" - ["s"]=> - string(1) "D" - } - [1]=> - array(2) { - ["u"]=> - string(1) "E" - ["v"]=> - string(1) "F" - } -} -array(2) { - [0]=> - array(4) { - [0]=> - string(1) "A" - [1]=> - string(1) "B" - [2]=> - string(1) "C" - [3]=> - string(1) "D" - } - [1]=> - array(2) { - [0]=> - string(1) "E" - [1]=> - string(1) "F" - } -} - -[5] -array(2) { - [0]=> - array(5) { - [0]=> - string(1) "A" - [1]=> - string(1) "B" - [2]=> - string(1) "C" - [3]=> - string(1) "D" - [4]=> - string(1) "E" - } - [1]=> - array(1) { - [0]=> - string(1) "F" - } -} -array(2) { - [0]=> - array(5) { - ["p"]=> - string(1) "A" - ["q"]=> - string(1) "B" - ["r"]=> - string(1) "C" - ["s"]=> - string(1) "D" - ["u"]=> - string(1) "E" - } - [1]=> - array(1) { - ["v"]=> - string(1) "F" - } -} -array(2) { - [0]=> - array(5) { - [0]=> - string(1) "A" - [1]=> - string(1) "B" - [2]=> - string(1) "C" - [3]=> - string(1) "D" - [4]=> - string(1) "E" - } - [1]=> - array(1) { - [0]=> - string(1) "F" - } -} - -[6] -array(1) { - [0]=> - array(6) { - [0]=> - string(1) "A" - [1]=> - string(1) "B" - [2]=> - string(1) "C" - [3]=> - string(1) "D" - [4]=> - string(1) "E" - [5]=> - string(1) "F" - } -} -array(1) { - [0]=> - array(6) { - ["p"]=> - string(1) "A" - ["q"]=> - string(1) "B" - ["r"]=> - string(1) "C" - ["s"]=> - string(1) "D" - ["u"]=> - string(1) "E" - ["v"]=> - string(1) "F" - } -} -array(1) { - [0]=> - array(6) { - [0]=> - string(1) "A" - [1]=> - string(1) "B" - [2]=> - string(1) "C" - [3]=> - string(1) "D" - [4]=> - string(1) "E" - [5]=> - string(1) "F" - } -} - - -end diff --git a/ext/standard/tests/array/array_count_values.phpt b/ext/standard/tests/array/array_count_values.phpt deleted file mode 100644 index d9a3ba3d5a..0000000000 --- a/ext/standard/tests/array/array_count_values.phpt +++ /dev/null @@ -1,95 +0,0 @@ ---TEST-- -array_count_values() ---FILE-- -<?php -$arrays = array ( - array (), - array (0), - array (1), - array (-1), - array (0, 0), - array (0, 1), - array (1, 1), - array (1, "hello", 1, "world", "hello"), - array ("hello", "world", "hello"), - array ("", "world", "", "hello", "world", "hello", "hello", "world", "hello"), - array (0, array (1, "hello", 1, "world", "hello")), - array (1, array (1, "hello", 1, "world", "hello"), array (1, "hello", 1, "world", "hello"), array (1, "hello", 1, "world", "hello")), -); - -foreach ($arrays as $item) { - var_dump (@array_count_values ($item)); - echo "\n"; -} -?> ---EXPECT-- -array(0) { -} - -array(1) { - [0]=> - int(1) -} - -array(1) { - [1]=> - int(1) -} - -array(1) { - [-1]=> - int(1) -} - -array(1) { - [0]=> - int(2) -} - -array(2) { - [0]=> - int(1) - [1]=> - int(1) -} - -array(1) { - [1]=> - int(2) -} - -array(3) { - [1]=> - int(2) - ["hello"]=> - int(2) - ["world"]=> - int(1) -} - -array(2) { - ["hello"]=> - int(2) - ["world"]=> - int(1) -} - -array(3) { - [""]=> - int(2) - ["world"]=> - int(3) - ["hello"]=> - int(4) -} - -array(1) { - [0]=> - int(1) -} - -array(1) { - [1]=> - int(1) -} - 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 a25d19d5ca..0000000000 --- a/ext/standard/tests/array/array_diff_1.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Test array_diff when non-array is passed ---FILE-- -<?php -//-=-=-=-=- -$a = array(); -$b = 3; -$c = array(5); -array_diff($a, $b, $c); -//-=-=-=-=-=- -echo "OK!"; -?> ---EXPECTF-- -Warning: array_diff(): Argument #2 is not an array in %s -OK! diff --git a/ext/standard/tests/array/array_diff_key.phpt b/ext/standard/tests/array/array_diff_key.phpt deleted file mode 100644 index 91664a8711..0000000000 --- a/ext/standard/tests/array/array_diff_key.phpt +++ /dev/null @@ -1,250 +0,0 @@ ---TEST-- -Test of the array_diff_key() and array_diff_ukey() ---FILE-- -<?php -$a = array(1, 6, 2, -20, 15, 1200, -2500); -$b = array(0, 7, 2, -20, 11, 1100, -2500); -$c = array(0, 6, 2, -20, 19, 1000, -2500); -$d = array(3, 8,-2, -20, 14, 900, -2600); -$a_f = array_flip($a); -$b_f = array_flip($b); -$c_f = array_flip($c); -$d_f = array_flip($d); -$i = 1; -/* give nicer values */ -foreach ($a_f as $k=> &$a_f_el) { $a_f_el =$k*2;} -foreach ($b_f as $k=> &$b_f_el) { $b_f_el =$k*2;} -foreach ($c_f as $k=> &$c_f_el) { $c_f_el =$k*2;} -foreach ($d_f as $k=> &$d_f_el) { $d_f_el =$k*2;} - -echo "------ Test $i --------\n";$i++;// 1 -var_dump(array_diff_key($a_f, $b_f));// keys -> 1, 6, 15, 1200 -var_dump(array_diff_ukey($a_f, $b_f, "comp_func"));// 1, 6, 15, 1200 - -echo "------ Test $i --------\n";$i++;// 2 -var_dump(array_diff_key($a_f, $c_f));// keys -> 1, 15, 1200 -var_dump(array_diff_ukey($a_f, $c_f, "comp_func"));// 1, 15, 1200 - -echo "------ Test $i --------\n";$i++;// 3 -var_dump(array_diff_key($a_f, $d_f));// 1, 6, 2, 15, 1200, -2500 -var_dump(array_diff_ukey($a_f, $d_f, "comp_func"));// 1, 6, 2, 15, 1200, -2500 - -echo "------ Test $i --------\n";$i++;// 4 -var_dump(array_diff_key($a_f, $b_f, $c_f));// 1, 15, 1200 -var_dump(array_diff_ukey($a_f, $b_f, $c_f, "comp_func"));// 1, 15, 1200 - -echo "------ Test $i --------\n";$i++;// 5 -var_dump(array_diff_key($a_f, $b_f, $d_f));// 1, 6, 15, 1200 -var_dump(array_diff_ukey($a_f, $b_f, $d_f, "comp_func"));// 1, 6, 15, 1200 - - -echo "------ Test $i --------\n";$i++;// 6 -var_dump(array_diff_key($a_f, $b_f, $c_f, $d_f));// 1, 15, 1200 -var_dump(array_diff_ukey($a_f, $b_f, $c_f, $d_f, "comp_func"));//1, 15, 1200 - - -echo "------ Test $i --------\n";$i++;// 7 -var_dump(array_diff_key($b_f, $c_f));// 7, 11, 1100 -var_dump(array_diff_ukey($b_f, $c_f, "comp_func"));//7, 11, 1100 - -echo "------ Test $i --------\n";$i++;// 8 -var_dump(array_diff_key($b_f, $d_f));//0, 7, 2, 11, 1100, -2500 -var_dump(array_diff_ukey($b_f, $d_f, "comp_func"));//0, 7, 2, 11, 1100, -2500 - - -echo "------ Test $i --------\n";$i++;// 9 -var_dump(array_diff_key($b_f, $c_f, $d_f));// 7, 11, 1100 -var_dump(array_diff_ukey($b_f, $c_f, $d_f, "comp_func"));// 7, 11, 1000 - -function comp_func($a, $b) { - if ($a === $b) return 0; - return ($a > $b)? 1:-1; - -} -?> ---EXPECTF-- ------- Test 1 -------- -array(4) { - [1]=> - &int(2) - [6]=> - &int(12) - [15]=> - &int(30) - [1200]=> - &int(2400) -} -array(4) { - [1]=> - int(2) - [6]=> - int(12) - [15]=> - int(30) - [1200]=> - int(2400) -} ------- Test 2 -------- -array(3) { - [1]=> - int(2) - [15]=> - int(30) - [1200]=> - int(2400) -} -array(3) { - [1]=> - int(2) - [15]=> - int(30) - [1200]=> - int(2400) -} ------- Test 3 -------- -array(6) { - [1]=> - int(2) - [6]=> - int(12) - [2]=> - int(4) - [15]=> - int(30) - [1200]=> - int(2400) - [-2500]=> - &int(-5000) -} -array(6) { - [1]=> - int(2) - [6]=> - int(12) - [2]=> - int(4) - [15]=> - int(30) - [1200]=> - int(2400) - [-2500]=> - &int(-5000) -} ------- Test 4 -------- -array(3) { - [1]=> - int(2) - [15]=> - int(30) - [1200]=> - int(2400) -} -array(3) { - [1]=> - int(2) - [15]=> - int(30) - [1200]=> - int(2400) -} ------- Test 5 -------- -array(4) { - [1]=> - int(2) - [6]=> - int(12) - [15]=> - int(30) - [1200]=> - int(2400) -} -array(4) { - [1]=> - int(2) - [6]=> - int(12) - [15]=> - int(30) - [1200]=> - int(2400) -} ------- Test 6 -------- -array(3) { - [1]=> - int(2) - [15]=> - int(30) - [1200]=> - int(2400) -} -array(3) { - [1]=> - int(2) - [15]=> - int(30) - [1200]=> - int(2400) -} ------- Test 7 -------- -array(3) { - [7]=> - &int(14) - [11]=> - &int(22) - [1100]=> - &int(2200) -} -array(3) { - [7]=> - int(14) - [11]=> - int(22) - [1100]=> - int(2200) -} ------- Test 8 -------- -array(6) { - [0]=> - int(0) - [7]=> - int(14) - [2]=> - int(4) - [11]=> - int(22) - [1100]=> - int(2200) - [-2500]=> - &int(-5000) -} -array(6) { - [0]=> - int(0) - [7]=> - int(14) - [2]=> - int(4) - [11]=> - int(22) - [1100]=> - int(2200) - [-2500]=> - &int(-5000) -} ------- Test 9 -------- -array(3) { - [7]=> - int(14) - [11]=> - int(22) - [1100]=> - int(2200) -} -array(3) { - [7]=> - int(14) - [11]=> - int(22) - [1100]=> - int(2200) -} diff --git a/ext/standard/tests/array/array_intersect_1.phpt b/ext/standard/tests/array/array_intersect_1.phpt deleted file mode 100644 index 1fed25dcb2..0000000000 --- a/ext/standard/tests/array/array_intersect_1.phpt +++ /dev/null @@ -1,565 +0,0 @@ ---TEST-- -Test of the *intersect* bunch of functions (both assoc and non-assoc) ---FILE-- -<?php -error_reporting(E_ALL); -class cr { - private $priv_member; - public $public_member; - function cr($val) { - $this->priv_member = $val; - $this->public_member = $val; - } - static function comp_func_cr($a, $b) { - if ($a->priv_member === $b->priv_member) return 0; - return ($a->priv_member > $b->priv_member)? 1:-1; - } -} - -function comp_func($a, $b) { - if ($a === $b) return 0; - return ($a > $b)? 1:-1; - -} - -function comp_func_cr($a, $b) { - if ($a->public_member === $b->public_member) return 0; - return ($a->public_member > $b->public_member)? 1:-1; -} - -$a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1=> new cr(4), 2 => new cr(-15),); -$b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr( 3), 1=> new cr(4), 2 => new cr(-15),); - -/* array_intersect() */ -echo "begin ------------ array_intersect() ----------------------------\n"; -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo 'var_dump(array_intersect($a, $b);'."\n"; -var_dump(@array_intersect($a, $b)); -echo "end ------------ array_intersect() ----------------------------\n"; - -/* array_uintersect() */ -echo "begin ------------ array_uintersect() ---------------------------\n"; -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo 'var_dump(array_uintersect($a, $b, "comp_func_cr"));'."\n"; -var_dump(array_uintersect($a, $b, "comp_func_cr")); -echo "end ------------ array_uintersect() ---------------------------\n"; - -/* array_intersect_assoc() */ -echo "begin ------------ array_intersect_assoc() ----------------------\n"; -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo 'var_dump(array_intersect_assoc($a, $b));'."\n"; -var_dump(@array_intersect_assoc($a, $b)); -echo "end ------------ array_intersect_assoc() ----------------------\n"; - -/* array_uintersect_assoc() */ -echo "begin ------------ array_uintersect_assoc() ---------------------\n"; -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo 'var_dump(array_uintersect_assoc($a, $b, "comp_func_cr"));'."\n"; -var_dump(array_uintersect_assoc($a, $b, "comp_func_cr")); -echo "end ------------ array_uintersect_assoc() ---------------------\n"; - -/* array_intersect_uassoc() */ -echo "begin ------------ array_intersect_uassoc() ---------------------\n"; -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo 'var_dump(array_intersect_uassoc($a, $b, "comp_func"));'."\n"; -var_dump(@array_intersect_uassoc($a, $b, "comp_func")); -echo "end ------------ array_intersect_uassoc() ---------------------\n"; - -/* array_uintersect_uassoc() - with ordinary function */ -echo "begin ------------ array_uintersect_uassoc() with ordinary func -\n"; -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo 'var_dump(array_uintersect_uassoc($a, $b, "comp_func_cr", "comp_func"));'."\n"; -var_dump(array_uintersect_uassoc($a, $b, "comp_func_cr", "comp_func")); -echo "end ------------ array_uintersect_uassoc() with ordinary func -\n"; - -/* array_uintersect_uassoc() - by method call */ -echo "begin ------------ array_uintersect_uassoc() with method --------\n"; -echo '$a='.var_export($a,TRUE).";\n"; -echo '$b='.var_export($b,TRUE).";\n"; -echo 'var_dump(array_uintersect_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func"));'."\n"; -var_dump(array_uintersect_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func")); -echo "end ------------ array_uintersect_uassoc() with method --------\n"; -?> ---EXPECTF-- -begin ------------ array_intersect() ---------------------------- -$a=array ( - '0.1' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 12; - public $public_member = 12; - }, - 0 => - class cr { - private $priv_member = 23; - public $public_member = 23; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -$b=array ( - '0.2' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 22; - public $public_member = 22; - }, - 0 => - class cr { - private $priv_member = 3; - public $public_member = 3; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -var_dump(array_intersect($a, $b); -array(0) { -} -end ------------ array_intersect() ---------------------------- -begin ------------ array_uintersect() --------------------------- -$a=array ( - '0.1' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 12; - public $public_member = 12; - }, - 0 => - class cr { - private $priv_member = 23; - public $public_member = 23; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -$b=array ( - '0.2' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 22; - public $public_member = 22; - }, - 0 => - class cr { - private $priv_member = 3; - public $public_member = 3; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -var_dump(array_uintersect($a, $b, "comp_func_cr")); -array(3) { - ["0.1"]=> - object(cr)#1 (2) { - ["priv_member:private"]=> - int(9) - ["public_member"]=> - int(9) - } - [1]=> - object(cr)#4 (2) { - ["priv_member:private"]=> - int(4) - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#5 (2) { - ["priv_member:private"]=> - int(-15) - ["public_member"]=> - int(-15) - } -} -end ------------ array_uintersect() --------------------------- -begin ------------ array_intersect_assoc() ---------------------- -$a=array ( - '0.1' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 12; - public $public_member = 12; - }, - 0 => - class cr { - private $priv_member = 23; - public $public_member = 23; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -$b=array ( - '0.2' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 22; - public $public_member = 22; - }, - 0 => - class cr { - private $priv_member = 3; - public $public_member = 3; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -var_dump(array_intersect_assoc($a, $b)); -array(0) { -} -end ------------ array_intersect_assoc() ---------------------- -begin ------------ array_uintersect_assoc() --------------------- -$a=array ( - '0.1' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 12; - public $public_member = 12; - }, - 0 => - class cr { - private $priv_member = 23; - public $public_member = 23; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -$b=array ( - '0.2' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 22; - public $public_member = 22; - }, - 0 => - class cr { - private $priv_member = 3; - public $public_member = 3; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -var_dump(array_uintersect_assoc($a, $b, "comp_func_cr")); -array(2) { - [1]=> - object(cr)#4 (2) { - ["priv_member:private"]=> - int(4) - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#5 (2) { - ["priv_member:private"]=> - int(-15) - ["public_member"]=> - int(-15) - } -} -end ------------ array_uintersect_assoc() --------------------- -begin ------------ array_intersect_uassoc() --------------------- -$a=array ( - '0.1' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 12; - public $public_member = 12; - }, - 0 => - class cr { - private $priv_member = 23; - public $public_member = 23; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -$b=array ( - '0.2' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 22; - public $public_member = 22; - }, - 0 => - class cr { - private $priv_member = 3; - public $public_member = 3; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -var_dump(array_intersect_uassoc($a, $b, "comp_func")); -array(0) { -} -end ------------ array_intersect_uassoc() --------------------- -begin ------------ array_uintersect_uassoc() with ordinary func - -$a=array ( - '0.1' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 12; - public $public_member = 12; - }, - 0 => - class cr { - private $priv_member = 23; - public $public_member = 23; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -$b=array ( - '0.2' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 22; - public $public_member = 22; - }, - 0 => - class cr { - private $priv_member = 3; - public $public_member = 3; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -var_dump(array_uintersect_uassoc($a, $b, "comp_func_cr", "comp_func")); -array(2) { - [1]=> - object(cr)#4 (2) { - ["priv_member:private"]=> - int(4) - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#5 (2) { - ["priv_member:private"]=> - int(-15) - ["public_member"]=> - int(-15) - } -} -end ------------ array_uintersect_uassoc() with ordinary func - -begin ------------ array_uintersect_uassoc() with method -------- -$a=array ( - '0.1' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 12; - public $public_member = 12; - }, - 0 => - class cr { - private $priv_member = 23; - public $public_member = 23; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -$b=array ( - '0.2' => - class cr { - private $priv_member = 9; - public $public_member = 9; - }, - '0.5' => - class cr { - private $priv_member = 22; - public $public_member = 22; - }, - 0 => - class cr { - private $priv_member = 3; - public $public_member = 3; - }, - 1 => - class cr { - private $priv_member = 4; - public $public_member = 4; - }, - 2 => - class cr { - private $priv_member = -15; - public $public_member = -15; - }, -); -var_dump(array_uintersect_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func")); -array(2) { - [1]=> - object(cr)#4 (2) { - ["priv_member:private"]=> - int(4) - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#5 (2) { - ["priv_member:private"]=> - int(-15) - ["public_member"]=> - int(-15) - } -} -end ------------ array_uintersect_uassoc() with method -------- diff --git a/ext/standard/tests/array/array_intersect_key.phpt b/ext/standard/tests/array/array_intersect_key.phpt deleted file mode 100644 index 6a5965ba73..0000000000 --- a/ext/standard/tests/array/array_intersect_key.phpt +++ /dev/null @@ -1,209 +0,0 @@ ---TEST-- -Test of the array_intersect_key() and array_intersect_ukey() ---FILE-- -<?php -$a = array(1, 6, 2, -20, 15, 1200, -2500); -$b = array(0, 7, 2, -20, 11, 1100, -2500); -$c = array(0, 6, 2, -20, 19, 1000, -2500); -$d = array(3, 8,-2, -20, 14, 900, -2600); - -$a_f = array_flip($a); -$b_f = array_flip($b); -$c_f = array_flip($c); -$d_f = array_flip($d); - -/* give nicer values */ -foreach ($a_f as $k=> &$a_f_el) { $a_f_el =$k*2;} -foreach ($b_f as $k=> &$b_f_el) { $b_f_el =$k*2;} -foreach ($c_f as $k=> &$c_f_el) { $c_f_el =$k*2;} -foreach ($d_f as $k=> &$d_f_el) { $d_f_el =$k*2;} - -var_dump(array_intersect_key($a_f, $b_f));// keys -> 2, -20, -2500 -var_dump(array_intersect_ukey($a_f, $b_f, "comp_func"));// 2, 20, -2500 -var_dump(array_intersect_key($a_f, $c_f));// keys -> 6, 2, -20, -2500 -var_dump(array_intersect_ukey($a_f, $c_f, "comp_func"));// 6, 2, -20, -2500 -var_dump(array_intersect_key($a_f, $d_f));// -20 -var_dump(array_intersect_ukey($a_f, $d_f, "comp_func"));// -20 - -var_dump(array_intersect_key($a_f, $b_f, $c_f));// 2, -20, -2500 -var_dump(array_intersect_ukey($a_f, $b_f, $c_f, "comp_func"));// 2, -20, -2500 -var_dump(array_intersect_key($a_f, $b_f, $d_f));// -20 -var_dump(array_intersect_ukey($a_f, $b_f, $d_f, "comp_func"));// -20 - -var_dump(array_intersect_key($a_f, $b_f, $c_f, $d_f));// -20 -var_dump(array_intersect_ukey($a_f, $b_f, $c_f, $d_f, "comp_func"));//-20 - - -var_dump(array_intersect_key($b_f, $c_f));// 0, 2, -20, -2500 -var_dump(array_intersect_ukey($b_f, $c_f, "comp_func"));//0, 2, -20, 2500 - -var_dump(array_intersect_key($b_f, $d_f));// -20 -var_dump(array_intersect_ukey($b_f, $d_f, "comp_func"));// -20 - -var_dump(array_intersect_key($b_f, $c_f, $d_f));// -20 -var_dump(array_intersect_ukey($b_f, $c_f, $d_f, "comp_func"));// -20 - - -echo "----- Now testing array_intersect() ------- \n"; -var_dump(array_intersect($a, $b_f)); -var_dump(array_uintersect($a, $b, "comp_func")); -var_dump(array_intersect($a, $b, $c)); -var_dump(array_uintersect($a, $b, $c, "comp_func")); -var_dump(array_intersect($a, $b, $c, $d)); -var_dump(array_uintersect($a, $b, $c, $d, "comp_func")); - -/////////////////////////////////////////////////////////////////////// -function comp_func($a, $b) { - if ($a === $b) return 0; - return ($a > $b)? 1:-1; - -} -?> ---EXPECTF-- -array(3) { - [2]=> - &int(4) - [-20]=> - &int(-40) - [-2500]=> - &int(-5000) -} -array(3) { - [2]=> - int(4) - [-20]=> - int(-40) - [-2500]=> - &int(-5000) -} -array(4) { - [6]=> - int(12) - [2]=> - int(4) - [-20]=> - int(-40) - [-2500]=> - &int(-5000) -} -array(4) { - [6]=> - int(12) - [2]=> - int(4) - [-20]=> - int(-40) - [-2500]=> - &int(-5000) -} -array(1) { - [-20]=> - int(-40) -} -array(1) { - [-20]=> - int(-40) -} -array(3) { - [2]=> - int(4) - [-20]=> - int(-40) - [-2500]=> - &int(-5000) -} -array(3) { - [2]=> - int(4) - [-20]=> - int(-40) - [-2500]=> - &int(-5000) -} -array(1) { - [-20]=> - int(-40) -} -array(1) { - [-20]=> - int(-40) -} -array(1) { - [-20]=> - int(-40) -} -array(1) { - [-20]=> - int(-40) -} -array(4) { - [0]=> - &int(0) - [2]=> - &int(4) - [-20]=> - &int(-40) - [-2500]=> - &int(-5000) -} -array(4) { - [0]=> - int(0) - [2]=> - int(4) - [-20]=> - int(-40) - [-2500]=> - &int(-5000) -} -array(1) { - [-20]=> - int(-40) -} -array(1) { - [-20]=> - int(-40) -} -array(1) { - [-20]=> - int(-40) -} -array(1) { - [-20]=> - int(-40) -} ------ Now testing array_intersect() ------- -array(0) { -} -array(3) { - [2]=> - int(2) - [3]=> - int(-20) - [6]=> - int(-2500) -} -array(3) { - [2]=> - int(2) - [3]=> - int(-20) - [6]=> - int(-2500) -} -array(3) { - [2]=> - int(2) - [3]=> - int(-20) - [6]=> - int(-2500) -} -array(1) { - [3]=> - int(-20) -} -array(1) { - [3]=> - int(-20) -} diff --git a/ext/standard/tests/array/array_search.phpt b/ext/standard/tests/array/array_search.phpt deleted file mode 100644 index e95fda1286..0000000000 --- a/ext/standard/tests/array/array_search.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -search_array and in_array (including bug 13567) ---FILE-- -<?php - -$arr1 = array('a','b','c'); -$arr2 = array(); -$arr3 = array('c','key'=>'d'); -$arr4 = array("a\0b"=>'e','key'=>'d', 'f'); - -$tests = <<<TESTS -FALSE === in_array(123, \$arr1) -FALSE === array_search(123, \$arr1) -TRUE === in_array('a', \$arr1) -0 === array_search('a', \$arr1) -"a\\0b"=== array_search('e', \$arr4) -'key'=== array_search('d', \$arr4) -TESTS; - -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); - ---EXPECT-- -OK diff --git a/ext/standard/tests/array/array_sum.phpt b/ext/standard/tests/array/array_sum.phpt deleted file mode 100644 index d4c91e991c..0000000000 --- a/ext/standard/tests/array/array_sum.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Test array_sum() ---INI-- -memory_limit=16M ---FILE-- -<?php -$i = 0; -while ($i++ < 1000) { - $a[] = $i; - $b[] = (string)$i; -} -$s1 = array_sum($a); -$s2 = array_sum($b); -var_dump($s1, $s2); - -$j = 0; -while ($j++ < 100000) { - $c[] = $j; - $d[] = (string) $j; -} -$s3 = array_sum($c); -$s4 = array_sum($d); -var_dump($s3, $s4); -?> ---EXPECTF-- -int(500500) -int(500500) -%st(5000050000) -%st(5000050000) diff --git a/ext/standard/tests/array/array_walk_recursive.phpt b/ext/standard/tests/array/array_walk_recursive.phpt deleted file mode 100644 index c3b37c321c..0000000000 --- a/ext/standard/tests/array/array_walk_recursive.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Test array_walk_recursive() ---FILE-- -<?php -function foo($value) { - echo $value . " foo\n"; -} - -function bar($value) { - echo $value . " bar\n"; -} - -$arr = array (1,2,3); -var_dump (array_walk_recursive ($arr, 'foo')); -var_dump (array_walk_recursive ($arr, 'bar')); - -?> ---EXPECTF-- -1 foo -2 foo -3 foo -bool(true) -1 bar -2 bar -3 bar -bool(true) diff --git a/ext/standard/tests/array/bug12776.phpt b/ext/standard/tests/array/bug12776.phpt deleted file mode 100644 index 54c6f6fceb..0000000000 --- a/ext/standard/tests/array/bug12776.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -Bug #12776 (array_walk crash) ---FILE-- -<?php - -function test($val,$key) -{ - global $globalArray; - $globalArray[]=$key; // this will end up crashing - $globalArray[]=(string)$key; // this will end up OK - print "val: $val; key: $key\n"; flush(); -} - -$arr=array('k'=>'v'); -array_walk($arr,'test'); - -print "First value: ".$globalArray[0]; - -print "\nDone\n"; - -?> ---EXPECT-- -val: v; key: k -First value: k -Done diff --git a/ext/standard/tests/array/bug14580.phpt b/ext/standard/tests/array/bug14580.phpt deleted file mode 100644 index 8a80bddcb4..0000000000 --- a/ext/standard/tests/array/bug14580.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST--n -Bug #14580 (key() not binary safe) ---FILE-- -<?php - $arr = array ("foo\0bar" => "foo\0bar"); - $key = key($arr); - echo strlen($key), ': '; - echo urlencode($key), "\n"; -?> ---EXPECT-- -7: foo%00bar diff --git a/ext/standard/tests/array/bug20381.phpt b/ext/standard/tests/array/bug20381.phpt deleted file mode 100644 index 1adaa863b7..0000000000 --- a/ext/standard/tests/array/bug20381.phpt +++ /dev/null @@ -1,79 +0,0 @@ ---TEST-- -Bug #20381 (array_merge_recursive mangles input arrays) ---FILE-- -<?php -$a = array( - 'a1' => 1, - 'a2' => array( 1, 2, 3 ), - 'a3' => array( - 'a' => array( 10, 20, 30 ), - 'b' => 'b' - ) - ); -$b = array( 'a1' => 2, - 'a2' => array( 3, 4, 5 ), - 'a3' => array( - 'c' => 'cc', - 'a' => array( 10, 40 ) - ) - ); - -var_dump($a); -array_merge_recursive( $a, $b ); -var_dump($a); -?> ---EXPECT-- -array(3) { - ["a1"]=> - int(1) - ["a2"]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } - ["a3"]=> - array(2) { - ["a"]=> - array(3) { - [0]=> - int(10) - [1]=> - int(20) - [2]=> - int(30) - } - ["b"]=> - string(1) "b" - } -} -array(3) { - ["a1"]=> - int(1) - ["a2"]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } - ["a3"]=> - array(2) { - ["a"]=> - array(3) { - [0]=> - int(10) - [1]=> - int(20) - [2]=> - int(30) - } - ["b"]=> - string(1) "b" - } -} diff --git a/ext/standard/tests/array/bug20865.phpt b/ext/standard/tests/array/bug20865.phpt deleted file mode 100644 index f1edbabab5..0000000000 --- a/ext/standard/tests/array/bug20865.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -Bug #20865 (array_key_exists and NULL key) ---FILE-- -<?php - $ta = array(1, 2, 3); - $ta[NULL] = "Null Value"; - - var_dump(array_key_exists(NULL, $ta)); -?> ---EXPECT-- -bool(true) diff --git a/ext/standard/tests/array/bug21182.phpt b/ext/standard/tests/array/bug21182.phpt deleted file mode 100644 index af4602ab74..0000000000 --- a/ext/standard/tests/array/bug21182.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Bug #21182 (range modifies arguments) ---FILE-- -<?php -$a = "20"; $b = "30"; -echo "a1: $a\n"; -$result = range($a, $b); -echo "a2: $a : type : " . gettype($a) . "\n"; -?> ---EXPECT-- -a1: 20 -a2: 20 : type : string diff --git a/ext/standard/tests/array/bug21918.phpt b/ext/standard/tests/array/bug21918.phpt deleted file mode 100755 index 1c9d746fdf..0000000000 --- a/ext/standard/tests/array/bug21918.phpt +++ /dev/null @@ -1,55 +0,0 @@ ---TEST-- -Bug #21918 (different handling of positive vs. negative array indexes) ---FILE-- -<?php - -echo "==Mixed==\n"; -$a = array(-1=>'a', '-2'=>'b', 3=>'c', '4'=>'d', 5=>'e', '6001'=>'f', '07'=>'g'); - -foreach($a as $k => $v) { - var_dump($k); - var_dump($v); -} - -echo "==Normal==\n"; -$b = array(); -$b[] = 'a'; - -foreach($b as $k => $v) { - var_dump($k); - var_dump($v); -} - -echo "==Negative==\n"; -$c = array('-2' => 'a'); - -foreach($c as $k => $v) { - var_dump($k); - var_dump($v); -} - -echo "==Done==\n"; -?> ---EXPECT-- -==Mixed== -int(-1) -string(1) "a" -int(-2) -string(1) "b" -int(3) -string(1) "c" -int(4) -string(1) "d" -int(5) -string(1) "e" -int(6001) -string(1) "f" -string(2) "07" -string(1) "g" -==Normal== -int(0) -string(1) "a" -==Negative== -int(-2) -string(1) "a" -==Done== diff --git a/ext/standard/tests/array/bug21998.phpt b/ext/standard/tests/array/bug21998.phpt deleted file mode 100644 index aa52dc590a..0000000000 --- a/ext/standard/tests/array/bug21998.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Bug #21998 (array_pop() does not reset the current array position) ---FILE-- -<?php - -$a = array("a", "b", "c"); - -var_dump(key($a)); -var_dump(array_pop($a)); -var_dump(key($a)); -var_dump(array_pop($a)); -var_dump(key($a)); -var_dump(array_pop($a)); -var_dump(key($a)); - -?> ---EXPECT-- -int(0) -string(1) "c" -int(0) -string(1) "b" -int(0) -string(1) "a" -NULL diff --git a/ext/standard/tests/array/bug22088.phpt b/ext/standard/tests/array/bug22088.phpt deleted file mode 100644 index 4352cff914..0000000000 --- a/ext/standard/tests/array/bug22088.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -Bug #22088 (array_shift() leaves next index to be +1 too much) ---FILE-- -<?php - -$a = array('a', 'b', 'c'); -$last = array_shift ($a); -$a[] = 'a'; -var_dump($a); - -$a = array('a' => 1, 'b' => 2, 'c' => 3); -$last = array_shift ($a); -$a[] = 'a'; -var_dump($a); - -?> ---EXPECT-- -array(3) { - [0]=> - string(1) "b" - [1]=> - string(1) "c" - [2]=> - string(1) "a" -} -array(3) { - ["b"]=> - int(2) - ["c"]=> - int(3) - [0]=> - string(1) "a" -} diff --git a/ext/standard/tests/array/bug22463.phpt b/ext/standard/tests/array/bug22463.phpt deleted file mode 100644 index dcede511bb..0000000000 --- a/ext/standard/tests/array/bug22463.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Bug #22463 (array_reduce() segfaults) ---FILE-- -<?php - -function a($ary) { - return (is_array($ary) ? array_reduce($ary, 'cb', 0) : 1); -} - -function cb($v, $elem) { - return $v + a($elem); -} - -$ary = array( - array( - array( - array( - array( - array(0, 1, 2, 3, 4) - ) - ) - ) - ) -); - -var_dump(a($ary)); -?> ---EXPECT-- -int(5) diff --git a/ext/standard/tests/array/bug23581.phpt b/ext/standard/tests/array/bug23581.phpt deleted file mode 100644 index 06e1e388ef..0000000000 --- a/ext/standard/tests/array/bug23581.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Bug #23581 (array_map(NULL, array, array, ...) yields an undefined result) ---FILE-- -<?php -var_dump( - array_map( - NULL, - array(1,2,3), - array(4,5,6), - array(7,8,9) - ) -); -?> ---EXPECT-- -array(3) { - [0]=> - array(3) { - [0]=> - int(1) - [1]=> - int(4) - [2]=> - int(7) - } - [1]=> - array(3) { - [0]=> - int(2) - [1]=> - int(5) - [2]=> - int(8) - } - [2]=> - array(3) { - [0]=> - int(3) - [1]=> - int(6) - [2]=> - int(9) - } -} - diff --git a/ext/standard/tests/array/bug23788.phpt b/ext/standard/tests/array/bug23788.phpt deleted file mode 100644 index 022b3cecd4..0000000000 --- a/ext/standard/tests/array/bug23788.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Bug #23788 (*_replace() clobbers referenced array elements) ---FILE-- -<?php -$numeric = 123; -$bool = true; -$foo = array(&$numeric, &$bool); -var_dump($foo); -str_replace("abc", "def", $foo); -var_dump($foo); -?> ---EXPECT-- -array(2) { - [0]=> - &int(123) - [1]=> - &bool(true) -} -array(2) { - [0]=> - &int(123) - [1]=> - &bool(true) -} diff --git a/ext/standard/tests/array/bug24198.phpt b/ext/standard/tests/array/bug24198.phpt deleted file mode 100644 index b1cd523026..0000000000 --- a/ext/standard/tests/array/bug24198.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST--n -Bug #24198 (array_merge_recursive() invalid recursion detection) ---FILE-- -<?php -$c = array('a' => 'aa','b' => 'bb'); - -var_dump(array_merge_recursive($c, $c)); -?> ---EXPECT-- -array(2) { - ["a"]=> - array(2) { - [0]=> - string(2) "aa" - [1]=> - string(2) "aa" - } - ["b"]=> - array(2) { - [0]=> - string(2) "bb" - [1]=> - string(2) "bb" - } -} diff --git a/ext/standard/tests/array/bug24220.phpt b/ext/standard/tests/array/bug24220.phpt deleted file mode 100644 index c8e25709e9..0000000000 --- a/ext/standard/tests/array/bug24220.phpt +++ /dev/null @@ -1,91 +0,0 @@ ---TEST--n -Bug #24220 (range() numeric string handling) ---FILE-- -<?php - var_dump(range("2003", "2004")); - var_dump(range("a", "z")); - var_dump(range("1", "10")); -?> ---EXPECT-- -array(2) { - [0]=> - int(2003) - [1]=> - int(2004) -} -array(26) { - [0]=> - string(1) "a" - [1]=> - string(1) "b" - [2]=> - string(1) "c" - [3]=> - string(1) "d" - [4]=> - string(1) "e" - [5]=> - string(1) "f" - [6]=> - string(1) "g" - [7]=> - string(1) "h" - [8]=> - string(1) "i" - [9]=> - string(1) "j" - [10]=> - string(1) "k" - [11]=> - string(1) "l" - [12]=> - string(1) "m" - [13]=> - string(1) "n" - [14]=> - string(1) "o" - [15]=> - string(1) "p" - [16]=> - string(1) "q" - [17]=> - string(1) "r" - [18]=> - string(1) "s" - [19]=> - string(1) "t" - [20]=> - string(1) "u" - [21]=> - string(1) "v" - [22]=> - string(1) "w" - [23]=> - string(1) "x" - [24]=> - string(1) "y" - [25]=> - string(1) "z" -} -array(10) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - [9]=> - int(10) -} diff --git a/ext/standard/tests/array/bug24766.phpt b/ext/standard/tests/array/bug24766.phpt deleted file mode 100644 index d6f82f3b16..0000000000 --- a/ext/standard/tests/array/bug24766.phpt +++ /dev/null @@ -1,45 +0,0 @@ ---TEST-- -Bug #24766 (strange result array from unpack) ---FILE-- -<?php - -error_reporting(E_ALL); - -$a = unpack('C2', "\0224V"); -$b = array(1 => 18, 2 => 52); -debug_zval_dump($a, $b); -$k = array_keys($a); -$l = array_keys($b); -debug_zval_dump($k, $l); -$i=$k[0]; -var_dump($a[$i]); -$i=$l[0]; -var_dump($b[$i]); -?> ---EXPECT-- -array(2) refcount(2){ - [1]=> - long(18) refcount(1) - [2]=> - long(52) refcount(1) -} -array(2) refcount(2){ - [1]=> - long(18) refcount(1) - [2]=> - long(52) refcount(1) -} -array(2) refcount(2){ - [0]=> - long(1) refcount(1) - [1]=> - long(2) refcount(1) -} -array(2) refcount(2){ - [0]=> - long(1) refcount(1) - [1]=> - long(2) refcount(1) -} -int(18) -int(18) diff --git a/ext/standard/tests/array/bug24897.phpt b/ext/standard/tests/array/bug24897.phpt deleted file mode 100644 index 45bcde340f..0000000000 --- a/ext/standard/tests/array/bug24897.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -Bug #24897 (inconsistent behaviour or shuffle() & array_multisort()) ---FILE-- -<?php -$a = array(1 => 2); -shuffle($a); -var_dump($a); - -$a = array(1 => 2); -array_multisort($a); -var_dump($a); -?> ---EXPECT-- -array(1) { - [0]=> - int(2) -} -array(1) { - [0]=> - int(2) -} diff --git a/ext/standard/tests/array/bug24980.phpt b/ext/standard/tests/array/bug24980.phpt deleted file mode 100644 index b9e04fd67f..0000000000 --- a/ext/standard/tests/array/bug24980.phpt +++ /dev/null @@ -1,53 +0,0 @@ ---TEST-- -Bug #24980 (array_reduce() uses first element as default running total) ---FILE-- -<?php -/* test #1: numeric data */ -function add_up($running_total, $current_value) -{ - echo "running_total is ".(int)$running_total.", current_value is {$current_value}\n"; - $running_total += $current_value * $current_value; - return $running_total; -} - -$numbers = array (2,3,5,7); -$total = array_reduce($numbers, 'add_up'); -print "Total is $total\n"; - -/* test #2: string data */ -$a = array("a", "b", "c"); -function foo ($a, $b) -{ - return $a . $b; -} -var_dump(array_reduce($a, "foo")); - -/* test #3: basic test (used to leak memory) */ -function rsum($v, $w) -{ - $v += $w; - return $v; -} -function rmul($v, $w) -{ - $v *= $w; - return $v; -} -$a = array(1, 2, 3, 4, 5); -$x = array(); -$b = array_reduce($a, "rsum"); -$c = array_reduce($a, "rmul", 10); -$d = array_reduce($x, "rsum", 1); - -var_dump($b, $c, $d); -?> ---EXPECT-- -running_total is 0, current_value is 2 -running_total is 4, current_value is 3 -running_total is 13, current_value is 5 -running_total is 38, current_value is 7 -Total is 87 -string(3) "abc" -int(15) -int(1200) -int(1) diff --git a/ext/standard/tests/array/bug25708.phpt b/ext/standard/tests/array/bug25708.phpt deleted file mode 100644 index d3da3e3399..0000000000 --- a/ext/standard/tests/array/bug25708.phpt +++ /dev/null @@ -1,223 +0,0 @@ ---TEST-- -Bug #25708 (extract($GLOBALS, EXTR_REFS) mangles $GLOBALS) ---FILE-- -<?php -function foo($ref, $alt) { - unset($GLOBALS['a']); - unset($GLOBALS['b']); - $GLOBALS['a'] = 1; - $GLOBALS['b'] = 2; - - $org_a = $GLOBALS['a']; - $org_b = $GLOBALS['b']; - - if ($ref) { - global $a, $b; - } else { - /* zval temp_var(NULL); // refcount = 1 - * a = temp_var[x] // refcount = 2 - */ - $a = NULL; - $b = NULL; - } - - debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']); - echo "--\n"; - if ($alt) { - $a = &$GLOBALS['a']; - $b = &$GLOBALS['b']; - } else { - extract($GLOBALS, EXTR_REFS); - } - debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']); - echo "--\n"; - $a = &$GLOBALS['a']; - $b = &$GLOBALS['b']; - debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']); - echo "--\n"; - $GLOBALS['b'] = 3; - debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']); - echo "--\n"; - $a = 4; - debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b']); - echo "--\n"; - $c = $b; - debug_zval_dump($b, $GLOBALS['b'], $c); - echo "--\n"; - $b = 'x'; - debug_zval_dump($a, $b, $GLOBALS['a'], $GLOBALS['b'], $c); - echo "--\n"; - debug_zval_dump($org_a, $org_b); - echo "----"; - if ($ref) echo 'r'; - if ($alt) echo 'a'; - echo "\n"; -} - -$a = 'ok'; -$b = 'ok'; -$_a = $a; -$_b = $b; - -foo(false, true); -foo(true, true); -foo(false, false); -foo(true, false); - -debug_zval_dump($_a, $_b); -?> ---EXPECT-- -NULL refcount(2) -NULL refcount(2) -long(1) refcount(3) -long(2) refcount(3) --- -long(1) refcount(1) -long(2) refcount(1) -long(1) refcount(1) -long(2) refcount(1) --- -long(1) refcount(1) -long(2) refcount(1) -long(1) refcount(1) -long(2) refcount(1) --- -long(1) refcount(1) -long(3) refcount(1) -long(1) refcount(1) -long(3) refcount(1) --- -long(4) refcount(1) -long(3) refcount(1) -long(4) refcount(1) -long(3) refcount(1) --- -long(3) refcount(1) -long(3) refcount(1) -long(3) refcount(2) --- -long(4) refcount(1) -string(1) "x" refcount(1) -long(4) refcount(1) -string(1) "x" refcount(1) -long(3) refcount(2) --- -long(1) refcount(2) -long(2) refcount(2) -----a -long(1) refcount(1) -long(2) refcount(1) -long(1) refcount(1) -long(2) refcount(1) --- -long(1) refcount(1) -long(2) refcount(1) -long(1) refcount(1) -long(2) refcount(1) --- -long(1) refcount(1) -long(2) refcount(1) -long(1) refcount(1) -long(2) refcount(1) --- -long(1) refcount(1) -long(3) refcount(1) -long(1) refcount(1) -long(3) refcount(1) --- -long(4) refcount(1) -long(3) refcount(1) -long(4) refcount(1) -long(3) refcount(1) --- -long(3) refcount(1) -long(3) refcount(1) -long(3) refcount(2) --- -long(4) refcount(1) -string(1) "x" refcount(1) -long(4) refcount(1) -string(1) "x" refcount(1) -long(3) refcount(2) --- -long(1) refcount(2) -long(2) refcount(2) -----ra -NULL refcount(2) -NULL refcount(2) -long(1) refcount(3) -long(2) refcount(3) --- -long(1) refcount(1) -long(2) refcount(1) -long(1) refcount(1) -long(2) refcount(1) --- -long(1) refcount(1) -long(2) refcount(1) -long(1) refcount(1) -long(2) refcount(1) --- -long(1) refcount(1) -long(3) refcount(1) -long(1) refcount(1) -long(3) refcount(1) --- -long(4) refcount(1) -long(3) refcount(1) -long(4) refcount(1) -long(3) refcount(1) --- -long(3) refcount(1) -long(3) refcount(1) -long(3) refcount(2) --- -long(4) refcount(1) -string(1) "x" refcount(1) -long(4) refcount(1) -string(1) "x" refcount(1) -long(3) refcount(2) --- -long(1) refcount(2) -long(2) refcount(2) ----- -long(1) refcount(1) -long(2) refcount(1) -long(1) refcount(1) -long(2) refcount(1) --- -long(1) refcount(1) -long(2) refcount(1) -long(1) refcount(1) -long(2) refcount(1) --- -long(1) refcount(1) -long(2) refcount(1) -long(1) refcount(1) -long(2) refcount(1) --- -long(1) refcount(1) -long(3) refcount(1) -long(1) refcount(1) -long(3) refcount(1) --- -long(4) refcount(1) -long(3) refcount(1) -long(4) refcount(1) -long(3) refcount(1) --- -long(3) refcount(1) -long(3) refcount(1) -long(3) refcount(2) --- -long(4) refcount(1) -string(1) "x" refcount(1) -long(4) refcount(1) -string(1) "x" refcount(1) -long(3) refcount(2) --- -long(1) refcount(2) -long(2) refcount(2) -----r -string(2) "ok" refcount(2) -string(2) "ok" refcount(2) diff --git a/ext/standard/tests/array/bug25758.phpt b/ext/standard/tests/array/bug25758.phpt deleted file mode 100644 index ff97d2e3fb..0000000000 --- a/ext/standard/tests/array/bug25758.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -Bug #25758 (var_export does not escape ' & \ inside array keys) ---FILE-- -<?php - $a = array ("quote'" => array("quote'")); - echo var_export($a, true); -?> ---EXPECT-- -array ( - 'quote\'' => - array ( - 0 => 'quote\'', - ), -) diff --git a/ext/standard/tests/array/bug26458.phpt b/ext/standard/tests/array/bug26458.phpt Binary files differdeleted file mode 100644 index d24e1f151b..0000000000 --- a/ext/standard/tests/array/bug26458.phpt +++ /dev/null diff --git a/ext/standard/tests/array/bug28739.phpt b/ext/standard/tests/array/bug28739.phpt deleted file mode 100644 index af888918c5..0000000000 --- a/ext/standard/tests/array/bug28739.phpt +++ /dev/null @@ -1,58 +0,0 @@ ---TEST-- -Bug #28739 (*diff() and *intersect() not clearing the fci cache before work) ---FILE-- -<?php -class p { - public $x; - function __construct($x){$this->x=$x;} -} -function a(&$a, &$b){var_dump(__FUNCTION__);return $a->x - $b->x;} -function b(&$a, &$b){var_dump(__FUNCTION__);return $a->x - $b->x;} - -$p1 = array(new p(2), new p(1), new p(0)); -$p2 = array(new p(0), new p(2), new p(3)); - -uasort($p1, 'a'); -print_r($p1); -echo "Now diffing:\n"; -print_r(array_udiff($p1,$p2, 'b')); -?> ---EXPECT-- -string(1) "a" -string(1) "a" -Array -( - [2] => p Object - ( - [x] => 0 - ) - - [1] => p Object - ( - [x] => 1 - ) - - [0] => p Object - ( - [x] => 2 - ) - -) -Now diffing: -string(1) "b" -string(1) "b" -string(1) "b" -string(1) "b" -string(1) "b" -string(1) "b" -string(1) "b" -string(1) "b" -string(1) "b" -Array -( - [1] => p Object - ( - [x] => 1 - ) - -)
\ No newline at end of file diff --git a/ext/standard/tests/array/bug28974.phpt b/ext/standard/tests/array/bug28974.phpt deleted file mode 100644 index fb272e1d74..0000000000 --- a/ext/standard/tests/array/bug28974.phpt +++ /dev/null @@ -1,89 +0,0 @@ ---TEST-- -Bug #28974 array_(p)slice() treats large lengths incorrectly - overflow ---FILE-- -<?php -$a = $b = $c = array(0,1,2,3,4,5); -print_r($a); -// this is ok: -print_r(array_slice($a,2,2147483645)); - -// this is wrong: -print_r(array_slice($a,2,2147483646)); -echo 'print_r(array_splice($a,2,1));'."\n"; -print_r(array_splice($a,2,1)); -echo "\$a is :"; -print_r($a); -echo 'print_r(array_splice($b,2,2147483645));'."\n"; -print_r(array_splice($b,2,2147483645)); -echo "\$b is :"; -print_r($b); - -// this is wrong: -echo 'print_r(array_splice($c,2,2147483646));'."\n"; -print_r(array_splice($c,2,2147483646)); -echo "\$c is :"; -print_r($c); -?> ---EXPECT-- -Array -( - [0] => 0 - [1] => 1 - [2] => 2 - [3] => 3 - [4] => 4 - [5] => 5 -) -Array -( - [0] => 2 - [1] => 3 - [2] => 4 - [3] => 5 -) -Array -( - [0] => 2 - [1] => 3 - [2] => 4 - [3] => 5 -) -print_r(array_splice($a,2,1)); -Array -( - [0] => 2 -) -$a is :Array -( - [0] => 0 - [1] => 1 - [2] => 3 - [3] => 4 - [4] => 5 -) -print_r(array_splice($b,2,2147483645)); -Array -( - [0] => 2 - [1] => 3 - [2] => 4 - [3] => 5 -) -$b is :Array -( - [0] => 0 - [1] => 1 -) -print_r(array_splice($c,2,2147483646)); -Array -( - [0] => 2 - [1] => 3 - [2] => 4 - [3] => 5 -) -$c is :Array -( - [0] => 0 - [1] => 1 -) diff --git a/ext/standard/tests/array/bug29493.phpt b/ext/standard/tests/array/bug29493.phpt deleted file mode 100644 index 0cfe45910b..0000000000 --- a/ext/standard/tests/array/bug29493.phpt +++ /dev/null @@ -1,115 +0,0 @@ ---TEST-- -Bug #29493 (extract(EXTR_REFS) fails if array has multiple referrals) ---FILE-- -<?php -function t1() -{ - $a = array('foo' => 'aaa'); - // refcount($a) = 1 - // refcount($a['foo']) = 1 - $b = $a; - // refcount($a) = 2 - // refcount($a['foo']) = 1 - $b['foo'] = 'bbb'; - // refcount($a) = 1 - // refcount($a['foo']) = 1 - - var_dump($a, $b); - - extract($a, EXTR_REFS); - - $foo = 'noo'; - - var_dump($a, $b); -} - -function t2() -{ - $a = array('foo' => 'aaa'); - // refcount($a) = 1 - // refcount($a['foo']) = 1 - $b = &$a; - // refcount($a) = 2 - // is_ref($a) = true - // refcount($a['foo']) = 1 - $b['foo'] = 'bbb'; - // refcount($a) = 2 - // refcount($a['foo']) = 1 - - var_dump($a, $b); - - extract($a, EXTR_REFS); - - $foo = 'noo'; - - var_dump($a, $b); -} - -function t3() -{ - $a = array('foo' => 'aaa'); - // refcount($a) = 1 - // refcount($a['foo']) = 1 - $b = &$a; - // refcount($a) = 2 - // is_ref($a) = true - // refcount($a['foo']) = 1 - unset($b); - // refcount($a) = 1 - // is_ref($a) = true - // refcount($a['foo']) = 1 - - var_dump($a); - - extract($a, EXTR_REFS); - - $foo = 'noo'; - - var_dump($a); -} - -t1(); -t2(); -t3(); -?> ---EXPECT-- -array(1) { - ["foo"]=> - string(3) "aaa" -} -array(1) { - ["foo"]=> - string(3) "bbb" -} -array(1) { - ["foo"]=> - &string(3) "noo" -} -array(1) { - ["foo"]=> - string(3) "bbb" -} -array(1) { - ["foo"]=> - string(3) "bbb" -} -array(1) { - ["foo"]=> - string(3) "bbb" -} -array(1) { - ["foo"]=> - &string(3) "noo" -} -array(1) { - ["foo"]=> - &string(3) "noo" -} -array(1) { - ["foo"]=> - string(3) "aaa" -} -array(1) { - ["foo"]=> - &string(3) "noo" -} diff --git a/ext/standard/tests/array/bug29992.phpt b/ext/standard/tests/array/bug29992.phpt deleted file mode 100755 index 74be291891..0000000000 --- a/ext/standard/tests/array/bug29992.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Bug #29992 (foreach by reference corrupts the array) ---FILE-- -<?php - -$array = array(1,2,3); - -print_r($array); - -foreach($array as $item) var_dump($item); -foreach($array as &$item) var_dump($item); -foreach($array as &$item) var_dump($item); -foreach($array as $item) var_dump($item); - -print_r($array); - -?> -===DONE=== ---EXPECT-- -Array -( - [0] => 1 - [1] => 2 - [2] => 3 -) -int(1) -int(2) -int(3) -int(1) -int(2) -int(3) -int(1) -int(2) -int(3) -int(1) -int(2) -int(3) -Array -( - [0] => 1 - [1] => 2 - [2] => 3 -) -===DONE=== diff --git a/ext/standard/tests/array/bug30266.phpt b/ext/standard/tests/array/bug30266.phpt deleted file mode 100755 index 8f7c3d2135..0000000000 --- a/ext/standard/tests/array/bug30266.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Bug #30266 (Invalid opcode 137/1/8) and array_walk ---FILE-- -<?php -class testc -{ - public $b = "c"; - - function crash($val) - { - $this->b = $val; - throw new Exception("Error"); - } -} - -$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple"); - -$myobj = new testc(); - -function test($item2, $key, $userd) -{ - $userd->crash($item2); -} - -try -{ - array_walk($fruits, 'test', $myobj); -} -catch(Exception $e) -{ - echo "Caught: " . $e->getMessage() . "\n"; -} -?> -===DONE=== ---EXPECT-- -Caught: Error -===DONE=== diff --git a/ext/standard/tests/array/bug30833.phpt b/ext/standard/tests/array/bug30833.phpt deleted file mode 100644 index 61701a532f..0000000000 --- a/ext/standard/tests/array/bug30833.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -bug #30833 (array_count_values() modifying input array) ---FILE-- -<?php - -$foo = array('abc', '0000'); -var_dump($foo); - -$count = array_count_values( $foo ); -var_dump($count); - -var_dump($foo); - -echo "Done\n"; -?> ---EXPECT-- -array(2) { - [0]=> - string(3) "abc" - [1]=> - string(4) "0000" -} -array(2) { - ["abc"]=> - int(1) - [0]=> - int(1) -} -array(2) { - [0]=> - string(3) "abc" - [1]=> - string(4) "0000" -} -Done diff --git a/ext/standard/tests/array/bug31213.phpt b/ext/standard/tests/array/bug31213.phpt deleted file mode 100644 index 6aa31d5e0e..0000000000 --- a/ext/standard/tests/array/bug31213.phpt +++ /dev/null @@ -1,57 +0,0 @@ ---TEST-- -Bug #31213 (Sideeffects caused by bug #29493) ---FILE-- -<?php -function test($use_extract) { - $a = 1; - $b = 1; - - $arr = array( - '_a' => $a, - '_b' => &$b - ); - - var_dump($a, $b); - - if ($use_extract) { - extract($arr, EXTR_REFS); - } else { - $_a = &$arr['_a']; - $_b = &$arr['_b']; - } - - $_a++; - $_b++; - - var_dump($a, $b, $_a, $_b, $arr); -} - -test(false); -test(true); - -?> ---EXPECT-- -int(1) -int(1) -int(1) -int(2) -int(2) -int(2) -array(2) { - ["_a"]=> - &int(2) - ["_b"]=> - &int(2) -} -int(1) -int(1) -int(1) -int(2) -int(2) -int(2) -array(2) { - ["_a"]=> - &int(2) - ["_b"]=> - &int(2) -} diff --git a/ext/standard/tests/array/bug32021.phpt b/ext/standard/tests/array/bug32021.phpt deleted file mode 100644 index 5d3b421ab4..0000000000 --- a/ext/standard/tests/array/bug32021.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -Bug #32021 (Crash caused by range('', 'z')) ---FILE-- -<?php -$foo = range('', 'z'); -var_dump($foo); -?> -ALIVE ---EXPECT-- -array(1) { - [0]=> - int(0) -} -ALIVE diff --git a/ext/standard/tests/array/count_recursive.phpt b/ext/standard/tests/array/count_recursive.phpt deleted file mode 100644 index e6824ab0e5..0000000000 --- a/ext/standard/tests/array/count_recursive.phpt +++ /dev/null @@ -1,52 +0,0 @@ ---TEST-- -count ---FILE-- -<?php -print "Testing NULL...\n"; -$arr = NULL; -print "COUNT_NORMAL: should be 0, is ".count($arr, COUNT_NORMAL)."\n"; -print "COUNT_RECURSIVE: should be 0, is ".count($arr, COUNT_RECURSIVE)."\n"; - -print "Testing arrays...\n"; -$arr = array(1, array(3, 4, array(6, array(8)))); -print "COUNT_NORMAL: should be 2, is ".count($arr, COUNT_NORMAL)."\n"; -print "COUNT_RECURSIVE: should be 8, is ".count($arr, COUNT_RECURSIVE)."\n"; - -print "Testing hashes...\n"; -$arr = array("a" => 1, "b" => 2, array("c" => 3, array("d" => 5))); -print "COUNT_NORMAL: should be 3, is ".count($arr, COUNT_NORMAL)."\n"; -print "COUNT_RECURSIVE: should be 6, is ".count($arr, COUNT_RECURSIVE)."\n"; - -print "Testing strings...\n"; -print "COUNT_NORMAL: should be 1, is ".count("string", COUNT_NORMAL)."\n"; -print "COUNT_RECURSIVE: should be 1, is ".count("string", COUNT_RECURSIVE)."\n"; - -print "Testing various types with no second argument.\n"; -print "COUNT_NORMAL: should be 1, is ".count("string")."\n"; -print "COUNT_NORMAL: should be 2, is ".count(array("a", array("b")))."\n"; - -$arr = array('a'=>array(NULL, NULL, NULL), 1=>array(NULL=>1, 1=>NULL), - array(array(array(array(array(NULL)))))); -print "Testing really cool arrays ;)\n"; -print "COUNT_NORMAL: should be 3, is ".count($arr, COUNT_NORMAL)."\n"; -print "COUNT_RECURSIVE: should be 13, is ".count($arr, COUNT_RECURSIVE)."\n"; -?> ---EXPECT-- -Testing NULL... -COUNT_NORMAL: should be 0, is 0 -COUNT_RECURSIVE: should be 0, is 0 -Testing arrays... -COUNT_NORMAL: should be 2, is 2 -COUNT_RECURSIVE: should be 8, is 8 -Testing hashes... -COUNT_NORMAL: should be 3, is 3 -COUNT_RECURSIVE: should be 6, is 6 -Testing strings... -COUNT_NORMAL: should be 1, is 1 -COUNT_RECURSIVE: should be 1, is 1 -Testing various types with no second argument. -COUNT_NORMAL: should be 1, is 1 -COUNT_NORMAL: should be 2, is 2 -Testing really cool arrays ;) -COUNT_NORMAL: should be 3, is 3 -COUNT_RECURSIVE: should be 13, is 13 diff --git a/ext/standard/tests/array/data.inc b/ext/standard/tests/array/data.inc deleted file mode 100644 index 2991274be8..0000000000 --- a/ext/standard/tests/array/data.inc +++ /dev/null @@ -1,13 +0,0 @@ -<?php -$tmp = pow(2,24); -$data = array( - 'PHP', - 17=>'PHP: Hypertext Preprocessor', - 5=>'Test', - 'test'=>27, - 1000=>'test', - "-1000"=>array('banana', 'orange'), - 'monkey', - $tmp=>-1/3 -); -?> diff --git a/ext/standard/tests/array/locale_sort.phpt b/ext/standard/tests/array/locale_sort.phpt deleted file mode 100644 index b4e15fa524..0000000000 --- a/ext/standard/tests/array/locale_sort.phpt +++ /dev/null @@ -1,56 +0,0 @@ ---TEST-- -Sort with SORT_LOCALE_STRING ---SKIPIF-- -<?php -if ("fr_FR" != setlocale(LC_CTYPE, "fr_FR")) { - die("skip setlocale() failed\n"); -} -?> ---FILE-- -<?php -setlocale(LC_ALL, 'fr_FR'); -$table = array("AB" => "Alberta", -"BC" => "Colombie-Britannique", -"MB" => "Manitoba", -"NB" => "Nouveau-Brunswick", -"NL" => "Terre-Neuve-et-Labrador", -"NS" => "Nouvelle-Écosse", -"ON" => "Ontario", -"PE" => "Île-du-Prince-Édouard", -"QC" => "Québec", -"SK" => "Saskatchewan", -"NT" => "Territoires du Nord-Ouest", -"NU" => "Nunavut", -"YT" => "Territoire du Yukon"); -asort($table, SORT_LOCALE_STRING); -var_dump($table); -?> ---EXPECT-- -array(13) { - ["AB"]=> - string(7) "Alberta" - ["BC"]=> - string(20) "Colombie-Britannique" - ["PE"]=> - string(21) "Île-du-Prince-Édouard" - ["MB"]=> - string(8) "Manitoba" - ["NB"]=> - string(17) "Nouveau-Brunswick" - ["NS"]=> - string(15) "Nouvelle-Écosse" - ["NU"]=> - string(7) "Nunavut" - ["ON"]=> - string(7) "Ontario" - ["QC"]=> - string(6) "Québec" - ["SK"]=> - string(12) "Saskatchewan" - ["NL"]=> - string(23) "Terre-Neuve-et-Labrador" - ["YT"]=> - string(19) "Territoire du Yukon" - ["NT"]=> - string(25) "Territoires du Nord-Ouest" -} diff --git a/ext/standard/tests/array/range.phpt b/ext/standard/tests/array/range.phpt deleted file mode 100644 index 23fb985f86..0000000000 --- a/ext/standard/tests/array/range.phpt +++ /dev/null @@ -1,1345 +0,0 @@ ---TEST-- -range() ---FILE-- -<?php - var_dump(range(1, 100)); - var_dump(range(100, 1)); - - var_dump(range("1", "100")); - var_dump(range("100", "1")); - - var_dump(range("a", "z")); - var_dump(range("z", "a")); - var_dump(range("q", "q")); - - var_dump(range(5, 5)); - - var_dump(range(5.1, 10.1)); - var_dump(range(10.1, 5.1)); - - var_dump(range("5.1", "10.1")); - var_dump(range("10.1", "5.1")); - - var_dump(range(1, 5, 0.1)); - var_dump(range(5, 1, 0.1)); - - var_dump(range(1, 5, "0.1")); - var_dump(range("1", "5", 0.1)); -?> ---EXPECT-- -array(100) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - [9]=> - int(10) - [10]=> - int(11) - [11]=> - int(12) - [12]=> - int(13) - [13]=> - int(14) - [14]=> - int(15) - [15]=> - int(16) - [16]=> - int(17) - [17]=> - int(18) - [18]=> - int(19) - [19]=> - int(20) - [20]=> - int(21) - [21]=> - int(22) - [22]=> - int(23) - [23]=> - int(24) - [24]=> - int(25) - [25]=> - int(26) - [26]=> - int(27) - [27]=> - int(28) - [28]=> - int(29) - [29]=> - int(30) - [30]=> - int(31) - [31]=> - int(32) - [32]=> - int(33) - [33]=> - int(34) - [34]=> - int(35) - [35]=> - int(36) - [36]=> - int(37) - [37]=> - int(38) - [38]=> - int(39) - [39]=> - int(40) - [40]=> - int(41) - [41]=> - int(42) - [42]=> - int(43) - [43]=> - int(44) - [44]=> - int(45) - [45]=> - int(46) - [46]=> - int(47) - [47]=> - int(48) - [48]=> - int(49) - [49]=> - int(50) - [50]=> - int(51) - [51]=> - int(52) - [52]=> - int(53) - [53]=> - int(54) - [54]=> - int(55) - [55]=> - int(56) - [56]=> - int(57) - [57]=> - int(58) - [58]=> - int(59) - [59]=> - int(60) - [60]=> - int(61) - [61]=> - int(62) - [62]=> - int(63) - [63]=> - int(64) - [64]=> - int(65) - [65]=> - int(66) - [66]=> - int(67) - [67]=> - int(68) - [68]=> - int(69) - [69]=> - int(70) - [70]=> - int(71) - [71]=> - int(72) - [72]=> - int(73) - [73]=> - int(74) - [74]=> - int(75) - [75]=> - int(76) - [76]=> - int(77) - [77]=> - int(78) - [78]=> - int(79) - [79]=> - int(80) - [80]=> - int(81) - [81]=> - int(82) - [82]=> - int(83) - [83]=> - int(84) - [84]=> - int(85) - [85]=> - int(86) - [86]=> - int(87) - [87]=> - int(88) - [88]=> - int(89) - [89]=> - int(90) - [90]=> - int(91) - [91]=> - int(92) - [92]=> - int(93) - [93]=> - int(94) - [94]=> - int(95) - [95]=> - int(96) - [96]=> - int(97) - [97]=> - int(98) - [98]=> - int(99) - [99]=> - int(100) -} -array(100) { - [0]=> - int(100) - [1]=> - int(99) - [2]=> - int(98) - [3]=> - int(97) - [4]=> - int(96) - [5]=> - int(95) - [6]=> - int(94) - [7]=> - int(93) - [8]=> - int(92) - [9]=> - int(91) - [10]=> - int(90) - [11]=> - int(89) - [12]=> - int(88) - [13]=> - int(87) - [14]=> - int(86) - [15]=> - int(85) - [16]=> - int(84) - [17]=> - int(83) - [18]=> - int(82) - [19]=> - int(81) - [20]=> - int(80) - [21]=> - int(79) - [22]=> - int(78) - [23]=> - int(77) - [24]=> - int(76) - [25]=> - int(75) - [26]=> - int(74) - [27]=> - int(73) - [28]=> - int(72) - [29]=> - int(71) - [30]=> - int(70) - [31]=> - int(69) - [32]=> - int(68) - [33]=> - int(67) - [34]=> - int(66) - [35]=> - int(65) - [36]=> - int(64) - [37]=> - int(63) - [38]=> - int(62) - [39]=> - int(61) - [40]=> - int(60) - [41]=> - int(59) - [42]=> - int(58) - [43]=> - int(57) - [44]=> - int(56) - [45]=> - int(55) - [46]=> - int(54) - [47]=> - int(53) - [48]=> - int(52) - [49]=> - int(51) - [50]=> - int(50) - [51]=> - int(49) - [52]=> - int(48) - [53]=> - int(47) - [54]=> - int(46) - [55]=> - int(45) - [56]=> - int(44) - [57]=> - int(43) - [58]=> - int(42) - [59]=> - int(41) - [60]=> - int(40) - [61]=> - int(39) - [62]=> - int(38) - [63]=> - int(37) - [64]=> - int(36) - [65]=> - int(35) - [66]=> - int(34) - [67]=> - int(33) - [68]=> - int(32) - [69]=> - int(31) - [70]=> - int(30) - [71]=> - int(29) - [72]=> - int(28) - [73]=> - int(27) - [74]=> - int(26) - [75]=> - int(25) - [76]=> - int(24) - [77]=> - int(23) - [78]=> - int(22) - [79]=> - int(21) - [80]=> - int(20) - [81]=> - int(19) - [82]=> - int(18) - [83]=> - int(17) - [84]=> - int(16) - [85]=> - int(15) - [86]=> - int(14) - [87]=> - int(13) - [88]=> - int(12) - [89]=> - int(11) - [90]=> - int(10) - [91]=> - int(9) - [92]=> - int(8) - [93]=> - int(7) - [94]=> - int(6) - [95]=> - int(5) - [96]=> - int(4) - [97]=> - int(3) - [98]=> - int(2) - [99]=> - int(1) -} -array(100) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) - [5]=> - int(6) - [6]=> - int(7) - [7]=> - int(8) - [8]=> - int(9) - [9]=> - int(10) - [10]=> - int(11) - [11]=> - int(12) - [12]=> - int(13) - [13]=> - int(14) - [14]=> - int(15) - [15]=> - int(16) - [16]=> - int(17) - [17]=> - int(18) - [18]=> - int(19) - [19]=> - int(20) - [20]=> - int(21) - [21]=> - int(22) - [22]=> - int(23) - [23]=> - int(24) - [24]=> - int(25) - [25]=> - int(26) - [26]=> - int(27) - [27]=> - int(28) - [28]=> - int(29) - [29]=> - int(30) - [30]=> - int(31) - [31]=> - int(32) - [32]=> - int(33) - [33]=> - int(34) - [34]=> - int(35) - [35]=> - int(36) - [36]=> - int(37) - [37]=> - int(38) - [38]=> - int(39) - [39]=> - int(40) - [40]=> - int(41) - [41]=> - int(42) - [42]=> - int(43) - [43]=> - int(44) - [44]=> - int(45) - [45]=> - int(46) - [46]=> - int(47) - [47]=> - int(48) - [48]=> - int(49) - [49]=> - int(50) - [50]=> - int(51) - [51]=> - int(52) - [52]=> - int(53) - [53]=> - int(54) - [54]=> - int(55) - [55]=> - int(56) - [56]=> - int(57) - [57]=> - int(58) - [58]=> - int(59) - [59]=> - int(60) - [60]=> - int(61) - [61]=> - int(62) - [62]=> - int(63) - [63]=> - int(64) - [64]=> - int(65) - [65]=> - int(66) - [66]=> - int(67) - [67]=> - int(68) - [68]=> - int(69) - [69]=> - int(70) - [70]=> - int(71) - [71]=> - int(72) - [72]=> - int(73) - [73]=> - int(74) - [74]=> - int(75) - [75]=> - int(76) - [76]=> - int(77) - [77]=> - int(78) - [78]=> - int(79) - [79]=> - int(80) - [80]=> - int(81) - [81]=> - int(82) - [82]=> - int(83) - [83]=> - int(84) - [84]=> - int(85) - [85]=> - int(86) - [86]=> - int(87) - [87]=> - int(88) - [88]=> - int(89) - [89]=> - int(90) - [90]=> - int(91) - [91]=> - int(92) - [92]=> - int(93) - [93]=> - int(94) - [94]=> - int(95) - [95]=> - int(96) - [96]=> - int(97) - [97]=> - int(98) - [98]=> - int(99) - [99]=> - int(100) -} -array(100) { - [0]=> - int(100) - [1]=> - int(99) - [2]=> - int(98) - [3]=> - int(97) - [4]=> - int(96) - [5]=> - int(95) - [6]=> - int(94) - [7]=> - int(93) - [8]=> - int(92) - [9]=> - int(91) - [10]=> - int(90) - [11]=> - int(89) - [12]=> - int(88) - [13]=> - int(87) - [14]=> - int(86) - [15]=> - int(85) - [16]=> - int(84) - [17]=> - int(83) - [18]=> - int(82) - [19]=> - int(81) - [20]=> - int(80) - [21]=> - int(79) - [22]=> - int(78) - [23]=> - int(77) - [24]=> - int(76) - [25]=> - int(75) - [26]=> - int(74) - [27]=> - int(73) - [28]=> - int(72) - [29]=> - int(71) - [30]=> - int(70) - [31]=> - int(69) - [32]=> - int(68) - [33]=> - int(67) - [34]=> - int(66) - [35]=> - int(65) - [36]=> - int(64) - [37]=> - int(63) - [38]=> - int(62) - [39]=> - int(61) - [40]=> - int(60) - [41]=> - int(59) - [42]=> - int(58) - [43]=> - int(57) - [44]=> - int(56) - [45]=> - int(55) - [46]=> - int(54) - [47]=> - int(53) - [48]=> - int(52) - [49]=> - int(51) - [50]=> - int(50) - [51]=> - int(49) - [52]=> - int(48) - [53]=> - int(47) - [54]=> - int(46) - [55]=> - int(45) - [56]=> - int(44) - [57]=> - int(43) - [58]=> - int(42) - [59]=> - int(41) - [60]=> - int(40) - [61]=> - int(39) - [62]=> - int(38) - [63]=> - int(37) - [64]=> - int(36) - [65]=> - int(35) - [66]=> - int(34) - [67]=> - int(33) - [68]=> - int(32) - [69]=> - int(31) - [70]=> - int(30) - [71]=> - int(29) - [72]=> - int(28) - [73]=> - int(27) - [74]=> - int(26) - [75]=> - int(25) - [76]=> - int(24) - [77]=> - int(23) - [78]=> - int(22) - [79]=> - int(21) - [80]=> - int(20) - [81]=> - int(19) - [82]=> - int(18) - [83]=> - int(17) - [84]=> - int(16) - [85]=> - int(15) - [86]=> - int(14) - [87]=> - int(13) - [88]=> - int(12) - [89]=> - int(11) - [90]=> - int(10) - [91]=> - int(9) - [92]=> - int(8) - [93]=> - int(7) - [94]=> - int(6) - [95]=> - int(5) - [96]=> - int(4) - [97]=> - int(3) - [98]=> - int(2) - [99]=> - int(1) -} -array(26) { - [0]=> - string(1) "a" - [1]=> - string(1) "b" - [2]=> - string(1) "c" - [3]=> - string(1) "d" - [4]=> - string(1) "e" - [5]=> - string(1) "f" - [6]=> - string(1) "g" - [7]=> - string(1) "h" - [8]=> - string(1) "i" - [9]=> - string(1) "j" - [10]=> - string(1) "k" - [11]=> - string(1) "l" - [12]=> - string(1) "m" - [13]=> - string(1) "n" - [14]=> - string(1) "o" - [15]=> - string(1) "p" - [16]=> - string(1) "q" - [17]=> - string(1) "r" - [18]=> - string(1) "s" - [19]=> - string(1) "t" - [20]=> - string(1) "u" - [21]=> - string(1) "v" - [22]=> - string(1) "w" - [23]=> - string(1) "x" - [24]=> - string(1) "y" - [25]=> - string(1) "z" -} -array(26) { - [0]=> - string(1) "z" - [1]=> - string(1) "y" - [2]=> - string(1) "x" - [3]=> - string(1) "w" - [4]=> - string(1) "v" - [5]=> - string(1) "u" - [6]=> - string(1) "t" - [7]=> - string(1) "s" - [8]=> - string(1) "r" - [9]=> - string(1) "q" - [10]=> - string(1) "p" - [11]=> - string(1) "o" - [12]=> - string(1) "n" - [13]=> - string(1) "m" - [14]=> - string(1) "l" - [15]=> - string(1) "k" - [16]=> - string(1) "j" - [17]=> - string(1) "i" - [18]=> - string(1) "h" - [19]=> - string(1) "g" - [20]=> - string(1) "f" - [21]=> - string(1) "e" - [22]=> - string(1) "d" - [23]=> - string(1) "c" - [24]=> - string(1) "b" - [25]=> - string(1) "a" -} -array(1) { - [0]=> - string(1) "q" -} -array(1) { - [0]=> - int(5) -} -array(6) { - [0]=> - float(5.1) - [1]=> - float(6.1) - [2]=> - float(7.1) - [3]=> - float(8.1) - [4]=> - float(9.1) - [5]=> - float(10.1) -} -array(6) { - [0]=> - float(10.1) - [1]=> - float(9.1) - [2]=> - float(8.1) - [3]=> - float(7.1) - [4]=> - float(6.1) - [5]=> - float(5.1) -} -array(6) { - [0]=> - float(5.1) - [1]=> - float(6.1) - [2]=> - float(7.1) - [3]=> - float(8.1) - [4]=> - float(9.1) - [5]=> - float(10.1) -} -array(6) { - [0]=> - float(10.1) - [1]=> - float(9.1) - [2]=> - float(8.1) - [3]=> - float(7.1) - [4]=> - float(6.1) - [5]=> - float(5.1) -} -array(41) { - [0]=> - float(1) - [1]=> - float(1.1) - [2]=> - float(1.2) - [3]=> - float(1.3) - [4]=> - float(1.4) - [5]=> - float(1.5) - [6]=> - float(1.6) - [7]=> - float(1.7) - [8]=> - float(1.8) - [9]=> - float(1.9) - [10]=> - float(2) - [11]=> - float(2.1) - [12]=> - float(2.2) - [13]=> - float(2.3) - [14]=> - float(2.4) - [15]=> - float(2.5) - [16]=> - float(2.6) - [17]=> - float(2.7) - [18]=> - float(2.8) - [19]=> - float(2.9) - [20]=> - float(3) - [21]=> - float(3.1) - [22]=> - float(3.2) - [23]=> - float(3.3) - [24]=> - float(3.4) - [25]=> - float(3.5) - [26]=> - float(3.6) - [27]=> - float(3.7) - [28]=> - float(3.8) - [29]=> - float(3.9) - [30]=> - float(4) - [31]=> - float(4.1) - [32]=> - float(4.2) - [33]=> - float(4.3) - [34]=> - float(4.4) - [35]=> - float(4.5) - [36]=> - float(4.6) - [37]=> - float(4.7) - [38]=> - float(4.8) - [39]=> - float(4.9) - [40]=> - float(5) -} -array(41) { - [0]=> - float(5) - [1]=> - float(4.9) - [2]=> - float(4.8) - [3]=> - float(4.7) - [4]=> - float(4.6) - [5]=> - float(4.5) - [6]=> - float(4.4) - [7]=> - float(4.3) - [8]=> - float(4.2) - [9]=> - float(4.1) - [10]=> - float(4) - [11]=> - float(3.9) - [12]=> - float(3.8) - [13]=> - float(3.7) - [14]=> - float(3.6) - [15]=> - float(3.5) - [16]=> - float(3.4) - [17]=> - float(3.3) - [18]=> - float(3.2) - [19]=> - float(3.1) - [20]=> - float(3) - [21]=> - float(2.9) - [22]=> - float(2.8) - [23]=> - float(2.7) - [24]=> - float(2.6) - [25]=> - float(2.5) - [26]=> - float(2.4) - [27]=> - float(2.3) - [28]=> - float(2.2) - [29]=> - float(2.1) - [30]=> - float(2) - [31]=> - float(1.9) - [32]=> - float(1.8) - [33]=> - float(1.7) - [34]=> - float(1.6) - [35]=> - float(1.5) - [36]=> - float(1.4) - [37]=> - float(1.3) - [38]=> - float(1.2) - [39]=> - float(1.1) - [40]=> - float(1) -} -array(41) { - [0]=> - float(1) - [1]=> - float(1.1) - [2]=> - float(1.2) - [3]=> - float(1.3) - [4]=> - float(1.4) - [5]=> - float(1.5) - [6]=> - float(1.6) - [7]=> - float(1.7) - [8]=> - float(1.8) - [9]=> - float(1.9) - [10]=> - float(2) - [11]=> - float(2.1) - [12]=> - float(2.2) - [13]=> - float(2.3) - [14]=> - float(2.4) - [15]=> - float(2.5) - [16]=> - float(2.6) - [17]=> - float(2.7) - [18]=> - float(2.8) - [19]=> - float(2.9) - [20]=> - float(3) - [21]=> - float(3.1) - [22]=> - float(3.2) - [23]=> - float(3.3) - [24]=> - float(3.4) - [25]=> - float(3.5) - [26]=> - float(3.6) - [27]=> - float(3.7) - [28]=> - float(3.8) - [29]=> - float(3.9) - [30]=> - float(4) - [31]=> - float(4.1) - [32]=> - float(4.2) - [33]=> - float(4.3) - [34]=> - float(4.4) - [35]=> - float(4.5) - [36]=> - float(4.6) - [37]=> - float(4.7) - [38]=> - float(4.8) - [39]=> - float(4.9) - [40]=> - float(5) -} -array(41) { - [0]=> - float(1) - [1]=> - float(1.1) - [2]=> - float(1.2) - [3]=> - float(1.3) - [4]=> - float(1.4) - [5]=> - float(1.5) - [6]=> - float(1.6) - [7]=> - float(1.7) - [8]=> - float(1.8) - [9]=> - float(1.9) - [10]=> - float(2) - [11]=> - float(2.1) - [12]=> - float(2.2) - [13]=> - float(2.3) - [14]=> - float(2.4) - [15]=> - float(2.5) - [16]=> - float(2.6) - [17]=> - float(2.7) - [18]=> - float(2.8) - [19]=> - float(2.9) - [20]=> - float(3) - [21]=> - float(3.1) - [22]=> - float(3.2) - [23]=> - float(3.3) - [24]=> - float(3.4) - [25]=> - float(3.5) - [26]=> - float(3.6) - [27]=> - float(3.7) - [28]=> - float(3.8) - [29]=> - float(3.9) - [30]=> - float(4) - [31]=> - float(4.1) - [32]=> - float(4.2) - [33]=> - float(4.3) - [34]=> - float(4.4) - [35]=> - float(4.5) - [36]=> - float(4.6) - [37]=> - float(4.7) - [38]=> - float(4.8) - [39]=> - float(4.9) - [40]=> - float(5) -} diff --git a/ext/standard/tests/array/var_export.phpt b/ext/standard/tests/array/var_export.phpt deleted file mode 100644 index d5acf9dada..0000000000 --- a/ext/standard/tests/array/var_export.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -var_export() and objects with numeric indexes properties ---FILE-- -<?php -$a = (object) array (1, 3, "foo" => "bar"); -var_export($a); -?> ---EXPECT-- -class stdClass { - public $foo = 'bar'; -} diff --git a/ext/standard/tests/array/var_export2.phpt b/ext/standard/tests/array/var_export2.phpt Binary files differdeleted file mode 100644 index 2b8a1f97ef..0000000000 --- a/ext/standard/tests/array/var_export2.phpt +++ /dev/null |