diff options
author | SVN Migration <svn@php.net> | 2004-01-25 12:03:25 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2004-01-25 12:03:25 +0000 |
commit | 22476b36ce621bdd115493bab84cbe706e422a7c (patch) | |
tree | 1124d1c5af68860a78c2252bb0dac63c9f18156e /ext/standard/tests | |
parent | eb7aca4ea896b09cb9afc2466a46f4720acc4a4e (diff) | |
download | php-git-php_ibase_before_split.tar.gz |
This commit was manufactured by cvs2svn to create tagphp_ibase_before_split
'php_ibase_before_split'.
Diffstat (limited to 'ext/standard/tests')
235 files changed, 0 insertions, 18822 deletions
diff --git a/ext/standard/tests/array/001.phpt b/ext/standard/tests/array/001.phpt deleted file mode 100644 index 3b72b331d2..0000000000 --- a/ext/standard/tests/array/001.phpt +++ /dev/null @@ -1,159 +0,0 @@ ---TEST-- -Test array_merge and array_walk ---POST-- ---GET-- ---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 e9940b5348..0000000000 --- a/ext/standard/tests/array/007.phpt +++ /dev/null @@ -1,619 +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) { - ["public_member"]=> - int(9) - } - ["0.5"]=> - object(cr)#2 (2) { - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#3 (2) { - ["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) { - ["public_member"]=> - int(9) - } - ["0.5"]=> - object(cr)#2 (2) { - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#3 (2) { - ["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) { - ["public_member"]=> - int(9) - } - ["0.5"]=> - object(cr)#2 (2) { - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#3 (2) { - ["public_member"]=> - int(23) - } - [1]=> - object(cr)#4 (2) { - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#5 (2) { - ["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) { - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#3 (2) { - ["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) { - ["public_member"]=> - int(9) - } - ["0.5"]=> - object(cr)#2 (2) { - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#3 (2) { - ["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_intersect_1.phpt b/ext/standard/tests/array/array_intersect_1.phpt deleted file mode 100644 index 2f12b22919..0000000000 --- a/ext/standard/tests/array/array_intersect_1.phpt +++ /dev/null @@ -1,547 +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) { - ["public_member"]=> - int(9) - } - [1]=> - object(cr)#4 (2) { - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#5 (2) { - ["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) { - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#5 (2) { - ["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) { - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#5 (2) { - ["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) { - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#5 (2) { - ["public_member"]=> - int(-15) - } -} -end ------------ array_uintersect_uassoc() with method -------- 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 afae371b00..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); -?> ---EXPECT-- -int(500500) -int(500500) -float(5000050000) -float(5000050000)
\ No newline at end of file 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/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/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/assert/assert.phpt b/ext/standard/tests/assert/assert.phpt deleted file mode 100644 index 21924902a8..0000000000 --- a/ext/standard/tests/assert/assert.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -assert() ---POST-- ---GET-- ---FILE-- -<?php -function a($file,$line,$myev) -{ - echo "assertion failed $line,\"$myev\"\n"; -} - -class a -{ - function assert($file,$line,$myev) - { - echo "class assertion failed $line,\"$myev\"\n"; - } -} - -assert_options(ASSERT_ACTIVE,1); -assert_options(ASSERT_QUIET_EVAL,1); -assert_options(ASSERT_WARNING,0); - -$a = 0; - -assert_options(ASSERT_CALLBACK,"a"); -assert('$a != 0'); - -assert_options(ASSERT_CALLBACK,array("a","assert")); -assert('$a != 0'); - -$obj = new a(); -assert_options(ASSERT_CALLBACK,array(&$obj,"assert")); -assert('$a != 0'); -?> ---EXPECT-- -assertion failed 22,"$a != 0" -class assertion failed 25,"$a != 0" -class assertion failed 29,"$a != 0" diff --git a/ext/standard/tests/file/001-win32.phpt b/ext/standard/tests/file/001-win32.phpt deleted file mode 100644 index d18ee325a6..0000000000 --- a/ext/standard/tests/file/001-win32.phpt +++ /dev/null @@ -1,127 +0,0 @@ ---TEST-- -File type functions ---SKIPIF-- -<?php -if (substr(PHP_OS, 0, 3) != 'WIN') { - die('skip only for Windows'); -} -?> ---POST-- ---GET-- ---FILE-- -<?php -chdir(dirname(__FILE__)); -@unlink('test.file'); -@unlink('test.link'); -if (file_exists('test.file')) { - echo "test.file exists\n"; -} else { - echo "test.file does not exist\n"; -} -fclose (fopen('test.file', 'w')); -chmod ('test.file', 0744); -if (file_exists('test.file')) { - echo "test.file exists\n"; -} else { - echo "test.file does not exist\n"; -} -sleep (2); -if (file_exists('test.link')) { - echo "test.link exists\n"; -} else { - echo "test.link does not exist\n"; -} -if (is_link('test.file')) { - echo "test.file is a symlink\n"; -} else { - echo "test.file is not a symlink\n"; -} -if (is_link('test.link')) { - echo "test.link is a symlink\n"; -} else { - echo "test.link is not a symlink\n"; -} -if (file_exists('test.file')) { - echo "test.file exists\n"; -} else { - echo "test.file does not exist\n"; -} -$s = stat ('test.file'); -$ls = lstat ('test.file'); -for ($i = 0; $i <= 12; $i++) { - if ($ls[$i] != $s[$i]) { - echo "test.file lstat and stat differ at element $i\n"; - } -} -echo "test.file is " . filetype('test.file') . "\n"; -echo "test.link is " . filetype('test.link') . "\n"; -printf ("test.file permissions are 0%o\n", 0777 & fileperms('test.file')); -echo "test.file size is " . filesize('test.file') . "\n"; -if (is_writeable('test.file')) { - echo "test.file is writeable\n"; -} else { - echo "test.file is not writeable\n"; -} -if (is_readable('test.file')) { - echo "test.file is readable\n"; -} else { - echo "test.file is not readable\n"; -} -if (is_file('test.file')) { - echo "test.file is a regular file\n"; -} else { - echo "test.file is not a regular file\n"; -} -if (is_file('test.link')) { - echo "test.link is a regular file\n"; -} else { - echo "test.link is not a regular file\n"; -} -if (is_dir('test.link')) { - echo "test.link is a directory\n"; -} else { - echo "test.link is not a directory\n"; -} -if (is_dir('../file')) { - echo "../file is a directory\n"; -} else { - echo "../file is not a directory\n"; -} -if (is_dir('test.file')) { - echo "test.file is a directory\n"; -} else { - echo "test.file is not a directory\n"; -} -unlink('test.file'); -if (file_exists('test.file')) { - echo "test.file exists (cached)\n"; -} else { - echo "test.file does not exist\n"; -} -clearstatcache(); -if (file_exists('test.file')) { - echo "test.file exists\n"; -} else { - echo "test.file does not exist\n"; -} -?> ---EXPECT-- -test.file does not exist -test.file exists -test.link does not exist -test.file is not a symlink -test.link is not a symlink -test.file exists -test.file is file -test.link is file -test.file permissions are 0666 -test.file size is 0 -test.file is writeable -test.file is readable -test.file is a regular file -test.link is not a regular file -test.link is not a directory -../file is a directory -test.file is not a directory -test.file does not exist -test.file does not exist diff --git a/ext/standard/tests/file/001.phpt b/ext/standard/tests/file/001.phpt deleted file mode 100644 index 6cefe25a7c..0000000000 --- a/ext/standard/tests/file/001.phpt +++ /dev/null @@ -1,147 +0,0 @@ ---TEST-- -File type functions ---SKIPIF-- -<?php -if (substr(PHP_OS, 0, 3) == 'WIN') { - die('skip no symlinks on Windows'); -} -?> ---POST-- ---GET-- ---FILE-- -<?php -chdir(dirname(__FILE__)); -@unlink('test.file'); -@unlink('test.link'); -if (file_exists('test.file')) { - echo "test.file exists\n"; -} else { - echo "test.file does not exist\n"; -} -fclose (fopen('test.file', 'w')); -chmod ('test.file', 0744); -if (file_exists('test.file')) { - echo "test.file exists\n"; -} else { - echo "test.file does not exist\n"; -} -sleep (2); -symlink('test.file','test.link'); -if (file_exists('test.link')) { - echo "test.link exists\n"; -} else { - echo "test.link does not exist\n"; -} -if (is_link('test.file')) { - echo "test.file is a symlink\n"; -} else { - echo "test.file is not a symlink\n"; -} -if (is_link('test.link')) { - echo "test.link is a symlink\n"; -} else { - echo "test.link is not a symlink\n"; -} -if (file_exists('test.file')) { - echo "test.file exists\n"; -} else { - echo "test.file does not exist\n"; -} -$s = stat ('test.file'); -$ls = lstat ('test.file'); -for ($i = 0; $i <= 12; $i++) { - if ($ls[$i] != $s[$i]) { - echo "test.file lstat and stat differ at element $i\n"; - } -} -$s = stat ('test.link'); -$ls = lstat ('test.link'); -for ($i = 0; $i <= 11; $i++) { - if ($ls[$i] != $s[$i]) { - if ($i != 6 && $i != 10 && $i != 11) echo "test.link lstat and stat differ at element $i\n"; - } -} -echo "test.file is " . filetype('test.file') . "\n"; -echo "test.link is " . filetype('test.link') . "\n"; -printf ("test.file permissions are 0%o\n", 0777 & fileperms('test.file')); -echo "test.file size is " . filesize('test.file') . "\n"; -if (is_writeable('test.file')) { - echo "test.file is writeable\n"; -} else { - echo "test.file is not writeable\n"; -} -if (is_readable('test.file')) { - echo "test.file is readable\n"; -} else { - echo "test.file is not readable\n"; -} -if (is_executable('test.file')) { - echo "test.file is executable\n"; -} else { - echo "test.file is not executable\n"; -} -if (is_file('test.file')) { - echo "test.file is a regular file\n"; -} else { - echo "test.file is not a regular file\n"; -} -if (is_file('test.link')) { - echo "test.link is a regular file\n"; -} else { - echo "test.link is not a regular file\n"; -} -if (is_dir('test.link')) { - echo "test.link is a directory\n"; -} else { - echo "test.link is not a directory\n"; -} -if (is_dir('../file')) { - echo "../file is a directory\n"; -} else { - echo "../file is not a directory\n"; -} -if (is_dir('test.file')) { - echo "test.file is a directory\n"; -} else { - echo "test.file is not a directory\n"; -} -unlink('test.file'); -unlink('test.link'); -if (file_exists('test.file')) { - echo "test.file exists (cached)\n"; -} else { - echo "test.file does not exist\n"; -} -clearstatcache(); -if (file_exists('test.file')) { - echo "test.file exists\n"; -} else { - echo "test.file does not exist\n"; -} -?> ---EXPECT-- -test.file does not exist -test.file exists -test.link exists -test.file is not a symlink -test.link is a symlink -test.file exists -test.link lstat and stat differ at element 1 -test.link lstat and stat differ at element 2 -test.link lstat and stat differ at element 7 -test.link lstat and stat differ at element 8 -test.link lstat and stat differ at element 9 -test.file is file -test.link is link -test.file permissions are 0744 -test.file size is 0 -test.file is writeable -test.file is readable -test.file is executable -test.file is a regular file -test.link is a regular file -test.link is not a directory -../file is a directory -test.file is not a directory -test.file does not exist -test.file does not exist diff --git a/ext/standard/tests/file/002.phpt b/ext/standard/tests/file/002.phpt deleted file mode 100644 index 4642bac366..0000000000 --- a/ext/standard/tests/file/002.phpt +++ /dev/null @@ -1,54 +0,0 @@ ---TEST-- -File/Stream functions ---POST-- ---GET-- ---FILE-- -<?php - -$data = <<<EOD -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -EOD; - -$name = tempnam("./ext/standard/tests/file/", "php"); -$fp = fopen($name, "w"); -fwrite($fp, $data); -fclose($fp); - -//readfile($name); -echo file_get_contents($name); - -unlink($name); - -?> ---EXPECT-- -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah -blah blah blah blah blah blah blah diff --git a/ext/standard/tests/file/003.phpt b/ext/standard/tests/file/003.phpt deleted file mode 100644 index 2b75bdccee..0000000000 --- a/ext/standard/tests/file/003.phpt +++ /dev/null @@ -1,43 +0,0 @@ ---TEST-- -is_*() and file_exists() return values are boolean. ---POST-- ---GET-- ---FILE-- -<?php - -$funcs = array( - 'is_writable', - 'is_readable', - 'is_executable', - 'is_file', - 'file_exists', -); - -$filename=""; - -foreach ($funcs as $test) { - $bb = $test($filename); - echo gettype($bb)."\n"; - clearstatcache(); -} - -$filename="run-tests.php"; - -foreach ($funcs as $test) { - $bb = $test($filename); - echo gettype($bb)."\n"; - clearstatcache(); -} - -?> ---EXPECT-- -boolean -boolean -boolean -boolean -boolean -boolean -boolean -boolean -boolean -boolean diff --git a/ext/standard/tests/file/004.phpt b/ext/standard/tests/file/004.phpt deleted file mode 100644 index f1fab47ac3..0000000000 --- a/ext/standard/tests/file/004.phpt +++ /dev/null @@ -1,61 +0,0 @@ ---TEST-- -file_put_contents() test ---FILE-- -<?php - chdir(dirname(__FILE__)); - for ($i = 1; $i < 6; $i++) { - @unlink("./TEST{$i}"); - } - - echo "String Test: "; - echo file_put_contents("TEST1", file_get_contents(__FILE__)) !== FALSE ? 'OK' : 'FAIL'; - echo "\n"; - - $old_int = $int = rand(); - $ret = file_put_contents("TEST2", $int); - echo "Integer Test: "; - if ($int === $old_int && $ret !== FALSE && md5($int) == md5_file("TEST2")) { - echo 'OK'; - } else { - echo 'FAIL'; - } - echo "\n"; - - $old_int = $int = time() / 1000; - $ret = file_put_contents("TEST3", $int); - echo "Float Test: "; - if ($int === $old_int && $ret !== FALSE && md5($int) == md5_file("TEST3")) { - echo 'OK'; - } else { - echo 'FAIL'; - } - echo "\n"; - - $ret = file_put_contents("TEST4", __FILE__); - echo "Bool Test: "; - if ($ret !== FALSE && md5(__FILE__) == md5_file("TEST4")) { - echo 'OK'; - } else { - echo 'FAIL'; - } - echo "\n"; - - $ret = @file_put_contents("TEST5", $_SERVER); - echo "Array Test: "; - if ($ret !== FALSE && @md5(implode('', $_SERVER)) == md5_file("TEST5")) { - echo 'OK'; - } else { - echo 'FAIL'; - } - echo "\n"; - - for ($i = 1; $i < 6; $i++) { - @unlink("./TEST{$i}"); - } -?> ---EXPECT-- -String Test: OK -Integer Test: OK -Float Test: OK -Bool Test: OK -Array Test: OK diff --git a/ext/standard/tests/file/bug12556.phpt b/ext/standard/tests/file/bug12556.phpt deleted file mode 100644 index 55a06a5d2a..0000000000 --- a/ext/standard/tests/file/bug12556.phpt +++ /dev/null @@ -1,50 +0,0 @@ ---TEST-- -Bug #12556 (fgetcsv() ignores lengths when quotes not closed) ---POST-- ---GET-- ---FILE-- -<?php -$fp = fopen(dirname(__FILE__)."/test.csv", "r"); -while($line = fgetcsv($fp, 24)) { - $line = str_replace("\x0d\x0a", "\x0a", $line); - var_dump($line); -} -fclose($fp); -?> ---EXPECT-- -array(4) { - [0]=> - string(1) "6" - [1]=> - string(1) "7" - [2]=> - string(1) "8" - [3]=> - string(5) "line1" -} -array(4) { - [0]=> - string(1) "1" - [1]=> - string(1) "2" - [2]=> - string(1) "3" - [3]=> - string(186) "line2 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -" -} diff --git a/ext/standard/tests/file/bug20424.phpt b/ext/standard/tests/file/bug20424.phpt deleted file mode 100644 index 078d554087..0000000000 --- a/ext/standard/tests/file/bug20424.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Bug #20424 (stream_get_meta_data crashes on a normal file stream) ---POST-- ---GET-- ---FILE-- -<?php -$f = fopen(dirname(__FILE__) . "/../../../../run-tests.php", "r"); -$dummy = var_export(stream_get_meta_data($f), TRUE); -echo "I'm alive!\n"; -?> ---EXPECT-- -I'm alive! diff --git a/ext/standard/tests/file/bug22382.phpt b/ext/standard/tests/file/bug22382.phpt deleted file mode 100644 index 31c806022b..0000000000 --- a/ext/standard/tests/file/bug22382.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Bug #22382 (fgetcsv() does not handle escaped quotes correctly) ---POST-- ---GET-- ---FILE-- -<?php -$fp = fopen(dirname(__FILE__)."/test2.csv", "r"); -while(($line = fgetcsv($fp, 1024))) { - var_dump($line); -} -fclose($fp); -?> ---EXPECT-- -array(6) { - [0]=> - string(3) "One" - [1]=> - string(7) "\"Two\"" - [2]=> - string(7) "Three\"" - [3]=> - string(4) "Four" - [4]=> - string(2) "\\" - [5]=> - string(28) "\\\\\\\\\\\\\\\\\\\\\\\"\\\\" -} diff --git a/ext/standard/tests/file/bug22414.phpt b/ext/standard/tests/file/bug22414.phpt deleted file mode 100644 index f4f097d66d..0000000000 --- a/ext/standard/tests/file/bug22414.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Bug #22414 (passthru() does not read data correctly) ---INI-- -safe_mode= -output_handler= ---FILE-- -<?php - - $php = getenv('TEST_PHP_EXECUTABLE'); - $tmpfile = tempnam('/tmp', 'phpt'); - - /* Regular Data Test */ - passthru($php . ' -n -r " echo \"HELLO\"; "'); - - echo "\n"; - - /* Binary Data Test */ - @unlink($pwd . '/passthru_test'); - - $cmd = $php . ' -n -r \"readfile(@getenv(\'TEST_PHP_EXECUTABLE\')); \"'; - $cmd = $php . ' -n -r \' passthru("'.$cmd.'"); \' > '.$tmpfile ; - exec($cmd); - - if (md5_file($php) == md5_file($tmpfile)) { - echo "Works\n"; - } else { - echo "Does not work\n"; - } - - @unlink($tmpfile); -?> ---EXPECT-- -HELLO -Works diff --git a/ext/standard/tests/file/bug24313.phpt b/ext/standard/tests/file/bug24313.phpt deleted file mode 100644 index dcea58ffef..0000000000 --- a/ext/standard/tests/file/bug24313.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -Bug #24313 (file_exists() warning on non-existant files when is open_basedir enabled) ---INI-- -open_basedir=/tmp ---FILE-- -<?php - var_dump(file_exists("./foobar")); -?> ---EXPECT-- -bool(false) diff --git a/ext/standard/tests/file/bug24482.phpt b/ext/standard/tests/file/bug24482.phpt deleted file mode 100644 index 4bf12e8f66..0000000000 --- a/ext/standard/tests/file/bug24482.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Bug #24482 (GLOB_ONLYDIR not working) ---SKIPIF-- -<?php -if (!function_exists("glob")) { - die('skip glob() not available'); -} -?> ---FILE-- -<?php -$globdirs = glob("*", GLOB_ONLYDIR); - -$dirs = array(); -$dh = opendir("."); -while (is_string($file = readdir($dh))) { - if ($file{0} === ".") continue; - if (!is_dir($file)) continue; - $dirs[] = $file; -} -closedir($dh); - -if (count($dirs) != count($globdirs)) { - echo "Directory count mismatch\n"; - - echo "glob found:\n"; - sort($globdirs); - var_dump($globdirs); - - echo "opendir/readdir/isdir found:\n"; - sort($dirs); - var_dump($dirs); -} else { - echo "OK\n"; -} -?> ---EXPECT-- -OK diff --git a/ext/standard/tests/file/bug26003.phpt b/ext/standard/tests/file/bug26003.phpt Binary files differdeleted file mode 100644 index 7d08374693..0000000000 --- a/ext/standard/tests/file/bug26003.phpt +++ /dev/null diff --git a/ext/standard/tests/file/bug26615.phpt b/ext/standard/tests/file/bug26615.phpt deleted file mode 100644 index 36f7b0feac..0000000000 --- a/ext/standard/tests/file/bug26615.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -Bug #26615 (exec crash on long input lines) ---POST-- ---GET-- ---FILE-- -<?php -$out = array(); -$status = -1; -exec($_ENV['TEST_PHP_EXECUTABLE'].' -r \'for($i=1;$i<=5000;$i++) print "$i\n";\' | tr \'\n\' \' \'', $out, $status); -print_r($out); -?> ---EXPECT-- -Array -( - [0] => 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 -) diff --git a/ext/standard/tests/file/bug26938.phpt b/ext/standard/tests/file/bug26938.phpt deleted file mode 100644 index 8e059ee840..0000000000 --- a/ext/standard/tests/file/bug26938.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Bug #26938 (exec does not read consecutive long lines correctly) ---FILE-- -<?php -$out = array(); -$status = -1; -$php = getenv('TEST_PHP_EXECUTABLE'); -exec($php . ' -r \'' - . '$lengths = array(10,20000,10000,5,10000,3);' - . 'foreach($lengths as $length) {' - . ' for($i=0;$i<$length;$i++) print chr(65+$i % 27);' - . ' print "\n";' - . '}\'', $out, $status); -for ($i=0;$i<6;$i++) - print "md5(line $i)= " . md5($out[$i]) . " (length " . -strlen($out[$i]) . ")\n"; -?> ---EXPECT-- -md5(line 0)= e86410fa2d6e2634fd8ac5f4b3afe7f3 (length 10) -md5(line 1)= e84debf3a1d132871d7fe45c1c04c566 (length 20000) -md5(line 2)= c33b4d2f86908eea5d75ee5a61fd81f4 (length 10000) -md5(line 3)= 2ecdde3959051d913f61b14579ea136d (length 5) -md5(line 4)= c33b4d2f86908eea5d75ee5a61fd81f4 (length 10000) -md5(line 5)= 902fbdd2b1df0c4f70b4a5d23525e932 (length 3) diff --git a/ext/standard/tests/file/fgetcsv.phpt b/ext/standard/tests/file/fgetcsv.phpt deleted file mode 100644 index 868212c033..0000000000 --- a/ext/standard/tests/file/fgetcsv.phpt +++ /dev/null @@ -1,158 +0,0 @@ ---TEST-- -various fgetcsv() functionality tests ---FILE-- -<?php - $list = array( - 'aaa,bbb', - 'aaa,"bbb"', - '"aaa","bbb"', - 'aaa,bbb', - '"aaa",bbb', - '"aaa", "bbb"', - ',', - 'aaa,', - ',"aaa"', - '"",""', - '"\\"","aaa"', - '"""""",', - '""""",aaa', - '"\\""",aaa', - 'aaa,"\\"bbb,ccc', - 'aaa,bbb ', - 'aaa,"bbb "', - 'aaa"aaa","bbb"bbb', - 'aaa"aaa""",bbb', - 'aaa"\\"a","bbb"' - ); - - $file = dirname(__FILE__) . 'fgetcsv.csv'; - @unlink($file); - foreach ($list as $v) { - $fp = fopen($file, "w"); - fwrite($fp, $v . "\n"); - fclose($fp); - - var_dump(fgetcsv(fopen($file, "r"), 1024)); - } - @unlink($file); -?> ---EXPECT-- -array(2) { - [0]=> - string(3) "aaa" - [1]=> - string(3) "bbb" -} -array(2) { - [0]=> - string(3) "aaa" - [1]=> - string(3) "bbb" -} -array(2) { - [0]=> - string(3) "aaa" - [1]=> - string(3) "bbb" -} -array(2) { - [0]=> - string(3) "aaa" - [1]=> - string(3) "bbb" -} -array(2) { - [0]=> - string(3) "aaa" - [1]=> - string(3) "bbb" -} -array(2) { - [0]=> - string(3) "aaa" - [1]=> - string(3) "bbb" -} -array(2) { - [0]=> - string(0) "" - [1]=> - string(0) "" -} -array(2) { - [0]=> - string(3) "aaa" - [1]=> - string(0) "" -} -array(2) { - [0]=> - string(0) "" - [1]=> - string(3) "aaa" -} -array(2) { - [0]=> - string(0) "" - [1]=> - string(0) "" -} -array(2) { - [0]=> - string(2) "\"" - [1]=> - string(3) "aaa" -} -array(2) { - [0]=> - string(2) """" - [1]=> - string(0) "" -} -array(1) { - [0]=> - string(7) """,aaa -" -} -array(1) { - [0]=> - string(8) "\"",aaa -" -} -array(2) { - [0]=> - string(3) "aaa" - [1]=> - string(10) "\"bbb,ccc -" -} -array(2) { - [0]=> - string(3) "aaa" - [1]=> - string(6) "bbb " -} -array(2) { - [0]=> - string(3) "aaa" - [1]=> - string(6) "bbb " -} -array(2) { - [0]=> - string(8) "aaa"aaa"" - [1]=> - string(6) "bbbbbb" -} -array(2) { - [0]=> - string(10) "aaa"aaa"""" - [1]=> - string(3) "bbb" -} -array(2) { - [0]=> - string(8) "aaa"\"a"" - [1]=> - string(3) "bbb" -} diff --git a/ext/standard/tests/file/fopencookie.phpt b/ext/standard/tests/file/fopencookie.phpt deleted file mode 100644 index 1b2cfb17b8..0000000000 --- a/ext/standard/tests/file/fopencookie.phpt +++ /dev/null @@ -1,86 +0,0 @@ ---TEST-- -fopencookie detected and working (or cast mechanism works) ---FILE-- -<?php -# vim600:syn=php: - -/* This test verifies that the casting mechanism is working correctly. - * On systems with fopencookie, a FILE* is created around the user - * stream and that is passed back to the ZE to include. - * On systems without fopencookie, the stream is fed into a temporary - * file, and that temporary file is passed back to the ZE. - * The important thing here is really fopencookie; the glibc people - * changed the binary interface, so if haven't detected it correctly, - * you can expect this test to segfault. - * - * FIXME: the test really needs something to fseek(3) on the FILE* - * used internally for this test to be really effective. - */ - -class userstream { - public $position = 0; - public $data = "If you can read this, it worked"; - - function stream_open($path, $mode, $options, &$opened_path) - { - return true; - } - - function stream_read($count) - { - $ret = substr($this->data, $this->position, $count); - $this->position += strlen($ret); - return $ret; - } - - function stream_tell() - { - return $this->position; - } - - function stream_eof() - { - return $this->position >= strlen($this->data); - } - - function stream_seek($offset, $whence) - { - switch($whence) { - case SEEK_SET: - if ($offset < strlen($this->data) && $offset >= 0) { - $this->position = $offset; - return true; - } else { - return false; - } - break; - case SEEK_CUR: - if ($offset >= 0) { - $this->position += $offset; - return true; - } else { - return false; - } - break; - case SEEK_END: - if (strlen($this->data) + $offset >= 0) { - $this->position = strlen($this->data) + $offset; - return true; - } else { - return false; - } - break; - default: - return false; - } - } - -} - -stream_wrapper_register("cookietest", "userstream"); - -include("cookietest://foo"); - -?> ---EXPECT-- -If you can read this, it worked diff --git a/ext/standard/tests/file/proc_open01.phpt b/ext/standard/tests/file/proc_open01.phpt deleted file mode 100644 index 39fc4e4cf6..0000000000 --- a/ext/standard/tests/file/proc_open01.phpt +++ /dev/null @@ -1,67 +0,0 @@ ---TEST-- -proc_open() regression test 1 (proc_open() leak) ---FILE-- -<?php -$pipes = array(1, 2, 3); -$orig_pipes = $pipes; -$php = getenv('TEST_PHP_EXECUTABLE'); -if ($php === false) { - die("no php executable defined"); -} -$proc = proc_open( - $php, - array(0 => array('pipe', 'r'), 1 => array('pipe', 'w')), - $pipes -); -if ($proc === false) { - print "something went wrong.\n"; -} -var_dump($pipes); -stream_set_blocking($pipes[1], FALSE); -$test_string = "yay!\n"; -fwrite($pipes[0], $test_string); -fflush($pipes[0]); -fclose($pipes[0]); -$cnt = ''; -$n=0; -for ($left = strlen($test_string); $left > 0;) { - if (++$n >1000) { - print "terminated after 1000 iterations\n"; - break; - } - $read_fds = array($pipes[1]); - $retval = stream_select($read_fds, $write_fds = NULL, $exp_fds = NULL, 1); - if ($retval === false) { - print "select() failed\n"; - break; - } - if ($retval === 0) { - print "timed out\n"; - break; - } - $buf = fread($pipes[1], 1024); - $cnt .= $buf; - $left -= strlen($buf); -} -var_dump($cnt); -fclose($pipes[1]); -proc_close($proc); -var_dump($orig_pipes); -?> ---EXPECTF-- -array(2) { - [0]=> - resource(%d) of type (stream) - [1]=> - resource(%d) of type (stream) -} -string(5) "yay! -" -array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) -} diff --git a/ext/standard/tests/file/test.csv b/ext/standard/tests/file/test.csv deleted file mode 100644 index d99984c2ab..0000000000 --- a/ext/standard/tests/file/test.csv +++ /dev/null @@ -1,17 +0,0 @@ -6,7,8,line1 -1,2,3,"line2 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 -2,4,5,line3 diff --git a/ext/standard/tests/file/test2.csv b/ext/standard/tests/file/test2.csv deleted file mode 100644 index d816464170..0000000000 --- a/ext/standard/tests/file/test2.csv +++ /dev/null @@ -1 +0,0 @@ -"One","\"Two\"","Three\"","Four","\\","\\\\\\\\\\\\\\\\\\\\\\\"\\\\" diff --git a/ext/standard/tests/file/test3.csv b/ext/standard/tests/file/test3.csv Binary files differdeleted file mode 100644 index 63f09033df..0000000000 --- a/ext/standard/tests/file/test3.csv +++ /dev/null diff --git a/ext/standard/tests/file/userfilters.phpt b/ext/standard/tests/file/userfilters.phpt deleted file mode 100644 index dfa8376fff..0000000000 --- a/ext/standard/tests/file/userfilters.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -stream userfilter test ---FILE-- -<?php -# vim600:syn=php: -class testfilter extends php_user_filter { - function filter($in, $out, &$consumed, $closing) { - while ($bucket = stream_bucket_make_writeable($in)) { - $bucket->data = strtoupper($bucket->data); - $consumed += strlen($bucket->data); - stream_bucket_append($out, $bucket); - } - return PSFS_PASS_ON; - } - - function oncreate() { - echo "params: {$this->params}\n"; - } -} - -stream_filter_register('testfilter','testfilter'); - -$text = "Hello There!"; - -$fp = tmpfile(); -fwrite($fp, $text); - -rewind($fp); -stream_filter_append($fp, 'testfilter', STREAM_FILTER_READ, 'testuserfilter'); - -var_dump(fgets($fp)); -fclose($fp); - -?> ---EXPECT-- -params: testuserfilter -string(12) "HELLO THERE!" diff --git a/ext/standard/tests/file/userstreams.phpt b/ext/standard/tests/file/userstreams.phpt deleted file mode 100644 index 124825f24e..0000000000 --- a/ext/standard/tests/file/userstreams.phpt +++ /dev/null @@ -1,325 +0,0 @@ ---TEST-- -User-space streams ---FILE-- -<?php -# vim600:syn=php: - -/* This is a fairly aggressive test that looks at - * user streams and also gives the seek/gets/buffer - * layer of streams a thorough testing */ - -$lyrics = <<<EOD -...and the road becomes my bride -I have stripped of all but pride -so in her I do confide -and she keeps me satisfied -gives me all I need -...and with dust in throat I crave -to the game you stay a slave -rover wanderer -nomad vagabond -call me what you will - But Ill take my time anywhere - Free to speak my mind anywhere - and Ill redefine anywhere - Anywhere I roam - Where I lay my head is home -...and the earth becomes my throne -I adapt to the unknown -under wandering stars Ive grown -by myself but not alone -I ask no one -...and my ties are severed clean -the less I have the more I gain -off the beaten path I reign -rover wanderer -nomad vagabond -call me what you will - But Ill take my time anywhere - Free to speak my mind anywhere - and Ill never mind anywhere - Anywhere I roam - Where I lay my head is home - But Ill take my time anywhere - Free to speak my mind anywhere - and Ill take my find anywhere - Anywhere I roam - Where I lay my head is home - carved upon my stone - my body lie but still I roam - Wherever I may roam. - -Wherever I May Roam - -EOD; - -/* repeat the data a few times so that it grows larger than - * the default cache chunk size and that we have something - * to seek around... */ -$DATA = ""; -for ($i = 0; $i < 30; $i++) { - if ($i % 2 == 0) - $DATA .= str_rot13($lyrics); - else - $DATA .= $lyrics; -} - -/* store the data in a regular file so that we can compare - * the results */ -$tf = tmpfile(); -fwrite($tf, $DATA); -$n = ftell($tf); -rewind($tf) or die("failed to rewind tmp file!"); -if (ftell($tf) != 0) - die("tmpfile is not at start!"); -$DATALEN = strlen($DATA); -if ($n != $DATALEN) - die("tmpfile stored $n bytes; should be $DATALEN!"); - -class uselessstream -{ -} - -class mystream -{ - public $path; - public $mode; - public $options; - - public $position; - public $varname; - - function stream_open($path, $mode, $options, &$opened_path) - { - $this->path = $path; - $this->mode = $mode; - $this->options = $options; - - $split = parse_url($path); - $this->varname = $split["host"]; - - if (strchr($mode, 'a')) - $this->position = strlen($GLOBALS[$this->varname]); - else - $this->position = 0; - - return true; - } - - function stream_read($count) - { - $ret = substr($GLOBALS[$this->varname], $this->position, $count); - $this->position += strlen($ret); - return $ret; - } - - function stream_tell() - { - return $this->position; - } - - function stream_eof() - { - return $this->position >= strlen($GLOBALS[$this->varname]); - } - - function stream_seek($offset, $whence) - { - switch($whence) { - case SEEK_SET: - if ($offset < strlen($GLOBALS[$this->varname]) && $offset >= 0) { - $this->position = $offset; - return true; - } else { - return false; - } - break; - case SEEK_CUR: - if ($offset >= 0) { - $this->position += $offset; - return true; - } else { - return false; - } - break; - case SEEK_END: - if (strlen($GLOBALS[$this->varname]) + $offset >= 0) { - $this->position = strlen($GLOBALS[$this->varname]) + $offset; - return true; - } else { - return false; - } - break; - default: - return false; - } - } - -} - -if (@stream_wrapper_register("bogus", "class_not_exist")) { - die("Registered a non-existant class!!!???"); -} -echo "Not Registered\n"; - -if (!stream_wrapper_register("test", "mystream")) { - die("test wrapper registration failed"); -} -echo "Registered\n"; - -if (!stream_wrapper_register("bogon", "uselessstream")) { - die("bogon wrapper registration failed"); -} -echo "Registered\n"; - -$b = @fopen("bogon://url", "rb"); -if (is_resource($b)) { - die("Opened a bogon??"); -} - -$fp = fopen("test://DATA", "rb"); -if (!$fp || !is_resource($fp)) { - die("Failed to open resource"); -} - -/* some default seeks that will cause buffer/cache misses */ -$seeks = array( - array(SEEK_SET, 0, 0), - array(SEEK_CUR, 8450, 8450), - array(SEEK_CUR, -7904, 546), - array(SEEK_CUR, 12456, 13002), - - /* end up at BOF so that randomly generated seek offsets - * below will know where they are supposed to be */ - array(SEEK_SET, 0, 0) -); - -$whence_map = array( - SEEK_CUR, - SEEK_SET, - SEEK_END -); -$whence_names = array( - SEEK_CUR => "SEEK_CUR", - SEEK_SET => "SEEK_SET", - SEEK_END => "SEEK_END" - ); - -/* generate some random seek offsets */ -$position = 0; -for ($i = 0; $i < 256; $i++) { - $whence = $whence_map[array_rand($whence_map, 1)]; - switch($whence) { - case SEEK_SET: - $offset = rand(0, $DATALEN); - $position = $offset; - break; - case SEEK_END: - $offset = -rand(0, $DATALEN); - $position = $DATALEN + $offset; - break; - case SEEK_CUR: - $offset = rand(0, $DATALEN); - $offset -= $position; - $position += $offset; - break; - } - - $seeks[] = array($whence, $offset, $position); -} - -/* we compare the results of fgets using differing line lengths to - * test the fgets layer also */ -$line_lengths = array(1024, 256, 64, 16); -$fail_count = 0; - -ob_start(); -foreach($line_lengths as $line_length) { - /* now compare the real stream with the user stream */ - $j = 0; - rewind($tf); - rewind($fp); - foreach($seeks as $seekdata) { - list($whence, $offset, $position) = $seekdata; - - $rpb = ftell($tf); - $rr = (int)fseek($tf, $offset, $whence); - $rpa = ftell($tf); - $rline = fgets($tf, $line_length); - (int)fseek($tf, - strlen($rline), SEEK_CUR); - - $upb = ftell($fp); - $ur = (int)fseek($fp, $offset, $whence); - $upa = ftell($fp); - $uline = fgets($fp, $line_length); - (int)fseek($fp, - strlen($uline), SEEK_CUR); - - printf("\n--[%d] whence=%s offset=%d line_length=%d position_should_be=%d --\n", - $j, $whence_names[$whence], $offset, $line_length, $position); - printf("REAL: pos=(%d,%d,%d) ret=%d line[%d]=`%s'\n", $rpb, $rpa, ftell($tf), $rr, strlen($rline), $rline); - printf("USER: pos=(%d,%d,%d) ret=%d line[%d]=`%s'\n", $upb, $upa, ftell($fp), $ur, strlen($uline), $uline); - - if ($rr != $ur || $rline != $uline || $rpa != $position || $upa != $position) { - $fail_count++; - echo "###################################### FAIL!\n"; - $dat = stream_get_meta_data($fp); - var_dump($dat); - break; - } - - $j++; - } - if ($fail_count) - break; -} - -if ($fail_count == 0) { - ob_end_clean(); - echo "SEEK: OK\n"; -} else { - echo "SEEK: FAIL\n"; - ob_end_flush(); -} - -$fail_count = 0; - -fseek($fp, $DATALEN / 2, SEEK_SET); -fseek($tf, $DATALEN / 2, SEEK_SET); - -if (ftell($fp) != ftell($tf)) { - echo "SEEK: positions do not match!\n"; -} - -$n = 0; -while(!feof($fp)) { - $uline = fgets($fp, 1024); - $rline = fgets($tf, 1024); - - if ($uline != $rline) { - echo "FGETS: FAIL\niter=$n user=$uline [pos=" . ftell($fp) . "]\nreal=$rline [pos=" . ftell($tf) . "]\n"; - $fail_count++; - break; - } -} - -if ($fail_count == 0) { - echo "FGETS: OK\n"; -} - -/* One final test to see if the position is respected when opened for append */ -$fp = fopen("test://lyrics", "a+"); -rewind($fp); -var_dump(ftell($fp)); -$data = fgets($fp); -fclose($fp); -echo $data . "\n"; - -?> ---EXPECT-- -Not Registered -Registered -Registered -SEEK: OK -FGETS: OK -int(0) -...and the road becomes my bride diff --git a/ext/standard/tests/file/userwrapper.phpt b/ext/standard/tests/file/userwrapper.phpt deleted file mode 100644 index 717e73c708..0000000000 --- a/ext/standard/tests/file/userwrapper.phpt +++ /dev/null @@ -1,83 +0,0 @@ ---TEST-- -Userstream unlink, rename, mkdir, rmdir, and url_stat. ---FILE-- -<?php # vim:ft=php: -class test { - function unlink($file) { - print "Unlinking file: $file\n"; - } - - function rename($from, $to) { - print "Renaming $from to $to\n"; - } - - function mkdir($directory, $mode, $options) { - printf("Making directory: %s as %o%s\n", $directory, $mode, $options & STREAM_MKDIR_RECURSIVE ? " recursively" : ""); - } - - function rmdir($directory, $options) { - print "Removing directory: $directory\n"; - } - - function url_stat($path, $options) { - /* By printing out a notice that we are actively stating the file - then subsequently performing multiple stat operations on it - we effectively test the stat cache mechanism */ - print "Stating file: $path\n"; - return array('dev'=>1, 'ino'=>2, 'mode'=>0644, 'nlink'=>3, - 'uid'=>100, 'gid'=>1000, 'rdev'=>-1, 'size'=>31337, - 'atime'=>1234567890, 'mtime'=>1231231231, 'ctime'=>1234564564, - 'blksize'=>-1, 'blocks'=>-1); - } -} - -stream_wrapper_register('test', 'test'); - -unlink('test://example.com/path/to/file'); -rename('test://example.com/path/to/from', 'test://example.com/path/to/to'); -/* We *want* this to fail and thus not output the watch statement */ -@rename('test://example.com/path/to/from', 'http://example.com/path/to/to'); -mkdir('test://example.com/path/to/directory', 0755); -rmdir('test://example.com/path/to/directory'); -print_r(stat('test://example.com/path/to/file')); -echo "Filesize = " . filesize('test://example.com/path/to/file') . "\n"; -echo "filemtime = " . filemtime('test://example.com/path/to/file') . "\n"; -?> ---EXPECT-- -Unlinking file: test://example.com/path/to/file -Renaming test://example.com/path/to/from to test://example.com/path/to/to -Making directory: test://example.com/path/to/directory as 755 -Removing directory: test://example.com/path/to/directory -Stating file: test://example.com/path/to/file -Array -( - [0] => 1 - [1] => 2 - [2] => 420 - [3] => 3 - [4] => 100 - [5] => 1000 - [6] => -1 - [7] => 31337 - [8] => 1234567890 - [9] => 1231231231 - [10] => 1234564564 - [11] => -1 - [12] => -1 - [dev] => 1 - [ino] => 2 - [mode] => 420 - [nlink] => 3 - [uid] => 100 - [gid] => 1000 - [rdev] => -1 - [size] => 31337 - [atime] => 1234567890 - [mtime] => 1231231231 - [ctime] => 1234564564 - [blksize] => -1 - [blocks] => -1 -) -Filesize = 31337 -filemtime = 1231231231 - diff --git a/ext/standard/tests/filters/basic.phpt b/ext/standard/tests/filters/basic.phpt deleted file mode 100644 index 702c1ddadd..0000000000 --- a/ext/standard/tests/filters/basic.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -basic stream filter tests ---FILE-- -<?php -# vim600:syn=php: - -$text = "Hello There!"; -$filters = array("string.rot13", "string.toupper", "string.tolower"); - -function filter_test($names) -{ - $fp = tmpfile(); - fwrite($fp, $GLOBALS["text"]); - rewind($fp); - foreach ($names as $name) { - echo "filter: $name\n"; - var_dump(stream_filter_prepend($fp, $name)); - } - var_dump(fgets($fp)); - fclose($fp); -} - -foreach ($filters as $filter) { - filter_test(array($filter)); -} - -filter_test(array($filters[0], $filters[1])); - -?> ---EXPECT-- -filter: string.rot13 -bool(true) -string(12) "Uryyb Gurer!" -filter: string.toupper -bool(true) -string(12) "HELLO THERE!" -filter: string.tolower -bool(true) -string(12) "hello there!" -filter: string.rot13 -bool(true) -filter: string.toupper -bool(true) -string(12) "URYYB GURER!" diff --git a/ext/standard/tests/filters/bug22538.phpt b/ext/standard/tests/filters/bug22538.phpt deleted file mode 100644 index c01978730b..0000000000 --- a/ext/standard/tests/filters/bug22538.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Bug #22538 (filtered stream doesn't update file pointer) ---FILE-- -<?php -function my_stream_copy_to_stream($fin, $fout) { - while (!feof($fin)) { - fwrite($fout, fread($fin, 4096)); - } -} - -$size = 65536; - -do { - $path1 = sprintf("%s/%s%da", dirname(__FILE__), uniqid(), time()); - $path2 = sprintf("%s/%s%db", dirname(__FILE__), uniqid(), time()); -} while ($path1 == $path2); - -$fp = fopen($path1, "w"); -$str = "abcdefghijklmnopqrstuvwxyz\n"; -$str_len = strlen($str); -$cnt = $size; -while (($cnt -= $str_len) > 0) { - fwrite($fp, $str); -} -$cnt = $size - ($str_len + $cnt); -fclose($fp); -$fin = fopen($path1, "r"); -$fout = fopen($path2, "w"); -stream_filter_append($fout, "string.rot13"); -my_stream_copy_to_stream($fin, $fout); -fclose($fout); -fclose($fin); -var_dump($cnt); -var_dump(filesize($path2)); -var_dump(md5_file($path1)); -var_dump(md5_file($path2)); -unlink($path1); -unlink($path2); -?> ---EXPECT-- -int(65529) -int(65529) -string(32) "e10e3d1ae81b084b822e8592d019b57a" -string(32) "931f0fbf8a72312e3bab9965b1d1081c" diff --git a/ext/standard/tests/general_functions/001.phpt b/ext/standard/tests/general_functions/001.phpt deleted file mode 100644 index e84622902c..0000000000 --- a/ext/standard/tests/general_functions/001.phpt +++ /dev/null @@ -1,69 +0,0 @@ ---TEST-- -sprintf() function ---POST-- ---GET-- ---FILE-- -<?php - -$agent = sprintf("%.5s", "James Bond, 007"); - -echo("sprintf string truncate test: "); -if ($agent == "James") { - echo("passed\n"); -} else { - echo("failed!\n"); -} - -echo("sprintf padding and align test: "); -$test = sprintf("abc%04d %-20s%c", 20, "fisketur", 33); -if ($test == "abc0020 fisketur !") { - echo("passed\n"); -} else { - echo("failed!\n"); -} - -echo("sprintf octal and hex test: "); -$test = sprintf("%4o %4x %4X %0"."8x", 128, 1024, 49151, 3457925); -if ($test == " 200 400 BFFF 0034c385") { - echo("passed\n"); -} else { - echo("failed!\n"); -} - -echo("sprintf octal binary test: "); -$test = sprintf("%b", 3457925); -if ($test == "1101001100001110000101") { - echo("passed\n"); -} else { - echo("failed!\n"); -} - -echo("sprintf float test: "); -$test = sprintf("%0"."06.2f", 10000/3.0); -if ($test == "003333.33") { - echo("passed\n"); -} else { - echo("failed!\n"); -} - -echo sprintf("%.2f\n", "99.00"); -echo sprintf("%.2f\n", 99.00); - -echo sprintf("%e\n", 1.234E-18); -echo sprintf("%e\n", 1.234E+18); -echo sprintf("%e\n", 9843243.12); -echo sprintf("%e\n", -9843243.12); - -?> ---EXPECT-- -sprintf string truncate test: passed -sprintf padding and align test: passed -sprintf octal and hex test: passed -sprintf octal binary test: passed -sprintf float test: passed -99.00 -99.00 -1.23400e-18 -1.23400e+18 -9.84324e+6 --9.84324e+6 diff --git a/ext/standard/tests/general_functions/002.phpt b/ext/standard/tests/general_functions/002.phpt deleted file mode 100644 index 8ab1a72f07..0000000000 --- a/ext/standard/tests/general_functions/002.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -quoted_printable_decode() function test ---POST-- ---GET-- ---FILE-- -<?php echo quoted_printable_decode("=FAwow-factor=C1=d0=D5=DD=C5=CE=CE=D9=C5=0A= -=20=D4=cf=D2=C7=CF=D7=D9=C5= -=20= -=D0= -=D2=CF=C5=CB=D4=D9"); ?> ---EXPECT-- -úwow-factorÁÐÕÝÅÎÎÙÅ - ÔÏÒÇÏ×ÙÅ ÐÒÏÅËÔÙ diff --git a/ext/standard/tests/general_functions/003.phpt b/ext/standard/tests/general_functions/003.phpt deleted file mode 100644 index 141b4d7052..0000000000 --- a/ext/standard/tests/general_functions/003.phpt +++ /dev/null @@ -1,60 +0,0 @@ ---TEST-- -levenshtein() function test ---POST-- ---GET-- ---FILE-- -<?php - -function test_me($title,$expect,$text1,$text2,$cost1=0,$cost2=0,$cost3=0) { - - if($cost1==0) - $result=levenshtein($text1,$text2); - else - $result=levenshtein($text1,$text2,$cost1,$cost2,$cost3); - - if($result==$expect) return 0; - - echo "$title: result is $result instead of $expect "; - echo "for '$text1'/'$text2' "; - if($cost1) echo "($cost1:$cost2:$cost3)"; - echo "\n"; - - return 1; -} - -$n=0; - -$n += test_me("equal" , 0, "12345", "12345"); -$n += test_me("1st empty" , 3, "", "xzy"); -$n += test_me("2nd empty" , 3, "xzy", ""); -$n += test_me("both empty" , 0, "", ""); -$n += test_me("1 char" , 1, "1", "2"); -$n += test_me("2 char swap", 2, "12", "21"); - -$n += test_me("inexpensive delete", 2, "2121", "11", 2, 1, 1); -$n += test_me("expensive delete" , 10, "2121", "11", 2, 1, 5); -$n += test_me("inexpensive insert", 2, "11", "2121", 1, 1, 1); -$n += test_me("expensive insert" , 10, "11", "2121", 5, 1, 1); - -$n += test_me("expensive replace" , 3, "111", "121", 2, 3, 2); -$n += test_me("very expensive replace", 4, "111", "121", 2, 9, 2); - -$n += test_me("bug #7368", 2, "13458", "12345"); -$n += test_me("bug #7368", 2, "1345", "1234"); - -$n += test_me("bug #6562", 1, "debugg", "debug"); -$n += test_me("bug #6562", 1, "ddebug", "debug"); -$n += test_me("bug #6562", 2, "debbbug", "debug"); -$n += test_me("bug #6562", 1, "debugging", "debuging"); - -$n += test_me("bug #16473", 2, "a", "bc"); -$n += test_me("bug #16473", 2, "xa", "xbc"); -$n += test_me("bug #16473", 2, "xax", "xbcx"); -$n += test_me("bug #16473", 2, "ax", "bcx"); - - -echo ($n==0)?"all passed\n":"$n failed\n"; - -?> ---EXPECT-- -all passed diff --git a/ext/standard/tests/general_functions/004.data b/ext/standard/tests/general_functions/004.data deleted file mode 100644 index 5dd0832842..0000000000 --- a/ext/standard/tests/general_functions/004.data +++ /dev/null @@ -1,4 +0,0 @@ -name value comment -true 1 boolean true -false 0 boolean false -empty nothing diff --git a/ext/standard/tests/general_functions/004.phpt b/ext/standard/tests/general_functions/004.phpt deleted file mode 100644 index 3bd1fb1eac..0000000000 --- a/ext/standard/tests/general_functions/004.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -fgetcsv() with tab delimited fields (BUG #8258) ---POST-- ---GET-- ---FILE-- -<?php -chdir(dirname(__FILE__)); -$fp=fopen("004.data","r"); -while($a=fgetcsv($fp,100,"\t")) { - echo join(",",$a)."\n"; -} -fclose($fp); -?> ---EXPECT-- -name,value,comment -true,1,boolean true -false,0,boolean false -empty,,nothing diff --git a/ext/standard/tests/general_functions/005.phpt b/ext/standard/tests/general_functions/005.phpt deleted file mode 100644 index 329d46e764..0000000000 --- a/ext/standard/tests/general_functions/005.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -is_scalar() function test ---POST-- ---GET-- ---FILE-- -<?php -class foo {} -var_dump (is_scalar (TRUE)); -var_dump (is_scalar (1)); -var_dump (is_scalar (1.0)); -var_dump (is_scalar ("Hi!")); -var_dump (is_scalar (NULL)); -var_dump (is_scalar (array ())); -var_dump (is_scalar (new foo())); -var_dump (is_scalar (opendir('.'))); -?> ---EXPECT-- -bool(true) -bool(true) -bool(true) -bool(true) -bool(false) -bool(false) -bool(false) -bool(false) - diff --git a/ext/standard/tests/general_functions/006.phpt b/ext/standard/tests/general_functions/006.phpt deleted file mode 100644 index 9db1ca3280..0000000000 --- a/ext/standard/tests/general_functions/006.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -quoted_printable_decode() function test with CR/LF ---POST-- ---GET-- ---FILE-- -<?php echo quoted_printable_decode("=FAwow-factor=C1=D0=D5=DD=C5=CE=CE=D9=C5=0A= -=20=D4=CF=D2=C7=CF=D7=D9=C5= -=20= -=D0= -=D2=CF=C5=CB=D4=D9"); ?> ---EXPECT-- -úwow-factorÁÐÕÝÅÎÎÙÅ - ÔÏÒÇÏ×ÙÅ ÐÒÏÅËÔÙ diff --git a/ext/standard/tests/general_functions/007.phpt b/ext/standard/tests/general_functions/007.phpt deleted file mode 100644 index 422ff3d94f..0000000000 --- a/ext/standard/tests/general_functions/007.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -MD5 / Base64 ---POST-- ---GET-- ---FILE-- -<?php -function test($str) { - $res = md5(base64_decode(base64_encode($str)))."\n"; - return $res; -} -echo test(""); -echo test("a"); -echo test("abc"); -echo test("message digest"); -echo test("abcdefghijklmnopqrstuvwxyz"); -echo test("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"); -echo test("12345678901234567890123456789012345678901234567890123456789012345678901234567890"); -?> ---EXPECT-- -d41d8cd98f00b204e9800998ecf8427e -0cc175b9c0f1b6a831c399e269772661 -900150983cd24fb0d6963f7d28e17f72 -f96b697d7cb7938d525a2f31aaf161d0 -c3fcd3d76192e4007dfb496cca67e13b -d174ab98d277d9f5a5611c2c9f419d9f -57edf4a22be3c955ac49da2e2107b67a diff --git a/ext/standard/tests/general_functions/008.phpt b/ext/standard/tests/general_functions/008.phpt deleted file mode 100644 index bb633c334d..0000000000 --- a/ext/standard/tests/general_functions/008.phpt +++ /dev/null @@ -1,40 +0,0 @@ ---TEST-- -var_dump float test ---INI-- -precision=12 ---FILE-- -<?php -// this checks f,g,G conversion for snprintf/spprintf -var_dump(array(ini_get('precision'),.012,-.012,.12,-.12,1.2,-1.2,12.,-12.,0.000123,.0000123,123456789012.0,1234567890123.0,12345678901234567890.0)); -?> ---EXPECT-- -array(14) { - [0]=> - string(2) "12" - [1]=> - float(0.012) - [2]=> - float(-0.012) - [3]=> - float(0.12) - [4]=> - float(-0.12) - [5]=> - float(1.2) - [6]=> - float(-1.2) - [7]=> - float(12) - [8]=> - float(-12) - [9]=> - float(0.000123) - [10]=> - float(1.23E-5) - [11]=> - float(123456789012) - [12]=> - float(1234567890120) - [13]=> - float(1.23456789012E+19) -}
\ No newline at end of file diff --git a/ext/standard/tests/general_functions/009.phpt b/ext/standard/tests/general_functions/009.phpt deleted file mode 100644 index 68c1f4d87b..0000000000 --- a/ext/standard/tests/general_functions/009.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -SHA1 ---POST-- ---GET-- ---FILE-- -<?php -function test($str) { - $res = sha1($str)."\n"; - return $res; -} -echo test(""); -echo test("a"); -echo test("abc"); -echo test("message digest"); -echo test("abcdefghijklmnopqrstuvwxyz"); -echo test("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"); -echo test("12345678901234567890123456789012345678901234567890123456789012345678901234567890"); -?> ---EXPECT-- -da39a3ee5e6b4b0d3255bfef95601890afd80709 -86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 -a9993e364706816aba3e25717850c26c9cd0d89d -c12252ceda8be8994d5fa0290a47231c1d16aae3 -32d10c7b8cf96570ca04ce37f2a19d84240d3a89 -761c457bf73b14d27e9e9265c46f4b4dda11f940 -50abf5706a150990a08b2c5ea40fa0e585554732 diff --git a/ext/standard/tests/general_functions/bug25038.phpt b/ext/standard/tests/general_functions/bug25038.phpt deleted file mode 100755 index 52fe032056..0000000000 --- a/ext/standard/tests/general_functions/bug25038.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -Bug #25038 (call_user_func issues warning if function throws exception) ---FILE-- -<?php - -function bar($x='no argument') -{ - throw new Exception("This is an exception from bar({$x})."); -} -try -{ - bar('first try'); -} -catch (Exception $e) -{ - print $e->getMessage()."\n"; -} -try -{ - call_user_func('bar','second try'); -} -catch (Exception $e) -{ - print $e->getMessage()."\n"; -} - -?> -===DONE=== ---EXPECT-- -This is an exception from bar(first try). -This is an exception from bar(second try). -===DONE=== diff --git a/ext/standard/tests/general_functions/getopt.phpt b/ext/standard/tests/general_functions/getopt.phpt deleted file mode 100644 index e861268459..0000000000 --- a/ext/standard/tests/general_functions/getopt.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -getopt ---ARGS-- --v -h -d test -m 1234 -t -j ---INI-- -register_argc_argv=On -variables_order=GPS ---SKIPIF-- -<?php - if (substr(PHP_OS, 0, 3) == 'WIN') { - die('skip getopt() is currently not available on Windows'); - } -?> ---FILE-- -<?php - var_dump(getopt("d:m:j:vht")); -?> ---EXPECT-- -array(5) { - ["v"]=> - bool(false) - ["h"]=> - bool(false) - ["d"]=> - string(4) "test" - ["m"]=> - string(4) "1234" - ["t"]=> - bool(false) -} diff --git a/ext/standard/tests/general_functions/highlight_heredoc.phpt b/ext/standard/tests/general_functions/highlight_heredoc.phpt deleted file mode 100644 index 89834a2709..0000000000 --- a/ext/standard/tests/general_functions/highlight_heredoc.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -highlight_string() handling of heredoc ---FILE-- -<?php -$str = ' -$x=<<<DD -jhdsjkfhjdsh -DD -.""; -$a=<<<DDDD -jhdsjkfhjdsh -DDDD; -'; -highlight_string($str); -?> ---EXPECT-- -<code><font color="#000000"> -<br />$x=<<<DD<br />jhdsjkfhjdsh<br />DD<br />."";<br />$a=<<<DDDD<br />jhdsjkfhjdsh<br />DDDD;<br /></font> -</code> diff --git a/ext/standard/tests/general_functions/proc_open.phpt b/ext/standard/tests/general_functions/proc_open.phpt deleted file mode 100644 index 0cd08bd6b2..0000000000 --- a/ext/standard/tests/general_functions/proc_open.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -proc_open ---SKIPIF-- -<?php # vim:syn=php -if (!is_executable("/bin/cat")) echo "skip"; -if (!function_exists("proc_open")) echo "skip proc_open() is not available"; -?> ---POST-- ---GET-- ---FILE-- -<?php -$ds = array( - 0 => array("pipe", "r"), - 1 => array("pipe", "w"), - 2 => array("pipe", "w") - ); - -$cat = proc_open( - "/bin/cat", - $ds, - $pipes - ); - -proc_close($cat); - -echo "I didn't segfault!\n"; - -?> ---EXPECT-- -I didn't segfault! diff --git a/ext/standard/tests/general_functions/sunfuncts.phpt b/ext/standard/tests/general_functions/sunfuncts.phpt deleted file mode 100644 index 7000c8892a..0000000000 --- a/ext/standard/tests/general_functions/sunfuncts.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -date_sunrise() and date_sunset() functions ---INI-- -precision=14 ---FILE-- -<?php - -putenv ("TZ=Asia/Jerusalem"); - -for($a=1;$a<=12;$a++){ - echo date_sunrise(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_TIMESTAMP,31.76670,35.23330,90.83,2)." "; - echo date_sunrise(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_STRING,31.76670,35.23330,90.83,2)." "; - echo date_sunrise(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_DOUBLE,31.76670,35.23330,90.83,2)."\n"; - - echo date_sunset(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_TIMESTAMP,31.76670,35.23330,90.83,2)." "; - echo date_sunset(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_STRING,31.76670,35.23330,90.83,2)." "; - echo date_sunset(mktime(1,1,1,$a,1,2003),SUNFUNCS_RET_DOUBLE,31.76670,35.23330,90.83,2)."\n"; -} -?> ---EXPECT-- -1041293199 06:39 6.6524557618962 -1041293806 16:46 16.769374867459 -1043971592 06:32 6.5453702926602 -1043972233 17:13 17.217524708736 -1046390766 06:06 6.1156526756851 -1046391456 17:36 17.6108549623 -1049069128 05:28 5.4727420290691 -1049069878 17:58 17.972552584375 -1051661094 04:54 4.9012299828593 -1051661898 18:18 18.313688769483 -1054339474 04:34 4.5744292894498 -1054340319 18:39 18.656400943241 -1056931476 04:36 4.6161204505189 -1056932328 18:48 18.808871657766 -1059609894 04:54 4.9068825098364 -1059610715 18:35 18.599286002028 -1062288314 05:14 5.2368895570738 -1062289083 18:03 18.060541787879 -1064880332 05:32 5.542366581139 -1064881044 17:24 17.411505614917 -1067558754 05:54 5.9162088420581 -1067559410 16:50 16.833698570628 -1070150780 06:20 6.3462215520697 -1070151395 16:35 16.583589055537 diff --git a/ext/standard/tests/image/246x247.png b/ext/standard/tests/image/246x247.png Binary files differdeleted file mode 100644 index 648a64e0aa..0000000000 --- a/ext/standard/tests/image/246x247.png +++ /dev/null diff --git a/ext/standard/tests/image/384x385.png b/ext/standard/tests/image/384x385.png Binary files differdeleted file mode 100644 index 843ddfaf08..0000000000 --- a/ext/standard/tests/image/384x385.png +++ /dev/null diff --git a/ext/standard/tests/image/bug13213.jpg b/ext/standard/tests/image/bug13213.jpg Binary files differdeleted file mode 100644 index b90c7a4059..0000000000 --- a/ext/standard/tests/image/bug13213.jpg +++ /dev/null diff --git a/ext/standard/tests/image/bug13213.phpt b/ext/standard/tests/image/bug13213.phpt deleted file mode 100644 index c97b7016b4..0000000000 --- a/ext/standard/tests/image/bug13213.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Bug #13213 (GetImageSize and wrong JPEG Comments) ---FILE-- -<?php -var_dump(GetImageSize(dirname(__FILE__).'/bug13213.jpg')); -?> ---EXPECT-- -array(7) { - [0]=> - int(1) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - string(20) "width="1" height="1"" - ["bits"]=> - int(8) - ["channels"]=> - int(3) - ["mime"]=> - string(10) "image/jpeg" -} diff --git a/ext/standard/tests/image/getimagesize.phpt b/ext/standard/tests/image/getimagesize.phpt deleted file mode 100644 index 46003cffac..0000000000 --- a/ext/standard/tests/image/getimagesize.phpt +++ /dev/null @@ -1,196 +0,0 @@ ---TEST-- -GetImageSize() ---SKIPIF-- -<?php - require_once('skipif_imagetype.inc'); -?> ---FILE-- -<?php - // Note: SWC requires zlib - $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); - $result = array(); - $files = array(); - while (($file = readdir($dir)) !== FALSE) { - if (preg_match('/^test.+pix\./',$file) && $file != "test13pix.swf") { - $files[] = $file; - } - } - closedir($dir); - sort($files); - foreach($files as $file) { - $result[$file] = getimagesize(dirname(__FILE__)."/$file"); - } - var_dump($result); -?> ---EXPECT-- -array(11) { - ["test1pix.bmp"]=> - array(6) { - [0]=> - int(1) - [1]=> - int(1) - [2]=> - int(6) - [3]=> - string(20) "width="1" height="1"" - ["bits"]=> - int(24) - ["mime"]=> - string(9) "image/bmp" - } - ["test1pix.jp2"]=> - array(7) { - [0]=> - int(1) - [1]=> - int(1) - [2]=> - int(10) - [3]=> - string(20) "width="1" height="1"" - ["bits"]=> - int(8) - ["channels"]=> - int(3) - ["mime"]=> - string(9) "image/jp2" - } - ["test1pix.jpc"]=> - array(7) { - [0]=> - int(1) - [1]=> - int(1) - [2]=> - int(9) - [3]=> - string(20) "width="1" height="1"" - ["bits"]=> - int(8) - ["channels"]=> - int(3) - ["mime"]=> - string(24) "application/octet-stream" - } - ["test1pix.jpg"]=> - array(7) { - [0]=> - int(1) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - string(20) "width="1" height="1"" - ["bits"]=> - int(8) - ["channels"]=> - int(3) - ["mime"]=> - string(10) "image/jpeg" - } - ["test2pix.gif"]=> - array(7) { - [0]=> - int(2) - [1]=> - int(1) - [2]=> - int(1) - [3]=> - string(20) "width="2" height="1"" - ["bits"]=> - int(1) - ["channels"]=> - int(3) - ["mime"]=> - string(9) "image/gif" - } - ["test4pix.gif"]=> - array(7) { - [0]=> - int(4) - [1]=> - int(1) - [2]=> - int(1) - [3]=> - string(20) "width="4" height="1"" - ["bits"]=> - int(2) - ["channels"]=> - int(3) - ["mime"]=> - string(9) "image/gif" - } - ["test4pix.iff"]=> - array(6) { - [0]=> - int(4) - [1]=> - int(1) - [2]=> - int(14) - [3]=> - string(20) "width="4" height="1"" - ["bits"]=> - int(4) - ["mime"]=> - string(9) "image/iff" - } - ["test4pix.png"]=> - array(6) { - [0]=> - int(4) - [1]=> - int(1) - [2]=> - int(3) - [3]=> - string(20) "width="4" height="1"" - ["bits"]=> - int(4) - ["mime"]=> - string(9) "image/png" - } - ["test4pix.psd"]=> - array(5) { - [0]=> - int(4) - [1]=> - int(1) - [2]=> - int(5) - [3]=> - string(20) "width="4" height="1"" - ["mime"]=> - string(9) "image/psd" - } - ["test4pix.swf"]=> - array(5) { - [0]=> - int(550) - [1]=> - int(400) - [2]=> - int(4) - [3]=> - string(24) "width="550" height="400"" - ["mime"]=> - string(29) "application/x-shockwave-flash" - } - ["test4pix.tif"]=> - array(5) { - [0]=> - int(4) - [1]=> - int(1) - [2]=> - int(7) - [3]=> - string(20) "width="4" height="1"" - ["mime"]=> - string(10) "image/tiff" - } -} diff --git a/ext/standard/tests/image/getimagesize_246x247.phpt b/ext/standard/tests/image/getimagesize_246x247.phpt deleted file mode 100644 index e5a0aea779..0000000000 --- a/ext/standard/tests/image/getimagesize_246x247.phpt +++ /dev/null @@ -1,42 +0,0 @@ ---TEST-- -GetImageSize() with 246x247 pixels ---SKIPIF-- -<?php - require_once('skipif_imagetype.inc'); -?> ---FILE-- -<?php - // Note: SWC requires zlib - $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); - $result = array(); - $files = array(); - while (($file = readdir($dir)) !== FALSE) { - if (preg_match('/^246x247\./',$file)) { - $files[] = $file; - } - } - closedir($dir); - sort($files); - foreach($files as $file) { - $result[$file] = getimagesize(dirname(__FILE__)."/$file"); - } - var_dump($result); -?> ---EXPECT-- -array(1) { - ["246x247.png"]=> - array(6) { - [0]=> - int(246) - [1]=> - int(247) - [2]=> - int(3) - [3]=> - string(24) "width="246" height="247"" - ["bits"]=> - int(4) - ["mime"]=> - string(9) "image/png" - } -} diff --git a/ext/standard/tests/image/getimagesize_384x385.phpt b/ext/standard/tests/image/getimagesize_384x385.phpt deleted file mode 100644 index 0051df71e0..0000000000 --- a/ext/standard/tests/image/getimagesize_384x385.phpt +++ /dev/null @@ -1,42 +0,0 @@ ---TEST-- -GetImageSize() with 384x385 pixels ---SKIPIF-- -<?php - require_once('skipif_imagetype.inc'); -?> ---FILE-- -<?php - // Note: SWC requires zlib - $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); - $result = array(); - $files = array(); - while (($file = readdir($dir)) !== FALSE) { - if (preg_match('/^384x385\./',$file)) { - $files[] = $file; - } - } - closedir($dir); - sort($files); - foreach($files as $file) { - $result[$file] = getimagesize(dirname(__FILE__)."/$file"); - } - var_dump($result); -?> ---EXPECT-- -array(1) { - ["384x385.png"]=> - array(6) { - [0]=> - int(384) - [1]=> - int(385) - [2]=> - int(3) - [3]=> - string(24) "width="384" height="385"" - ["bits"]=> - int(1) - ["mime"]=> - string(9) "image/png" - } -} diff --git a/ext/standard/tests/image/getimagesize_swc.phpt b/ext/standard/tests/image/getimagesize_swc.phpt deleted file mode 100644 index b9b83f4373..0000000000 --- a/ext/standard/tests/image/getimagesize_swc.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -GetImageSize() for compressed swf files ---SKIPIF-- -<?php - if (!defined("IMAGETYPE_SWC") || !extension_loaded('zlib')) { - die("skip zlib extension is not avaliable"); - } -?> ---FILE-- -<?php - var_dump(getimagesize(dirname(__FILE__) . "/test13pix.swf")); -?> ---EXPECT-- -array(5) { - [0]=> - int(550) - [1]=> - int(400) - [2]=> - int(13) - [3]=> - string(24) "width="550" height="400"" - ["mime"]=> - string(29) "application/x-shockwave-flash" -} diff --git a/ext/standard/tests/image/image_type_to_mime_type.phpt b/ext/standard/tests/image/image_type_to_mime_type.phpt deleted file mode 100644 index 94aabba0b9..0000000000 --- a/ext/standard/tests/image/image_type_to_mime_type.phpt +++ /dev/null @@ -1,51 +0,0 @@ ---TEST-- -image_type_to_mime_type() ---SKIPIF-- -<?php - if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available'); - require_once('skipif_imagetype.inc'); -?> ---FILE-- -<?php - // Note: SWC requires zlib - $dir = opendir(dirname(__FILE__)) or die('cannot open directory: '.dirname(__FILE__)); - $result = array(); - $files = array(); - while (($file = readdir($dir)) !== FALSE) { - if (preg_match('/^test.+pix\./',$file) && $file != "test13pix.swf") { - $files[] = $file; - } - } - closedir($dir); - sort($files); - foreach($files as $file) { - $result[$file] = getimagesize(dirname(__FILE__)."/$file"); - $result[$file] = image_type_to_mime_type($result[$file][2]); - } - var_dump($result); -?> ---EXPECT-- -array(11) { - ["test1pix.bmp"]=> - string(9) "image/bmp" - ["test1pix.jp2"]=> - string(9) "image/jp2" - ["test1pix.jpc"]=> - string(24) "application/octet-stream" - ["test1pix.jpg"]=> - string(10) "image/jpeg" - ["test2pix.gif"]=> - string(9) "image/gif" - ["test4pix.gif"]=> - string(9) "image/gif" - ["test4pix.iff"]=> - string(9) "image/iff" - ["test4pix.png"]=> - string(9) "image/png" - ["test4pix.psd"]=> - string(9) "image/psd" - ["test4pix.swf"]=> - string(29) "application/x-shockwave-flash" - ["test4pix.tif"]=> - string(10) "image/tiff" -}
\ No newline at end of file diff --git a/ext/standard/tests/image/skipif_imagetype.inc b/ext/standard/tests/image/skipif_imagetype.inc deleted file mode 100644 index 827f10c179..0000000000 --- a/ext/standard/tests/image/skipif_imagetype.inc +++ /dev/null @@ -1,15 +0,0 @@ -<?php -if (!defined('IMAGETYPE_GIF')) die('skip images of type GIF not supported'); -if (!defined('IMAGETYPE_JPEG')) die('skip images of type JPEG not supported'); -if (!defined('IMAGETYPE_PNG')) die('skip images of type PNG not supported'); -if (!defined('IMAGETYPE_SWF')) die('skip images of type SWF not supported'); -if (!defined('IMAGETYPE_PSD')) die('skip images of type PSD not supported'); -if (!defined('IMAGETYPE_BMP')) die('skip images of type BMP not supported'); -if (!defined('IMAGETYPE_TIFF_II')) die('skip images of type TIFF not supported'); -if (!defined('IMAGETYPE_TIFF_MM')) die('skip images of type TIFF not supported'); -if (!defined('IMAGETYPE_JPC')) die('skip images of type JPC not supported'); -//if (!defined('IMAGETYPE_JP2')) die('skip images of type JP2 not supported'); -//if (!defined('IMAGETYPE_JPX')) die('skip images of type JPX not supported'); -//if (!defined('IMAGETYPE_JB2')) die('skip images of type JB2 not supported'); -if (!defined('IMAGETYPE_IFF')) die('skip images of type IFF not supported'); -?> diff --git a/ext/standard/tests/image/test13pix.swf b/ext/standard/tests/image/test13pix.swf Binary files differdeleted file mode 100755 index 0d40cb743e..0000000000 --- a/ext/standard/tests/image/test13pix.swf +++ /dev/null diff --git a/ext/standard/tests/image/test1pix.bmp b/ext/standard/tests/image/test1pix.bmp Binary files differdeleted file mode 100644 index f3799d2d1e..0000000000 --- a/ext/standard/tests/image/test1pix.bmp +++ /dev/null diff --git a/ext/standard/tests/image/test1pix.jp2 b/ext/standard/tests/image/test1pix.jp2 Binary files differdeleted file mode 100644 index 8a1172e10d..0000000000 --- a/ext/standard/tests/image/test1pix.jp2 +++ /dev/null diff --git a/ext/standard/tests/image/test1pix.jpc b/ext/standard/tests/image/test1pix.jpc Binary files differdeleted file mode 100644 index ac11c6bc81..0000000000 --- a/ext/standard/tests/image/test1pix.jpc +++ /dev/null diff --git a/ext/standard/tests/image/test1pix.jpg b/ext/standard/tests/image/test1pix.jpg Binary files differdeleted file mode 100644 index 121decb65a..0000000000 --- a/ext/standard/tests/image/test1pix.jpg +++ /dev/null diff --git a/ext/standard/tests/image/test2pix.gif b/ext/standard/tests/image/test2pix.gif Binary files differdeleted file mode 100644 index c4d4483544..0000000000 --- a/ext/standard/tests/image/test2pix.gif +++ /dev/null diff --git a/ext/standard/tests/image/test4pix.gif b/ext/standard/tests/image/test4pix.gif Binary files differdeleted file mode 100644 index a02ebe9784..0000000000 --- a/ext/standard/tests/image/test4pix.gif +++ /dev/null diff --git a/ext/standard/tests/image/test4pix.iff b/ext/standard/tests/image/test4pix.iff Binary files differdeleted file mode 100644 index fe9daebbae..0000000000 --- a/ext/standard/tests/image/test4pix.iff +++ /dev/null diff --git a/ext/standard/tests/image/test4pix.png b/ext/standard/tests/image/test4pix.png Binary files differdeleted file mode 100644 index 2b75ac5fb2..0000000000 --- a/ext/standard/tests/image/test4pix.png +++ /dev/null diff --git a/ext/standard/tests/image/test4pix.psd b/ext/standard/tests/image/test4pix.psd Binary files differdeleted file mode 100644 index 4c378239d7..0000000000 --- a/ext/standard/tests/image/test4pix.psd +++ /dev/null diff --git a/ext/standard/tests/image/test4pix.swf b/ext/standard/tests/image/test4pix.swf Binary files differdeleted file mode 100755 index b1d41c6766..0000000000 --- a/ext/standard/tests/image/test4pix.swf +++ /dev/null diff --git a/ext/standard/tests/image/test4pix.tif b/ext/standard/tests/image/test4pix.tif Binary files differdeleted file mode 100644 index 13367ee173..0000000000 --- a/ext/standard/tests/image/test4pix.tif +++ /dev/null diff --git a/ext/standard/tests/math/abs.phpt b/ext/standard/tests/math/abs.phpt deleted file mode 100644 index 3b70e7dc47..0000000000 --- a/ext/standard/tests/math/abs.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Simple math tests ---POST-- ---GET-- ---FILE-- -<?php // $Id$ - -define('LONG_MAX', is_int(5000000000)? 9223372036854775807 : 0x7FFFFFFF); -define('LONG_MIN', -LONG_MAX - 1); -printf("%d,%d,%d,%d\n",is_int(LONG_MIN ),is_int(LONG_MAX ), - is_int(LONG_MIN-1),is_int(LONG_MAX+1)); - -$tests = <<<TESTS - 1 === abs(-1) - 1.5 === abs(-1.5) - 1 === abs("-1") - 1.5 === abs("-1.5") --LONG_MIN+1 === abs(LONG_MIN-1) --LONG_MIN === abs(LONG_MIN) --(LONG_MIN+1) === abs(LONG_MIN+1) -TESTS; - -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); ---EXPECT-- -1,1,0,0 -OK diff --git a/ext/standard/tests/math/bug21523.phpt b/ext/standard/tests/math/bug21523.phpt deleted file mode 100644 index aaeb8e865c..0000000000 --- a/ext/standard/tests/math/bug21523.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -Bug #21523 (number_format tries to allocate negative amount of memory) ---FILE-- -<?php // $Id$ vim600:syn=php - -var_dump(number_format(-2000, 2768)); -echo "OK"; -?> ---EXPECT-- -string(2775) "-2,000.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" -OK diff --git a/ext/standard/tests/math/bug24142.phpt b/ext/standard/tests/math/bug24142.phpt deleted file mode 100644 index 244952369d..0000000000 --- a/ext/standard/tests/math/bug24142.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -Bug #24142 (round() problems) ---FILE-- -<?php // $Id$ vim600:syn=php -$v = 0.005; -for ($i = 1; $i < 10; $i++) { - echo "round({$v}, 2) -> ".round($v, 2)."\n"; - $v += 0.01; -} -?> ---EXPECT-- -round(0.005, 2) -> 0.01 -round(0.015, 2) -> 0.02 -round(0.025, 2) -> 0.03 -round(0.035, 2) -> 0.04 -round(0.045, 2) -> 0.05 -round(0.055, 2) -> 0.06 -round(0.065, 2) -> 0.07 -round(0.075, 2) -> 0.08 -round(0.085, 2) -> 0.09 diff --git a/ext/standard/tests/math/bug25665.phpt b/ext/standard/tests/math/bug25665.phpt deleted file mode 100644 index b7875db11e..0000000000 --- a/ext/standard/tests/math/bug25665.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -Bug #25665 (var_dump () hangs on Nan and INF) ---FILE-- -<?php -set_time_limit(5); -var_dump(acos(1.01)); -var_dump(log(0)); -?> ---EXPECT-- -float(NAN) -float(-INF) diff --git a/ext/standard/tests/math/bug25694.phpt b/ext/standard/tests/math/bug25694.phpt deleted file mode 100644 index 165e1db083..0000000000 --- a/ext/standard/tests/math/bug25694.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -Bug #25694 (round() and number_format() inconsistency) ---FILE-- -<?php -echo "round 0.045 = " . round(0.045, 2) . "\n"; -echo "number format 0.045 = " . number_format(0.045, 2) . "\n\n"; -echo "round 0.055 = " . round(0.055, 2) . "\n"; -echo "number format 0.055 = " . number_format(0.055, 2) . "\n\n"; -echo "round 5.045 = " . round(5.045, 2) . "\n"; -echo "number format 5.045 = " . number_format(5.045, 2) . "\n\n"; -echo "round 5.055 = " . round(5.055, 2) . "\n"; -echo "number format 5.055 = " . number_format(5.055, 2) . "\n\n"; -echo "round 3.025 = " . round(3.025, 2) . "\n"; -echo "number format 3.025 = " . number_format(3.025, 2) . "\n\n"; -echo "round 4.025 = " . round(4.025, 2) . "\n"; -echo "number format 4.025 = " . number_format(4.025, 2) . "\n\n"; -?> ---EXPECT-- -round 0.045 = 0.05 -number format 0.045 = 0.05 - -round 0.055 = 0.06 -number format 0.055 = 0.06 - -round 5.045 = 5.05 -number format 5.045 = 5.05 - -round 5.055 = 5.06 -number format 5.055 = 5.06 - -round 3.025 = 3.03 -number format 3.025 = 3.03 - -round 4.025 = 4.03 -number format 4.025 = 4.03 diff --git a/ext/standard/tests/math/floorceil.phpt b/ext/standard/tests/math/floorceil.phpt deleted file mode 100644 index 3ac2094610..0000000000 --- a/ext/standard/tests/math/floorceil.phpt +++ /dev/null @@ -1,46 +0,0 @@ ---TEST-- -Tests for floor en ceil ---POST-- ---GET-- ---FILE-- -<?php - $a = ceil (-0); $b = ceil (-1); $c = ceil (-1.5); - $d = ceil (-1.8); $e = ceil (-2.7); - var_dump ($a, $b, $c, $d, $e); - - $a = ceil (0); $b = ceil (0.5); $c = ceil (1); - $d = ceil (1.5); $e = ceil (1.8); $f = ceil (2.7); - var_dump ($a, $b, $c, $d, $e, $f); - - $a = floor (-0); $b = floor (-0.5); $c = floor (-1); - $d = floor (-1.5); $e = floor (-1.8); $f = floor (-2.7); - var_dump ($a, $b, $c, $d, $e, $f); - - $a = floor (0); $b = floor (0.5); $c = floor (1); - $d = floor (1.5); $e = floor (1.8); $f = floor (2.7); - var_dump ($a, $b, $c, $d, $e, $f); -?> ---EXPECT-- -float(0) -float(-1) -float(-1) -float(-1) -float(-2) -float(0) -float(1) -float(1) -float(2) -float(2) -float(3) -float(0) -float(-1) -float(-1) -float(-2) -float(-2) -float(-3) -float(0) -float(0) -float(1) -float(1) -float(1) -float(2) diff --git a/ext/standard/tests/math/hexdec.phpt b/ext/standard/tests/math/hexdec.phpt deleted file mode 100644 index d8ff71f1ce..0000000000 --- a/ext/standard/tests/math/hexdec.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -overflow check for _php_math_basetozval ---FILE-- -<?php - -var_dump(hexdec("012345")); -var_dump(hexdec("12345")); -var_dump(hexdec("q12345")); -var_dump(hexdec("12345+?!")); -var_dump(hexdec("12345q")); -var_dump((float)hexdec("1234500001")); -var_dump((float)hexdec("17fffffff")); - -?> ---EXPECT-- -int(74565) -int(74565) -int(74565) -int(74565) -int(74565) -float(78187069441) -float(6442450943) diff --git a/ext/standard/tests/math/log.phpt b/ext/standard/tests/math/log.phpt deleted file mode 100644 index 285b19c853..0000000000 --- a/ext/standard/tests/math/log.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -log() tests ---POST-- ---GET-- ---FILE-- -<?php // $Id$ -echo "On failure, please mail result to php-dev@lists.php.net\n"; -for ($x = 0, $count= 0; $x < 200; $x++) { - $x2 = (int) exp(log($x)); - // e ^ log(x) should be close in range to x - if (($x2 < ($x + 2)) && ($x2 > ($x - 2))) { - $count++; - } else { - print "$x : $x2\n"; - } -} -print $count . "\n"; - -// Now test the base form of log -for ($base = 2; $base < 11; $base++) { - for ($x = 0, $count= 0; $x < 50; $x++) { - $x2 = (int) pow($base, log($x, $base)); - // base ^ log(x) should be close in range to x - if (($x2 < ($x + 2)) && ($x2 > ($x - 2))) { - $count++; - } else { - print "base $base: $x : $x2\n"; - } - } - print $count . "\n"; -} -?> ---EXPECT-- -On failure, please mail result to php-dev@lists.php.net -200 -50 -50 -50 -50 -50 -50 -50 -50 -50 diff --git a/ext/standard/tests/math/pow.phpt b/ext/standard/tests/math/pow.phpt deleted file mode 100644 index deda5a94b0..0000000000 --- a/ext/standard/tests/math/pow.phpt +++ /dev/null @@ -1,151 +0,0 @@ ---TEST-- -Various pow() tests ---POST-- ---GET-- ---FILE-- -<?php // $Id$ - -define('LONG_MAX', is_int(5000000000)? 9223372036854775807 : 0x7FFFFFFF); -define('LONG_MIN', -LONG_MAX - 1); -printf("%d,%d,%d,%d\n",is_int(LONG_MIN ),is_int(LONG_MAX ), - is_int(LONG_MIN-1),is_int(LONG_MAX+1)); - -$tests = <<<TESTS - 0.25 === pow(-2,-2) --0.5 === pow(-2,-1) - 1 === pow(-2, 0) --2 === pow(-2, 1) - 4 === pow(-2, 2) - 1.0 === pow(-1,-2) --1.0 === pow(-1,-1) - 1 === pow(-1, 0) --1 === pow(-1, 1) - 1 === pow(-1, 2) - TRUE === is_infinite(pow(0,-2)) - TRUE === is_infinite(pow(0,-1)) - 1 === pow( 0, 0) - 0 === pow( 0, 1) - 0 === pow( 0, 2) - 1.0 === pow( 1,-2) - 1.0 === pow( 1,-1) - 1 === pow( 1, 0) - 1 === pow( 1, 1) - 1 === pow( 1, 2) - 0.25 === pow( 2,-2) - 0.5 === pow( 2,-1) - 1 === pow( 2, 0) - 2 === pow( 2, 1) - 4 === pow( 2, 2) - 0.25 === pow(-2,-2.0) --0.5 === pow(-2,-1.0) - 1.0 === pow(-2, 0.0) --2.0 === pow(-2, 1.0) - 4.0 === pow(-2, 2.0) - 1.0 === pow(-1,-2.0) --1.0 === pow(-1,-1.0) - 1.0 === pow(-1, 0.0) --1.0 === pow(-1, 1.0) - 1.0 === pow(-1, 2.0) - TRUE === is_infinite(pow(0,-2.0)) - TRUE === is_infinite(pow(0,-1.0)) - 1.0 === pow( 0, 0.0) - 0.0 === pow( 0, 1.0) - 0.0 === pow( 0, 2.0) - 1.0 === pow( 1,-2.0) - 1.0 === pow( 1,-1.0) - 1.0 === pow( 1, 0.0) - 1.0 === pow( 1, 1.0) - 1.0 === pow( 1, 2.0) - 0.25 === pow( 2,-2.0) - 0.5 === pow( 2,-1.0) - 1.0 === pow( 2, 0.0) - 2.0 === pow( 2, 1.0) - 4.0 === pow( 2, 2.0) - 2147483648 === pow(2,31) --2147483648 ~== pow(-2,31) - 1000000000 === pow(10,9) - 100000000 === pow(-10,8) - 1 === pow(-1,1443279822) --1 === pow(-1,1443279821) -sqrt(2) ~== pow(2,1/2) - 0.25 === pow(-2.0,-2.0) --0.5 === pow(-2.0,-1.0) - 1.0 === pow(-2.0, 0.0) --2.0 === pow(-2.0, 1.0) - 4.0 === pow(-2.0, 2.0) - 1.0 === pow(-1.0,-2.0) --1.0 === pow(-1.0,-1.0) - 1.0 === pow(-1.0, 0.0) --1.0 === pow(-1.0, 1.0) - 1.0 === pow(-1.0, 2.0) - TRUE === is_infinite(pow(0.0,-2.0)) - TRUE === is_infinite(pow(0.0,-1.0)) - 1.0 === pow( 0.0, 0.0) - 0.0 === pow( 0.0, 1.0) - 0.0 === pow( 0.0, 2.0) - 1.0 === pow( 1.0,-2.0) - 1.0 === pow( 1.0,-1.0) - 1.0 === pow( 1.0, 0.0) - 1.0 === pow( 1.0, 1.0) - 1.0 === pow( 1.0, 2.0) - 0.25 === pow( 2.0,-2.0) - 0.5 === pow( 2.0,-1.0) - 1.0 === pow( 2.0, 0.0) - 2.0 === pow( 2.0, 1.0) - 4.0 === pow( 2.0, 2.0) - 0.25 === pow(-2.0,-2) --0.5 === pow(-2.0,-1) - 1.0 === pow(-2.0, 0) --2.0 === pow(-2.0, 1) - 4.0 === pow(-2.0, 2) - 1.0 === pow(-1.0,-2) --1.0 === pow(-1.0,-1) - 1.0 === pow(-1.0, 0) --1.0 === pow(-1.0, 1) - 1.0 === pow(-1.0, 2) - TRUE === is_infinite(pow( 0.0,-2)) - TRUE === is_infinite(pow( 0.0,-1)) - 1.0 === pow( 0.0, 0) - 0.0 === pow( 0.0, 1) - 0.0 === pow( 0.0, 2) - 1.0 === pow( 1.0,-2) - 1.0 === pow( 1.0,-1) - 1.0 === pow( 1.0, 0) - 1.0 === pow( 1.0, 1) - 1.0 === pow( 1.0, 2) - 0.25 === pow( 2.0,-2) - 0.5 === pow( 2.0,-1) - 1.0 === pow( 2.0, 0) - 2.0 === pow( 2.0, 1) - 4.0 === pow( 2.0, 2) - 2.0 === pow( 4, 0.5) - 2.0 === pow( 4.0, 0.5) - 3.0 === pow( 27, 1/3) - 3.0 === pow(27.0, 1/3) - 0.5 === pow( 4, -0.5) - 0.5 === pow( 4.0, -0.5) -LONG_MAX-1 === pow(LONG_MAX-1,1) -LONG_MIN+1 === pow(LONG_MIN+1,1) -(LONG_MAX-1)*(LONG_MAX-1) ~== pow(LONG_MAX-1,2) -(LONG_MIN+1)*(LONG_MIN+1) ~== pow(LONG_MIN+1,2) -(float)(LONG_MAX-1) === pow(LONG_MAX-1,1.0) -(float)(LONG_MIN+1) === pow(LONG_MIN+1,1.0) -(LONG_MAX-1)*(LONG_MAX-1) ~== pow(LONG_MAX-1,2.0) -(LONG_MIN+1)*(LONG_MIN+1) ~== pow(LONG_MIN+1,2.0) -LONG_MAX === pow(LONG_MAX,1) -LONG_MIN === pow(LONG_MIN,1) -LONG_MAX*LONG_MAX ~== pow(LONG_MAX,2) -LONG_MIN*LONG_MIN ~== pow(LONG_MIN,2) -(float)LONG_MAX === pow(LONG_MAX,1.0) -(float)LONG_MIN === pow(LONG_MIN,1.0) -LONG_MAX*LONG_MAX ~== pow(LONG_MAX,2.0) -LONG_MIN*LONG_MIN ~== pow(LONG_MIN,2.0) -TESTS; - - echo "On failure, please mail result to php-dev@lists.php.net\n"; - include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); - ---EXPECT-- -1,1,0,0 -On failure, please mail result to php-dev@lists.php.net -OK diff --git a/ext/standard/tests/math/round.phpt b/ext/standard/tests/math/round.phpt deleted file mode 100644 index 23032e906c..0000000000 --- a/ext/standard/tests/math/round.phpt +++ /dev/null @@ -1,39 +0,0 @@ ---TEST-- -Simple math tests ---POST-- ---GET-- ---FILE-- -<?php // $Id$ - -define('LONG_MAX', is_int(5000000000)? 9223372036854775807 : 0x7FFFFFFF); -define('LONG_MIN', -LONG_MAX - 1); -printf("%d,%d,%d,%d\n",is_int(LONG_MIN ),is_int(LONG_MAX ), - is_int(LONG_MIN-1),is_int(LONG_MAX+1)); - -$tests = <<<TESTS --1 ~== ceil(-1.5) - 2 ~== ceil( 1.5) --2 ~== floor(-1.5) - 1 ~== floor(1.5) - LONG_MIN ~== ceil(LONG_MIN - 0.5) - LONG_MIN+1 ~== ceil(LONG_MIN + 0.5) - LONG_MIN-1 ~== round(LONG_MIN - 0.6) - LONG_MIN ~== round(LONG_MIN - 0.4) - LONG_MIN ~== round(LONG_MIN + 0.4) - LONG_MIN+1 ~== round(LONG_MIN + 0.6) - LONG_MIN-1 ~== floor(LONG_MIN - 0.5) - LONG_MIN ~== floor(LONG_MIN + 0.5) - LONG_MAX ~== ceil(LONG_MAX - 0.5) - LONG_MAX+1 ~== ceil(LONG_MAX + 0.5) - LONG_MAX-1 ~== round(LONG_MAX - 0.6) - LONG_MAX ~== round(LONG_MAX - 0.4) - LONG_MAX ~== round(LONG_MAX + 0.4) - LONG_MAX+1 ~== round(LONG_MAX + 0.6) - LONG_MAX-1 ~== floor(LONG_MAX - 0.5) - LONG_MAX ~== floor(LONG_MAX + 0.5) -TESTS; - -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); ---EXPECT-- -1,1,0,0 -OK diff --git a/ext/standard/tests/network/bug20134.phpt b/ext/standard/tests/network/bug20134.phpt deleted file mode 100644 index e311f892f7..0000000000 --- a/ext/standard/tests/network/bug20134.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Bug #20134 (UDP reads from invalid ports) ---FILE-- -<?php -# vim600:syn=php: -$fp = fsockopen("udp://localhost", 65534, $errno, $errstr); -if (!$fp) { - /* UDP will never cause a connection error, as it is - * a connection-LESS protocol */ - echo "ERROR: $errno - $errstr<br>\n"; -} -else { - /* Likewise, writes will always appear to succeed */ - $x = fwrite($fp,"\n"); - var_dump($x); - /* But reads should always fail */ - $content = fread($fp, 40); - var_dump($content); - fclose($fp); -} -?> ---EXPECT-- -int(1) -string(0) "" diff --git a/ext/standard/tests/network/tcp4loop.phpt b/ext/standard/tests/network/tcp4loop.phpt deleted file mode 100644 index afd955918e..0000000000 --- a/ext/standard/tests/network/tcp4loop.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Streams Based IPv4 TCP Loopback test ---FILE-- -<?php # vim:ft=php: - /* Setup socket server */ - $server = stream_socket_server('tcp://127.0.0.1:31337'); - if (!$server) { - die('Unable to create AF_INET socket [server]'); - } - - /* Connect to it */ - $client = stream_socket_client('tcp://127.0.0.1:31337'); - if (!$client) { - die('Unable to create AF_INET socket [client]'); - } - - /* Accept that connection */ - $socket = stream_socket_accept($server); - if (!$socket) { - die('Unable to accept connection'); - } - - fwrite($client, "ABCdef123\n"); - - $data = fread($socket, 10); - var_dump($data); - - fclose($client); - fclose($socket); - fclose($server); -?> ---EXPECT-- -string(10) "ABCdef123 -" diff --git a/ext/standard/tests/network/tcp6loop.phpt b/ext/standard/tests/network/tcp6loop.phpt deleted file mode 100644 index 3f28cd4437..0000000000 --- a/ext/standard/tests/network/tcp6loop.phpt +++ /dev/null @@ -1,42 +0,0 @@ ---TEST-- -Streams Based IPv6 TCP Loopback test ---SKIPIF-- -<?php - /* If IPv6 is supported on the platform this will error out with code 111 - Connection refused. - If IPv6 is NOT supported, $errno will be set to something else (indicating parse/getaddrinfo error) - Note: Might be a good idea to export an IPv6 support indicator (such as AF_INET6 exported by ext/sockets) */ - @stream_socket_client('tcp://[::1]:0', $errno); - if ($errno != 111) die('skip IPv6 not supported.'); -?> ---FILE-- -<?php - /* Setup socket server */ - $server = stream_socket_server('tcp://[::1]:31337'); - if (!$server) { - die('Unable to create AF_INET6 socket [server]'); - } - - /* Connect to it */ - $client = stream_socket_client('tcp://[::1]:31337'); - if (!$client) { - die('Unable to create AF_INET6 socket [client]'); - } - - /* Accept that connection */ - $socket = stream_socket_accept($server); - if (!$socket) { - die('Unable to accept connection'); - } - - fwrite($client, "ABCdef123\n"); - - $data = fread($socket, 10); - var_dump($data); - - fclose($client); - fclose($socket); - fclose($server); -?> ---EXPECT-- -string(10) "ABCdef123 -" diff --git a/ext/standard/tests/network/udgloop.phpt b/ext/standard/tests/network/udgloop.phpt deleted file mode 100644 index a61d082c18..0000000000 --- a/ext/standard/tests/network/udgloop.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -Streams Based Unix Domain Datagram Loopback test ---SKIPIF-- -<?php # vim:ft=php: - if (array_search("udg",stream_get_transports()) === false) - die('SKIP No support for UNIX domain sockets.'); -?> ---FILE-- -<?php - $uniqid = uniqid(); - if (file_exists("/tmp/$uniqid.sock")) - die('Temporary socket /tmp/$uniqid.sock already exists.'); - - /* Setup socket server */ - $server = stream_socket_server("udg:///tmp/$uniqid.sock", $errno, $errstr, STREAM_SERVER_BIND); - if (!$server) { - die('Unable to create AF_UNIX socket [server]'); - } - - /* Connect to it */ - $client = stream_socket_client("udg:///tmp/$uniqid.sock"); - if (!$client) { - die('Unable to create AF_UNIX socket [client]'); - } - - fwrite($client, "ABCdef123\n"); - - $data = fread($server, 10); - var_dump($data); - - fclose($client); - fclose($server); - unlink("/tmp/$uniqid.sock"); -?> ---EXPECT-- -string(10) "ABCdef123 -" diff --git a/ext/standard/tests/network/udp4loop.phpt b/ext/standard/tests/network/udp4loop.phpt deleted file mode 100644 index 10d36ed73f..0000000000 --- a/ext/standard/tests/network/udp4loop.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Streams Based IPv4 UDP Loopback test ---FILE-- -<?php - /* Setup socket server */ - $server = stream_socket_server('udp://127.0.0.1:31338', $errno, $errstr, STREAM_SERVER_BIND); - if (!$server) { - die('Unable to create AF_INET socket [server]'); - } - - /* Connect to it */ - $client = stream_socket_client('udp://127.0.0.1:31338'); - if (!$client) { - die('Unable to create AF_INET socket [client]'); - } - - fwrite($client, "ABCdef123\n"); - - $data = fread($server, 10); - var_dump($data); - - fclose($client); - fclose($server); -?> ---EXPECT-- -string(10) "ABCdef123 -" diff --git a/ext/standard/tests/network/udp6loop.phpt b/ext/standard/tests/network/udp6loop.phpt deleted file mode 100644 index 5fcf7a7f46..0000000000 --- a/ext/standard/tests/network/udp6loop.phpt +++ /dev/null @@ -1,41 +0,0 @@ ---TEST-- -Streams Based IPv6 UDP Loopback test ---SKIPIF-- -<?php # vim:ft=php: - /* If IPv6 is supported on the platform this will error out with code 111 - - * Connection refused. If IPv6 is NOT supported, $errno will be set to - * something else (indicating parse/getaddrinfo error) - * Note: Might be a good idea to export an IPv6 support indicator - * (such as AF_INET6 exported by ext/sockets), however, since we - * cannot tell for sure if IPv6 works until we probe it at run time, - * this isn't really practical. - */ - - @stream_socket_client('tcp://[::1]:0', $errno); - if ($errno != 111) die('skip IPv6 not supported.'); -?> ---FILE-- -<?php - /* Setup socket server */ - $server = stream_socket_server('udp://[::1]:31337', $errno, $errstr, STREAM_SERVER_BIND); - if (!$server) { - die('Unable to create AF_INET6 socket [server]'); - } - - /* Connect to it */ - $client = stream_socket_client('udp://[::1]:31337'); - if (!$client) { - die('Unable to create AF_INET6 socket [client]'); - } - - fwrite($client, "ABCdef123\n"); - - $data = fread($server, 10); - var_dump($data); - - fclose($client); - fclose($server); -?> ---EXPECT-- -string(10) "ABCdef123 -" diff --git a/ext/standard/tests/network/unixloop.phpt b/ext/standard/tests/network/unixloop.phpt deleted file mode 100644 index abb103b0d1..0000000000 --- a/ext/standard/tests/network/unixloop.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Streams Based Unix Domain Loopback test ---SKIPIF-- -<?php # vim:ft=php: - if (array_search("unix",stream_get_transports()) === false) - die('SKIP No support for UNIX domain sockets.'); -?> ---FILE-- -<?php - $uniqid = uniqid(); - if (file_exists("/tmp/$uniqid.sock")) - die('Temporary socket already exists.'); - - /* Setup socket server */ - $server = stream_socket_server("unix:///tmp/$uniqid.sock"); - if (!$server) { - die('Unable to create AF_UNIX socket [server]'); - } - - /* Connect to it */ - $client = stream_socket_client("unix:///tmp/$uniqid.sock"); - if (!$client) { - die('Unable to create AF_UNIX socket [client]'); - } - - /* Accept that connection */ - $socket = stream_socket_accept($server); - if (!$socket) { - die('Unable to accept connection'); - } - - fwrite($client, "ABCdef123\n"); - - $data = fread($socket, 10); - var_dump($data); - - fclose($client); - fclose($socket); - fclose($server); - unlink("/tmp/$uniqid.sock"); -?> ---EXPECT-- -string(10) "ABCdef123 -" diff --git a/ext/standard/tests/reg/001.phpt b/ext/standard/tests/reg/001.phpt deleted file mode 100644 index f63c252518..0000000000 --- a/ext/standard/tests/reg/001.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -RegReplace test 1 ---POST-- ---GET-- ---FILE-- -<?php $a="abc123"; - echo ereg_replace("123","def",$a)?> ---EXPECT-- -abcdef diff --git a/ext/standard/tests/reg/002.phpt b/ext/standard/tests/reg/002.phpt deleted file mode 100644 index a9b7aaa00a..0000000000 --- a/ext/standard/tests/reg/002.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -RegReplace test 2 ---POST-- ---GET-- ---FILE-- -<?php $a="abc123"; - echo ereg_replace("123","",$a)?> ---EXPECT-- -abc diff --git a/ext/standard/tests/reg/003.phpt b/ext/standard/tests/reg/003.phpt deleted file mode 100644 index edd9c05969..0000000000 --- a/ext/standard/tests/reg/003.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -ereg_replace single-quote test ---POST-- ---GET-- ---FILE-- -<?php $a="\\'test"; - echo ereg_replace("\\\\'","'",$a) -?> ---EXPECT-- -'test diff --git a/ext/standard/tests/reg/004.phpt b/ext/standard/tests/reg/004.phpt deleted file mode 100644 index 1f60ff4900..0000000000 --- a/ext/standard/tests/reg/004.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -simple ereg test ---POST-- ---GET-- ---FILE-- -<?php $a="This is a nice and simple string"; - if (ereg(".*nice and simple.*",$a)) { - echo "ok\n"; - } - if (!ereg(".*doesn't exist.*",$a)) { - echo "ok\n"; - } -?> ---EXPECT-- -ok -ok diff --git a/ext/standard/tests/reg/005.phpt b/ext/standard/tests/reg/005.phpt deleted file mode 100644 index 78c0a0912a..0000000000 --- a/ext/standard/tests/reg/005.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -Test Regular expression register support in ereg ---POST-- ---GET-- ---FILE-- -<?php $a="This is a nice and simple string"; - echo ereg(".*(is).*(is).*",$a,$registers); - echo "\n"; - echo $registers[0]; - echo "\n"; - echo $registers[1]; - echo "\n"; - echo $registers[2]; - echo "\n"; -?> ---EXPECT-- -32 -This is a nice and simple string -is -is diff --git a/ext/standard/tests/reg/006.phpt b/ext/standard/tests/reg/006.phpt deleted file mode 100644 index 50b6dbfd3a..0000000000 --- a/ext/standard/tests/reg/006.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -Test ereg_replace of start-of-line ---POST-- ---GET-- ---FILE-- -<?php $a="This is a nice and simple string"; - echo ereg_replace("^This","That",$a); -?> ---EXPECT-- -That is a nice and simple string diff --git a/ext/standard/tests/reg/007.phpt b/ext/standard/tests/reg/007.phpt deleted file mode 100644 index b2646f842f..0000000000 --- a/ext/standard/tests/reg/007.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Test empty result buffer in reg_replace ---POST-- ---GET-- ---FILE-- -<?php - $a="abcd"; - $b=ereg_replace("abcd","",$a); - echo "strlen(\$b)=".strlen($b); -?> ---EXPECT-- -strlen($b)=0 diff --git a/ext/standard/tests/reg/008.phpt b/ext/standard/tests/reg/008.phpt deleted file mode 100644 index db61d1ca07..0000000000 --- a/ext/standard/tests/reg/008.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -Test back-references in regular expressions ---POST-- ---GET-- ---FILE-- -<?php - echo ereg_replace("([a-z]*)([-=+|]*)([0-9]+)","\\3 \\1 \\2\n","abc+-|=123"); -?> ---EXPECT-- -123 abc +-|= diff --git a/ext/standard/tests/reg/009.phpt b/ext/standard/tests/reg/009.phpt deleted file mode 100644 index 4996ef4c97..0000000000 --- a/ext/standard/tests/reg/009.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -Test split() ---POST-- ---GET-- ---FILE-- -<?php - $a=split("[[:space:]]","this is a -test"); - echo count($a) . "\n"; - for ($i = 0; $i < count($a); $i++) { - echo $a[$i] . "\n"; - } -?> ---EXPECT-- -4 -this -is -a -test diff --git a/ext/standard/tests/reg/010.phpt b/ext/standard/tests/reg/010.phpt deleted file mode 100644 index 30d28fd02f..0000000000 --- a/ext/standard/tests/reg/010.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -Long back references ---POST-- ---GET-- ---FILE-- -<?php $a="abc122222222223"; - echo ereg_replace("1(2*)3","\\1def\\1",$a)?> ---EXPECT-- -abc2222222222def2222222222 diff --git a/ext/standard/tests/reg/011.phpt b/ext/standard/tests/reg/011.phpt deleted file mode 100644 index 4eda774f58..0000000000 --- a/ext/standard/tests/reg/011.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -\0 back reference ---POST-- ---GET-- ---FILE-- -<?php $a="abc123"; - echo ereg_replace("123","def\\0ghi",$a)?> ---EXPECT-- -abcdef123ghi diff --git a/ext/standard/tests/reg/012.phpt b/ext/standard/tests/reg/012.phpt deleted file mode 100644 index d5342c7436..0000000000 --- a/ext/standard/tests/reg/012.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -nonexisting back reference ---POST-- ---GET-- ---FILE-- -<?php $a="abc123"; - echo ereg_replace("123",'def\1ghi',$a)?> ---EXPECT-- -abcdef\1ghi diff --git a/ext/standard/tests/reg/013.phpt b/ext/standard/tests/reg/013.phpt deleted file mode 100644 index ec3329fa7c..0000000000 --- a/ext/standard/tests/reg/013.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -escapes in replace string ---POST-- ---GET-- ---FILE-- -<?php $a="abc123"; - echo ereg_replace("123","def\\g\\\\hi\\",$a)?> ---EXPECT-- -abcdef\g\\hi\ diff --git a/ext/standard/tests/reg/014.phpt b/ext/standard/tests/reg/014.phpt deleted file mode 100644 index ec4d19ed0e..0000000000 --- a/ext/standard/tests/reg/014.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -backreferences not replaced recursively ---POST-- ---GET-- ---FILE-- -<?php $a="a\\2bxc"; - echo ereg_replace("a(.*)b(.*)c","\\1",$a)?> ---EXPECT-- -\2 diff --git a/ext/standard/tests/reg/015.phpt b/ext/standard/tests/reg/015.phpt deleted file mode 100644 index 961a60fa76..0000000000 --- a/ext/standard/tests/reg/015.phpt +++ /dev/null @@ -1,8 +0,0 @@ ---TEST-- -replace empty matches ---POST-- ---GET-- ---FILE-- -<?php echo ereg_replace("^","z","abc123")?> ---EXPECT-- -zabc123 diff --git a/ext/standard/tests/reg/016.phpt b/ext/standard/tests/reg/016.phpt deleted file mode 100644 index a24816f182..0000000000 --- a/ext/standard/tests/reg/016.phpt +++ /dev/null @@ -1,8 +0,0 @@ ---TEST-- -test backslash handling in regular expressions ---POST-- ---GET-- ---FILE-- -<?php echo ereg_replace('\?',"abc","?123?")?> ---EXPECT-- -abc123abc diff --git a/ext/standard/tests/serialize/001.phpt b/ext/standard/tests/serialize/001.phpt deleted file mode 100644 index 68352a9393..0000000000 --- a/ext/standard/tests/serialize/001.phpt +++ /dev/null @@ -1,122 +0,0 @@ ---TEST-- -serialize()/unserialize()/var_dump() ---POST-- ---GET-- ---FILE-- -<?php -class t -{ - function t() - { - $this->a = "hallo"; - } -} - -class s -{ - public $a; - public $b; - public $c; - - function s() - { - $this->a = "hallo"; - $this->b = "php"; - $this->c = "world"; - $this->d = "!"; - } - - function __sleep() - { - echo "__sleep called\n"; - return array("a","c"); - } - - function __wakeup() - { - echo "__wakeup called\n"; - } -} - - -echo serialize(NULL)."\n"; -echo serialize((bool) true)."\n"; -echo serialize((bool) false)."\n"; -echo serialize(1)."\n"; -echo serialize(0)."\n"; -echo serialize(-1)."\n"; -echo serialize(2147483647)."\n"; -echo serialize(-2147483647)."\n"; -echo serialize(1.123456789)."\n"; -echo serialize(1.0)."\n"; -echo serialize(0.0)."\n"; -echo serialize(-1.0)."\n"; -echo serialize(-1.123456789)."\n"; -echo serialize("hallo")."\n"; -echo serialize(array(1,1.1,"hallo",NULL,true,array()))."\n"; - -$t = new t(); -$data = serialize($t); -echo "$data\n"; -$t = unserialize($data); -var_dump($t); - -$t = new s(); -$data = serialize($t); -echo "$data\n"; -$t = unserialize($data); -var_dump($t); - -$a = array("a" => "test"); -$a[ "b" ] = &$a[ "a" ]; -var_dump($a); -$data = serialize($a); -echo "$data\n"; -$a = unserialize($data); -var_dump($a); -?> ---EXPECTF-- -N; -b:1; -b:0; -i:1; -i:0; -i:-1; -i:2147483647; -i:-2147483647; -d:1.123456789000000011213842299184761941432952880859375; -d:1; -d:0; -d:-1; -d:-1.123456789000000011213842299184761941432952880859375; -s:5:"hallo"; -a:6:{i:0;i:1;i:1;d:1.100000000000000088817841970012523233890533447265625;i:2;s:5:"hallo";i:3;N;i:4;b:1;i:5;a:0:{}} -O:1:"t":1:{s:1:"a";s:5:"hallo";} -object(t)#%d (1) { - ["a"]=> - string(5) "hallo" -} -__sleep called -O:1:"s":2:{s:1:"a";s:5:"hallo";s:1:"c";s:5:"world";} -__wakeup called -object(s)#%d (3) { - ["a"]=> - string(5) "hallo" - ["b"]=> - NULL - ["c"]=> - string(5) "world" -} -array(2) { - ["a"]=> - &string(4) "test" - ["b"]=> - &string(4) "test" -} -a:2:{s:1:"a";s:4:"test";s:1:"b";R:2;} -array(2) { - ["a"]=> - &string(4) "test" - ["b"]=> - &string(4) "test" -} diff --git a/ext/standard/tests/serialize/003.phpt b/ext/standard/tests/serialize/003.phpt deleted file mode 100644 index 173f57b72c..0000000000 --- a/ext/standard/tests/serialize/003.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -unserialize() floats with E notation (#18654) ---INI-- -precision=12 -serialize_precision=100 ---FILE-- -<?php -foreach(array(1e2, 5.2e25, 85.29e-23, 9e-9) AS $value) { - echo ($ser = serialize($value))."\n"; - var_dump(unserialize($ser)); - echo "\n"; -} -?> ---EXPECTREGEX-- -d:100; -float\(100\) - -d:5\.2E\+25; -float\(5\.2E\+25\) - -d:8\.52[89][0-9]+E-22; -float\(8\.529E-22\) - -d:9\.[0-9]*E-9; -float\(9\.0E-9\) diff --git a/ext/standard/tests/serialize/004.phpt b/ext/standard/tests/serialize/004.phpt deleted file mode 100644 index a4a7c68d6f..0000000000 --- a/ext/standard/tests/serialize/004.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -serialize()/unserialize() floats in array. ---INI-- -precision=12 -serialize_precision=100 ---FILE-- -<?php -error_reporting (E_ALL); -$a = array(4); -$str = serialize($a); -print('Serialized array: '.$str."\n"); -$b = unserialize($str); -print('Unserialized array: '); -var_dump($b); -print("\n"); -$str = serialize(array(4.5)); -print('Serialized array: '.$str."\n"); -$b = unserialize($str); -print('Unserialized array: ') ; -var_dump($b); -?> ---EXPECT-- -Serialized array: a:1:{i:0;i:4;} -Unserialized array: array(1) { - [0]=> - int(4) -} - -Serialized array: a:1:{i:0;d:4.5;} -Unserialized array: array(1) { - [0]=> - float(4.5) -} diff --git a/ext/standard/tests/serialize/bug14293.phpt b/ext/standard/tests/serialize/bug14293.phpt deleted file mode 100644 index 976eeffc0e..0000000000 --- a/ext/standard/tests/serialize/bug14293.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Bug #14293 (serialize() and __sleep()) ---FILE-- -<?php -class t -{ - function t() - { - $this->a = 'hello'; - } - - function __sleep() - { - echo "__sleep called\n"; - return array('a','b'); - } -} - -$t = new t(); -$data = serialize($t); -echo "$data\n"; -$t = unserialize($data); -var_dump($t); - -?> ---EXPECTF-- -__sleep called -O:1:"t":2:{s:1:"a";s:5:"hello";s:1:"b";N;} -object(t)#%d (2) { - ["a"]=> - string(5) "hello" - ["b"]=> - NULL -} diff --git a/ext/standard/tests/serialize/bug21957.phpt b/ext/standard/tests/serialize/bug21957.phpt deleted file mode 100644 index 29eeb2ee6c..0000000000 --- a/ext/standard/tests/serialize/bug21957.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -Bug #21957 (serialize() mangles objects with __sleep) ---FILE-- -<?php -class test -{ - public $a, $b; - - function test() - { - $this->a = 7; - $this->b = 2; - } - - function __sleep() - { - $this->b = 0; - } -} - -$t['one'] = 'ABC'; -$t['two'] = new test(); - -var_dump($t); - -$s = @serialize($t); -echo $s . "\n"; - -var_dump(unserialize($s)); -?> ---EXPECT-- -array(2) { - ["one"]=> - string(3) "ABC" - ["two"]=> - object(test)#1 (2) { - ["a"]=> - int(7) - ["b"]=> - int(2) - } -} -a:2:{s:3:"one";s:3:"ABC";s:3:"two";N;} -array(2) { - ["one"]=> - string(3) "ABC" - ["two"]=> - NULL -} diff --git a/ext/standard/tests/serialize/bug23298.phpt b/ext/standard/tests/serialize/bug23298.phpt deleted file mode 100644 index a5305cf37c..0000000000 --- a/ext/standard/tests/serialize/bug23298.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -Bug #23298 (serialize() and floats/doubles) ---INI-- -serialize_precision=100 ---FILE-- -<?php - ini_set('precision', 12); - $foo = 1.428571428571428647642857142; - $bar = unserialize(serialize($foo)); - var_dump(($foo === $bar)); -?> ---EXPECT-- -bool(true) diff --git a/ext/standard/tests/serialize/bug24063.phpt b/ext/standard/tests/serialize/bug24063.phpt deleted file mode 100644 index e1cdfecf55..0000000000 --- a/ext/standard/tests/serialize/bug24063.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Bug #24063 (serialize() missing 0 after the . on scientific notation) ---INI-- -serialize_precision=100 -precision=12 ---FILE-- -<?php -$v = 1; -for ($i = 1; $i < 10; $i++) { - $v /= 10; - echo "{$v} ".unserialize(serialize($v))."\n"; -} -?> ---EXPECT-- -0.1 0.1 -0.01 0.01 -0.001 0.001 -0.0001 0.0001 -1E-05 1E-05 -1E-06 1E-06 -1E-07 1E-07 -1E-08 1E-08 -1E-09 1E-09 diff --git a/ext/standard/tests/serialize/bug25378.phpt b/ext/standard/tests/serialize/bug25378.phpt deleted file mode 100644 index e59044002f..0000000000 --- a/ext/standard/tests/serialize/bug25378.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -Bug #25378 (unserialize() crashes with invalid data) ---FILE-- -<?php -var_dump(unserialize("s:-1:\"\";")); -?> ---EXPECTF-- -Notice: unserialize(): Error at offset 0 of 8 bytes in %s on line %d -bool(false) diff --git a/ext/standard/tests/serialize/bug26762.phpt b/ext/standard/tests/serialize/bug26762.phpt deleted file mode 100755 index 3011bb602c..0000000000 --- a/ext/standard/tests/serialize/bug26762.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Bug #26762 (unserialize() produces lowercase classnames) ---SKIPIF-- -<?php - if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); - if (class_exists('autoload_root')) die('skip Autoload test classes exist already'); -?> ---FILE-- -<?php - -ini_set('unserialize_callback_func','check'); - -function check($name) { - var_dump($name); - throw new exception; -} - -try { - @unserialize('O:3:"FOO":0:{}'); -} -catch (Exception $e) { - /* ignore */ -} - -?> ---EXPECTF-- -string(3) "FOO" diff --git a/ext/standard/tests/strings/004.phpt b/ext/standard/tests/strings/004.phpt deleted file mode 100644 index b9904c614a..0000000000 --- a/ext/standard/tests/strings/004.phpt +++ /dev/null @@ -1,84 +0,0 @@ ---TEST-- -Testing randomization of shuffle() and str_shuffle(). ---FILE-- -<?php -function stats($f, $a) { - $times = 90000; - print "$f\n"; - ksort($a); - foreach($a as $k => $v) - print "$k: $v: " . sprintf('%0.3f', $v / $times) . "\n"; -} -$a = array(); -$times = 90000; -for ($i = 0; $i < $times; $i++) { - $p = range(1,4); - shuffle($p); - $s = join('', $p); - if (empty($a[$s])) $a[$s] = 0; - $a[$s]++; -} - -stats('shuffle', $a); -$a = array(); -$times = 90000; -for ($i = 0; $i < $times; $i++) { - $p = '1234'; - $s = str_shuffle($p); - if (empty($a[$s])) $a[$s] = 0; - $a[$s]++; -} - -stats('str_shuffle', $a); -?> ---EXPECTREGEX-- -shuffle -1234: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -1243: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -1324: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -1342: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -1423: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -1432: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -2134: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -2143: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -2314: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -2341: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -2413: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -2431: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -3124: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -3142: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -3214: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -3241: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -3412: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -3421: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -4123: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -4132: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -4213: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -4231: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -4312: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -4321: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -str_shuffle -1234: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -1243: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -1324: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -1342: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -1423: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -1432: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -2134: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -2143: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -2314: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -2341: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -2413: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -2431: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -3124: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -3142: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -3214: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -3241: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -3412: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -3421: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -4123: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -4132: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -4213: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -4231: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -4312: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] -4321: 3[0-9][0-9][0-9]: 0.0[3-4][0-9] diff --git a/ext/standard/tests/strings/add-and-stripcslashes.phpt b/ext/standard/tests/strings/add-and-stripcslashes.phpt deleted file mode 100644 index f231156e88..0000000000 --- a/ext/standard/tests/strings/add-and-stripcslashes.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -addcslashes() and stripcslashes() function ---POST-- ---GET-- ---FILE-- -<?php -echo addcslashes("", "")."\n"; -echo addcslashes("", "burp")."\n"; -echo addcslashes("kaboemkara!", "")."\n"; -echo addcslashes("foobarbaz", 'bar')."\n"; -echo addcslashes('foo[ ]', 'A..z')."\n"; -echo @addcslashes("zoo['.']", 'z..A')."\n"; -echo addcslashes('abcdefghijklmnopqrstuvwxyz', "a\145..\160z")."\n"; -echo "\n\r" == stripcslashes('\n\r'),"\n"; -echo stripcslashes('\065\x64')."\n"; -echo stripcslashes('')."\n"; -?> ---EXPECT-- - - -kaboemkara! -foo\b\a\r\b\az -\f\o\o\[ \] -\zoo['\.'] -\abcd\e\f\g\h\i\j\k\l\m\n\o\pqrstuvwxy\z -1 -5d - diff --git a/ext/standard/tests/strings/add-and-stripslashes.phpt b/ext/standard/tests/strings/add-and-stripslashes.phpt deleted file mode 100644 index 1c65aefda6..0000000000 --- a/ext/standard/tests/strings/add-and-stripslashes.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -addslashes() and stripslashes() functions, normal and sybase-style ---POST-- ---GET-- ---FILE-- -<?php - -$input = ''; -for($i=0; $i<512; $i++) { - $input .= chr($i%256); -} - -echo "Normal: "; -ini_set('magic_quotes_sybase', 0); -if($input === stripslashes(addslashes($input))) { - echo "OK\n"; -} else { - echo "FAILED\n"; -} - -echo "Sybase: "; -ini_set('magic_quotes_sybase', 1); -if($input === stripslashes(addslashes($input))) { - echo "OK\n"; -} else { - echo "FAILED\n"; -} - -?> ---EXPECT-- -Normal: OK -Sybase: OK diff --git a/ext/standard/tests/strings/basename.phpt b/ext/standard/tests/strings/basename.phpt Binary files differdeleted file mode 100644 index b1ccdfdd1d..0000000000 --- a/ext/standard/tests/strings/basename.phpt +++ /dev/null diff --git a/ext/standard/tests/strings/bin2hex.phpt b/ext/standard/tests/strings/bin2hex.phpt deleted file mode 100644 index 5753a74dc0..0000000000 --- a/ext/standard/tests/strings/bin2hex.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -bin2hex() function ---POST-- ---GET-- ---FILE-- -<?php -$s = ''; -for($i=0; $i<256; $i++) { - $s .= chr($i); -} -echo bin2hex($s)."\n"; -echo bin2hex("abc")."\n"; -?> ---EXPECT-- -000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9fa0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebfc0c1c2c3c4c5c6c7c8c9cacbcccdcecfd0d1d2d3d4d5d6d7d8d9dadbdcdddedfe0e1e2e3e4e5e6e7e8e9eaebecedeeeff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff -616263 diff --git a/ext/standard/tests/strings/bug20108.phpt b/ext/standard/tests/strings/bug20108.phpt deleted file mode 100644 index 0993412500..0000000000 --- a/ext/standard/tests/strings/bug20108.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Bug #20108 (Segfault on printf statement) ---SKIPIF-- ---FILE-- -<?php - $a = "boo"; - $z = sprintf("%580.58s\n", $a); - var_dump($z); -?> ---EXPECT-- -string(581) " boo -" diff --git a/ext/standard/tests/strings/bug20169.phpt b/ext/standard/tests/strings/bug20169.phpt deleted file mode 100644 index c606578677..0000000000 --- a/ext/standard/tests/strings/bug20169.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -Bug #20169 (implode() clobbers first argument) ---FILE-- -<?php - @set_time_limit(5); - $delimiter = "|"; - - echo "delimiter: $delimiter\n"; - implode($delimiter, array("foo", "bar")); - echo "delimiter: $delimiter\n"; -?> ---EXPECT-- -delimiter: | -delimiter: | diff --git a/ext/standard/tests/strings/bug20261.phpt b/ext/standard/tests/strings/bug20261.phpt deleted file mode 100644 index 163e905a4a..0000000000 --- a/ext/standard/tests/strings/bug20261.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Bug #20261 (str_rot13() changes too much) ---FILE-- -<?php - $first = "boo"; - $second = $first; - $rot = ""; - - echo "1: ".$first."\n"; - echo "2: ".$second."\n"; - echo "3: ".$rot."\n"; - - $rot = str_rot13($second); - - echo "1: ".$first."\n"; - echo "2: ".$second."\n"; - echo "3: ".$rot."\n"; -?> ---EXPECT-- -1: boo -2: boo -3: -1: boo -2: boo -3: obb - diff --git a/ext/standard/tests/strings/bug20927.phpt b/ext/standard/tests/strings/bug20927.phpt deleted file mode 100644 index 5b7c904c65..0000000000 --- a/ext/standard/tests/strings/bug20927.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Bug #20927 (Segfault on wordwrap statement) ---SKIPIF-- ---FILE-- -<?php -$string = str_repeat("1234567890 X ", 10); -$break = str_repeat("a-very-long-break-string-to-clobber-the-heap", 8); -$linelength = 10; - -echo "Length of original string: ".strlen($string)."\n"; -echo "Length of break string: ".strlen($break)."\n"; - -var_dump(wordwrap($string, $linelength, $break, 1)); -?> ---EXPECT-- -Length of original string: 130 -Length of break string: 352 -string(6799) "1234567890a-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapXa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heap1234567890a-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapXa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heap1234567890a-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapXa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heap1234567890a-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapXa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heap1234567890a-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapXa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heap1234567890a-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapXa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heap1234567890a-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapXa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heap1234567890a-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapXa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heap1234567890a-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapXa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heap1234567890a-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapa-very-long-break-string-to-clobber-the-heapX " diff --git a/ext/standard/tests/strings/bug20934.phpt b/ext/standard/tests/strings/bug20934.phpt deleted file mode 100644 index 0d95081d54..0000000000 --- a/ext/standard/tests/strings/bug20934.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -Bug #20934 (htmlspecialchars returns latin1 from UTF-8) ---SKIPIF-- -<?php -if (!function_exists("utf8_encode") || !function_exists("utf8_decode")) { - die("SKIP Neither utf8_encode() nor utf8_decode() are available"); -} -?> ---FILE-- -<?php -$str = utf8_encode("\xe0\xe1"); -var_dump(utf8_decode($str)); -var_dump(utf8_decode(htmlspecialchars($str, ENT_COMPAT, "UTF-8"))); -?> ---EXPECT-- -string(2) "àá" -string(2) "àá" diff --git a/ext/standard/tests/strings/bug21338.phpt b/ext/standard/tests/strings/bug21338.phpt deleted file mode 100644 index c84576563e..0000000000 --- a/ext/standard/tests/strings/bug21338.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -Bug #20934 (html_entity_decode() crash when "" is passed) ---FILE-- -<?php - var_dump(html_entity_decode(NULL)); - var_dump(html_entity_decode("")); -?> ---EXPECT-- -string(0) "" -string(0) "" diff --git a/ext/standard/tests/strings/bug21453.phpt b/ext/standard/tests/strings/bug21453.phpt deleted file mode 100644 index 40d89dd1b4..0000000000 --- a/ext/standard/tests/strings/bug21453.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Bug #21453 (handling of non-encoded <) ---FILE-- -<?php -$test = " -<table> - <tr><td>first cell before < first cell after</td></tr> - <tr><td>second cell before < second cell after</td></tr> -</table>"; - - var_dump(strip_tags($test)); -?> ---EXPECT-- -string(80) " - - first cell before < first cell after - second cell before < second cell after -" diff --git a/ext/standard/tests/strings/bug21730.phpt b/ext/standard/tests/strings/bug21730.phpt deleted file mode 100644 index 8d40e204ce..0000000000 --- a/ext/standard/tests/strings/bug21730.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -Bug #21730 (*scanf "%n" conversion flag gives string instead of integer) ---FILE-- -<?php -$foo = "ABC = DEF"; -$fmt = "%s = %s %n"; -$res_a = array(); - -/* $res_a[2] is supposed to be a integer value that - * represents the number of characters consumed so far - */ -sscanf($foo, $fmt, $res_a[0], $res_a[1], $res_a[2]); - -$res_b = sscanf($foo, $fmt); - -var_dump($res_a); -var_dump($res_b); -?> ---EXPECT-- -array(3) { - [0]=> - string(3) "ABC" - [1]=> - string(3) "DEF" - [2]=> - int(9) -} -array(3) { - [0]=> - string(3) "ABC" - [1]=> - string(3) "DEF" - [2]=> - int(9) -} diff --git a/ext/standard/tests/strings/bug21744.phpt b/ext/standard/tests/strings/bug21744.phpt deleted file mode 100644 index 925dac3fa0..0000000000 --- a/ext/standard/tests/strings/bug21744.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Bug #21744 (strip_tags misses exclamation marks in alt text) ---FILE-- -<?php -$test = <<< HERE -<a href="test?test\\!!!test">test</a> -<!-- test --> -HERE; - -print strip_tags($test, ''); -print strip_tags($test, '<a>'); -?> ---EXPECT-- -test -<a href="test?test\!!!test">test</a> diff --git a/ext/standard/tests/strings/bug22008.phpt b/ext/standard/tests/strings/bug22008.phpt deleted file mode 100644 index 0965337e64..0000000000 --- a/ext/standard/tests/strings/bug22008.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Bug #22008 (strip_tags() eliminates too much) ---FILE-- -<?php -$html = <<< HERE -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> -<title>test</title> -</head> -<body> -<b>PHP!</b> -</body> -</html> - -HERE; - -echo trim(strip_tags($html, '<b>'))."\n"; -?> ---EXPECT-- -test - - -<b>PHP!</b> diff --git a/ext/standard/tests/strings/bug22187.phpt b/ext/standard/tests/strings/bug22187.phpt deleted file mode 100644 index dccaccc04d..0000000000 --- a/ext/standard/tests/strings/bug22187.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -Bug #22187 (possible crash in number_format() function) ---FILE-- -<?php - var_dump(number_format(0.0001, 1)); - var_dump(number_format(0.0001, 0)); -?> ---EXPECT-- -string(3) "0.0" -string(1) "0" diff --git a/ext/standard/tests/strings/bug22207.phpt b/ext/standard/tests/strings/bug22207.phpt deleted file mode 100644 index 1623fb8e41..0000000000 --- a/ext/standard/tests/strings/bug22207.phpt +++ /dev/null @@ -1,11 +0,0 @@ ---TEST-- -Bug #22207 (missing 0 when using the e notation in *printf functions) ---FILE-- -<?php - printf("%10.5e\n", 1.1); - var_dump(sprintf("%10.5e\n", 1.1)); -?> ---EXPECT-- -1.1000e+0 -string(17) " 1.1000e+0 -" diff --git a/ext/standard/tests/strings/bug22224.phpt b/ext/standard/tests/strings/bug22224.phpt deleted file mode 100644 index d64fc0acfc..0000000000 --- a/ext/standard/tests/strings/bug22224.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Bug #22224 (implode changes object references in array) ---INI-- -error_reporting=0 ---FILE-- -<?php -class foo { -} - - -$a = new foo(); - -$arr = array(0=>&$a, 1=>&$a); -var_dump(implode(",",$arr)); -var_dump($arr) -?> ---EXPECTF-- -string(13) "Object,Object" -array(2) { - [0]=> - &object(foo)#%d (0) { - } - [1]=> - &object(foo)#%d (0) { - } -} diff --git a/ext/standard/tests/strings/bug22227.phpt b/ext/standard/tests/strings/bug22227.phpt deleted file mode 100644 index eb980f9865..0000000000 --- a/ext/standard/tests/strings/bug22227.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -Bug #22227 (printf() field limiters broke between 4.2.3 and 4.3.0) ---FILE-- -<?php -printf("%-3.3s", "abcdef"); -print "\n"; -?> ---EXPECT-- -abc diff --git a/ext/standard/tests/strings/bug22904.phpt b/ext/standard/tests/strings/bug22904.phpt deleted file mode 100644 index 3c56e1a414..0000000000 --- a/ext/standard/tests/strings/bug22904.phpt +++ /dev/null @@ -1,30 +0,0 @@ ---TEST-- -Bug #22904 (magic mode failed for cybase with '\0') ---FILE-- -not active yet -<?php - -/* -ini_set("magic_quotes_sybase","on"); -test(); -ini_set("magic_quotes_sybase","off"); -test(); -*/ -function test(){ - $buf = 'g\g"\0g'."'"; - $slashed = addslashes($buf); - echo "$buf\n"; - echo "$slashed\n"; - echo stripslashes($slashed."\n"); -/* -g\g"\0g' -g\\g"\\0g'' -g\g"\0g' -g\g"\0g' -g\\g\"\\0g\' -g\g"\0g' -*/ -} -?> ---EXPECT-- -not active yet diff --git a/ext/standard/tests/strings/bug23650.phpt b/ext/standard/tests/strings/bug23650.phpt deleted file mode 100644 index 01dc88843d..0000000000 --- a/ext/standard/tests/strings/bug23650.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Bug #23650 (strip_tags() removes hyphens) ---FILE-- -<?php -$str = <<< HERE -1:<!-- abc - --> -2:<!doctype -- > -3: -4:<abc - def> -5:abc - def -6:</abc> - -HERE; - -echo strip_tags($str); -echo strip_tags($str, '<abc>'); -?> ---EXPECT-- -1: -2: -3: -4: -5:abc - def -6: -1: -2: -3: -4:<abc - def> -5:abc - def -6:</abc> - diff --git a/ext/standard/tests/strings/bug23894.phpt b/ext/standard/tests/strings/bug23894.phpt deleted file mode 100644 index 9cc0316a24..0000000000 --- a/ext/standard/tests/strings/bug23894.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Bug #23894 (sprintf() decimal specifiers problem) ---FILE-- -<?php -$a = -12.3456; -$test = sprintf("%04d", $a); -var_dump($test, bin2hex($test)); -$test = sprintf("% 13u", $a); -var_dump($test, bin2hex($test)); -?> ---EXPECT-- -string(4) "-012" -string(8) "2d303132" -string(13) " 4294967284" -string(26) "20202034323934393637323834" diff --git a/ext/standard/tests/strings/bug24098.phpt b/ext/standard/tests/strings/bug24098.phpt deleted file mode 100644 index 9ff51a420f..0000000000 --- a/ext/standard/tests/strings/bug24098.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -Bug #24098 (pathinfo() crash) ---SKIPIF-- -<?php if (DIRECTORY_SEPARATOR == '\\') die("skip directory separator won't match expected output"); ?> ---FILE-- -<?php - var_dump(pathinfo("/dsds.asa")); -?> ---EXPECT-- -array(3) { - ["dirname"]=> - string(1) "/" - ["basename"]=> - string(8) "dsds.asa" - ["extension"]=> - string(3) "asa" -} diff --git a/ext/standard/tests/strings/bug24208.phpt b/ext/standard/tests/strings/bug24208.phpt deleted file mode 100644 index bed28d95c5..0000000000 --- a/ext/standard/tests/strings/bug24208.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Bug #24208 (parse_str() is not working) ---FILE-- -<?php -$a = $b = $c = "oops"; -parse_str("a=1&b=2&c=3"); -var_dump($a, $b, $c); -?> ---EXPECT-- -string(1) "1" -string(1) "2" -string(1) "3" diff --git a/ext/standard/tests/strings/bug24281.phpt b/ext/standard/tests/strings/bug24281.phpt deleted file mode 100644 index 3c041d67cb..0000000000 --- a/ext/standard/tests/strings/bug24281.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Bug #24281 (str_replace count not returned if variable wasn't initialized) ---SKIPIF-- -<?php - if (version_compare(zend_version(), '2.0.0-dev', '<')) die('SKIP PHP5 functionality'); -?> ---FILE-- -<?php -$string = "He had had to have had it"; -$newstring = str_replace("had", "foo", $string, $count); -print "$count changes were made.\n"; -$count = "foo"; -$newstring = str_replace("had", "foo", $string, $count); -print "$count changes were made.\n"; -?> ---EXPECT-- -3 changes were made. -3 changes were made. diff --git a/ext/standard/tests/strings/bug24312.phpt b/ext/standard/tests/strings/bug24312.phpt deleted file mode 100644 index 5ec444dd58..0000000000 --- a/ext/standard/tests/strings/bug24312.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -Bug #24208 (base64_decode() not skipping 0xF0 - 0xFF) ---FILE-- -<?php -$data = str_repeat("a", 100); -for ($i = 0xF0; $i < 0xFF + 1; $i++) { - $enc = chunk_split(base64_encode($data), 10, chr($i)); - var_dump(base64_decode($enc)); -} -?> ---EXPECT-- -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -string(100) "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" diff --git a/ext/standard/tests/strings/bug25671.phpt b/ext/standard/tests/strings/bug25671.phpt deleted file mode 100644 index ac64790704..0000000000 --- a/ext/standard/tests/strings/bug25671.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Bug #25671 (subarrays not copied correctly) ---FILE-- -<?php - $arr = array( - "This is string one.", - "This is string two.", - array( - "This is another string.", - "This is a last string."), - "This is a last string."); - - echo serialize(str_replace("string", "strung", $arr)) . "\n"; - echo serialize(str_replace("string", "strung", $arr)) . "\n"; - echo serialize(str_replace(" ", "", $arr)) . "\n"; - echo serialize(str_replace(" ", "", $arr)) . "\n"; -?> ---EXPECT-- -a:4:{i:0;s:19:"This is strung one.";i:1;s:19:"This is strung two.";i:2;a:2:{i:0;s:23:"This is another string.";i:1;s:22:"This is a last string.";}i:3;s:22:"This is a last strung.";} -a:4:{i:0;s:19:"This is strung one.";i:1;s:19:"This is strung two.";i:2;a:2:{i:0;s:23:"This is another string.";i:1;s:22:"This is a last string.";}i:3;s:22:"This is a last strung.";} -a:4:{i:0;s:16:"Thisisstringone.";i:1;s:16:"Thisisstringtwo.";i:2;a:2:{i:0;s:23:"This is another string.";i:1;s:22:"This is a last string.";}i:3;s:18:"Thisisalaststring.";} -a:4:{i:0;s:16:"Thisisstringone.";i:1;s:16:"Thisisstringtwo.";i:2;a:2:{i:0;s:23:"This is another string.";i:1;s:22:"This is a last string.";}i:3;s:18:"Thisisalaststring.";} - diff --git a/ext/standard/tests/strings/bug25707.phpt b/ext/standard/tests/strings/bug25707.phpt deleted file mode 100644 index 4954fb1ae5..0000000000 --- a/ext/standard/tests/strings/bug25707.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Bug #25707 (html_entity_decode over-decodes &lt;) ---FILE-- -<?php -var_dump(html_entity_decode("&lt;", ENT_COMPAT, 'ISO-8859-1')); -var_dump(html_entity_decode("&#38;", ENT_COMPAT, 'ISO-8859-1')); -var_dump(html_entity_decode("&#38;lt;", ENT_COMPAT, 'ISO-8859-1')); -?> ---EXPECT-- -string(4) "<" -string(5) "&" -string(8) "&lt;" diff --git a/ext/standard/tests/strings/bug26817.phpt b/ext/standard/tests/strings/bug26817.phpt deleted file mode 100644 index 228348708c..0000000000 --- a/ext/standard/tests/strings/bug26817.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -Bug #26817 (http_build_query() did not handle private & protected object properties) ---FILE-- -<?php -class test { - protected $foo; - private $bar; - public $test; - - function foo() - { - $this->bar = 'meuh'; - $this->foo = 'lala'; - $this->test = 'test'; - - var_dump(http_build_query($this)); - } -} - -$obj = new test(); -$obj->foo(); -var_dump(http_build_query($obj)); -?> ---EXPECT-- -string(27) "foo=lala&bar=meuh&test=test" -string(9) "test=test" diff --git a/ext/standard/tests/strings/bug26819.phpt b/ext/standard/tests/strings/bug26819.phpt deleted file mode 100644 index 4a53539434..0000000000 --- a/ext/standard/tests/strings/bug26819.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -Bug #26819 (http_build_query() crash on empty output) ---FILE-- -<?php -$a = array(); -var_dump(http_build_query($a)); -?> ---EXPECT-- -NULL diff --git a/ext/standard/tests/strings/bug26878.phpt b/ext/standard/tests/strings/bug26878.phpt deleted file mode 100644 index 602f710c83..0000000000 --- a/ext/standard/tests/strings/bug26878.phpt +++ /dev/null @@ -1,9 +0,0 @@ ---TEST-- -Bug #26878 (problem with multiple references to the same variable with different types) ---FILE-- -<?php - printf('Int: %1$d and as string: %1$s', 'some string'); - echo "\n"; -?> ---EXPECT-- -Int: 0 and as string: some string diff --git a/ext/standard/tests/strings/bug26973.phpt b/ext/standard/tests/strings/bug26973.phpt deleted file mode 100644 index ef286e2c43..0000000000 --- a/ext/standard/tests/strings/bug26973.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -Bug #26973 (*printf() '+' modifier problem) ---FILE-- -<?php - -printf("%+05d\n", 200); -printf("%+05d\n", -200); -printf("%+05f\n", 200); -printf("%+05f\n", -200); -printf("%+05u\n", 200); -printf("%+05u\n", -200); -echo "---\n"; -printf("%05d\n", 200); -printf("%05d\n", -200); -printf("%05f\n", 200); -printf("%05f\n", -200); -printf("%05u\n", 200); -printf("%05u\n", -200); - -?> ---EXPECT-- -+0200 --0200 -+0200.000000 --0200.000000 -00200 -4294967096 ---- -00200 --0200 -00200.000000 --0200.000000 -00200 -4294967096 diff --git a/ext/standard/tests/strings/chr_ord.phpt b/ext/standard/tests/strings/chr_ord.phpt deleted file mode 100644 index 266f61be04..0000000000 --- a/ext/standard/tests/strings/chr_ord.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -chr() and ord() functions ---POST-- ---GET-- ---FILE-- -<?php -echo "Testing ord() & chr()..."; -for($i=0; $i<256; $i++) echo !ord(chr($i)) == $i; -echo " done"; -?> ---EXPECT-- -Testing ord() & chr()... done diff --git a/ext/standard/tests/strings/chunk_split.phpt b/ext/standard/tests/strings/chunk_split.phpt deleted file mode 100644 index 6c0f3fac84..0000000000 --- a/ext/standard/tests/strings/chunk_split.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -chunk_split() function ---POST-- ---GET-- ---FILE-- -<?php -echo chunk_split('abc', 1, '-')."\n"; -echo chunk_split('foooooooooooooooo', 5)."\n"; -echo chunk_split(str_repeat('X', 2*76))."\n"; -?> ---EXPECT-- -a-b-c- -foooo -ooooo -ooooo -oo - -XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX diff --git a/ext/standard/tests/strings/count_chars.phpt b/ext/standard/tests/strings/count_chars.phpt deleted file mode 100644 index 0006b4232f..0000000000 --- a/ext/standard/tests/strings/count_chars.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -count_chars() function ---POST-- ---GET-- ---FILE-- -<?php -$s = "het leven is net erwtensoep - je kunt er geen touw aan vastknopen"; -for($i=0; $i<3; $i++) { - echo implode(count_chars($s, $i))."\n"; -} -echo $a = count_chars($s, 3), "\n"; -echo (int) strlen(count_chars($s, 4)) == 256-strlen($a),"\n"; - -?> ---EXPECT-- -000000000000000000000000000000001200000000000010000000000000000000000000000000000000000000000000003000120111121083202362220000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -121312111121832236222 -000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - -aeghijklnoprstuvw -1 diff --git a/ext/standard/tests/strings/crc32.phpt b/ext/standard/tests/strings/crc32.phpt deleted file mode 100644 index 8074c5e6f9..0000000000 --- a/ext/standard/tests/strings/crc32.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -crc32() function ---POST-- ---GET-- ---FILE-- -<?php -$input = array("foo", "bar", "baz", "grldsajkopallkjasd"); -foreach($input AS $i) { - printf("%u\n", crc32($i)); -} -?> ---EXPECT-- -2356372769 -1996459178 -2015626392 -824412087 diff --git a/ext/standard/tests/strings/crypt.phpt b/ext/standard/tests/strings/crypt.phpt deleted file mode 100644 index 5368178e11..0000000000 --- a/ext/standard/tests/strings/crypt.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -crypt() function ---SKIPIF-- -<?php -if (!function_exists('crypt')) { - die("SKIP crypt() is not available"); -} -?> ---FILE-- -<?php - -$str = 'rasmuslerdorf'; -$salt1 = 'rl'; -$res_1 = 'rl.3StKT.4T8M'; -$salt2 = '_J9..rasm'; -$res_2 = '_J9..rasmBYk8r9AiWNc'; -$salt3 = '$1$rasmusle$'; -$res_3 = '$1$rasmusle$rISCgZzpwk3UhDidwXvin0'; -$salt4 = '$2a$07$rasmuslerd............'; -$res_4 = '$2a$07$rasmuslerd............nIdrcHdxcUxWomQX9j6kvERCFjTg7Ra'; - -echo (CRYPT_STD_DES) ? ((crypt($str, $salt1) === $res_1) ? 'STD' : 'STD - ERROR') : 'STD', "\n"; -echo (CRYPT_EXT_DES) ? ((crypt($str, $salt2) === $res_2) ? 'EXT' : 'EXT - ERROR') : 'EXT', "\n"; -echo (CRYPT_MD5) ? ((crypt($str, $salt3) === $res_3) ? 'MD5' : 'MD5 - ERROR') : 'MD5', "\n"; -echo (CRYPT_BLOWFISH) ? ((crypt($str, $salt4) === $res_4) ? 'BLO' : 'BLO - ERROR') : 'BLO', "\n"; - -?> ---EXPECT-- -STD -EXT -MD5 -BLO diff --git a/ext/standard/tests/strings/explode.phpt b/ext/standard/tests/strings/explode.phpt deleted file mode 100644 index 94d947fc4f..0000000000 --- a/ext/standard/tests/strings/explode.phpt +++ /dev/null @@ -1,116 +0,0 @@ ---TEST-- -explode() function ---POST-- ---GET-- ---INI-- -error_reporting=2047 ---FILE-- -<?php -/* From http://bugs.php.net/19865 */ -echo md5(var_export(explode("\1", "a". chr(1). "b". chr(0). "d" . chr(1) . "f" . chr(1). "1" . chr(1) . "d"), TRUE)); -echo "\n"; -var_dump(@explode("", "")); -var_dump(@explode("", NULL)); -var_dump(@explode(NULL, "")); -var_dump(@explode("a", "")); -var_dump(@explode("a", "a")); -var_dump(@explode("a", NULL)); -var_dump(@explode(NULL, a)); -var_dump(@explode("abc", "acb")); -var_dump(@explode("somestring", "otherstring")); -var_dump(@explode("a", "aaaaaa")); -var_dump(@explode("==", str_repeat("-=".ord(0)."=-", 10))); -var_dump(@explode("=", str_repeat("-=".ord(0)."=-", 10))); -?> ---EXPECTF-- -26d4e18734cb2582df5055e2175223df -bool(false) -bool(false) -bool(false) -array(1) { - [0]=> - string(0) "" -} -array(2) { - [0]=> - string(0) "" - [1]=> - string(0) "" -} -array(1) { - [0]=> - string(0) "" -} -bool(false) -array(1) { - [0]=> - string(3) "acb" -} -array(1) { - [0]=> - string(11) "otherstring" -} -array(7) { - [0]=> - string(0) "" - [1]=> - string(0) "" - [2]=> - string(0) "" - [3]=> - string(0) "" - [4]=> - string(0) "" - [5]=> - string(0) "" - [6]=> - string(0) "" -} -array(1) { - [0]=> - string(60) "-=48=--=48=--=48=--=48=--=48=--=48=--=48=--=48=--=48=--=48=-" -} -array(21) { - [0]=> - string(1) "-" - [1]=> - string(2) "48" - [2]=> - string(2) "--" - [3]=> - string(2) "48" - [4]=> - string(2) "--" - [5]=> - string(2) "48" - [6]=> - string(2) "--" - [7]=> - string(2) "48" - [8]=> - string(2) "--" - [9]=> - string(2) "48" - [10]=> - string(2) "--" - [11]=> - string(2) "48" - [12]=> - string(2) "--" - [13]=> - string(2) "48" - [14]=> - string(2) "--" - [15]=> - string(2) "48" - [16]=> - string(2) "--" - [17]=> - string(2) "48" - [18]=> - string(2) "--" - [19]=> - string(2) "48" - [20]=> - string(1) "-" -} diff --git a/ext/standard/tests/strings/htmlentities.phpt b/ext/standard/tests/strings/htmlentities.phpt deleted file mode 100644 index 743651ecad..0000000000 --- a/ext/standard/tests/strings/htmlentities.phpt +++ /dev/null @@ -1,19 +0,0 @@ ---TEST-- -HTML entities ---INI-- -output_handler= ---FILE-- -<?php -setlocale (LC_CTYPE, "C"); -$sc_encoded = htmlspecialchars ("<>\"&åÄ\n"); -echo $sc_encoded; -$ent_encoded = htmlentities ("<>\"&åÄ\n"); -echo $ent_encoded; -echo html_entity_decode($sc_encoded); -echo html_entity_decode($ent_encoded); -?> ---EXPECT-- -<>"&åÄ -<>"&åÄ -<>"&åÄ -<>"&åÄ diff --git a/ext/standard/tests/strings/htmlentities01.phpt b/ext/standard/tests/strings/htmlentities01.phpt deleted file mode 100644 index 4ab49472d1..0000000000 --- a/ext/standard/tests/strings/htmlentities01.phpt +++ /dev/null @@ -1,13 +0,0 @@ ---TEST-- -htmlentities() test 1 (cp1252) ---INI-- -output_handler= -mbstring.internal_encoding=pass ---FILE-- -<?php - var_dump(htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, 'cp1252')); - var_dump(htmlentities("\x80\xa2\xa3\xa4\xa5", ENT_QUOTES, 'cp1252')); -?> ---EXPECT-- -string(28) "‚†™Ÿ" -string(32) "€¢£¤¥" diff --git a/ext/standard/tests/strings/htmlentities02.phpt b/ext/standard/tests/strings/htmlentities02.phpt deleted file mode 100644 index 666c4f650b..0000000000 --- a/ext/standard/tests/strings/htmlentities02.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15) ---SKIPIF-- -<?php -$result = (bool)setlocale(LC_CTYPE, "fr_FR.ISO-8859-15", "fr_FR.ISO8859-15"); -if (!$result || preg_match('/ISO/i', setlocale(LC_CTYPE, 0)) == 0) { - die("skip setlocale() failed\n"); -} -echo "warn possibly braindead libc\n"; -?> ---INI-- -output_handler= -default_charset= -mbstring.internal_encoding=none ---FILE-- -<?php - setlocale( LC_CTYPE, "fr_FR.ISO-8859-15", "fr_FR.ISO8859-15" ); - var_dump(htmlentities("\xbc\xbd\xbe", ENT_QUOTES, '')); -?> ---EXPECT-- -string(20) "ŒœŸ" diff --git a/ext/standard/tests/strings/htmlentities03.phpt b/ext/standard/tests/strings/htmlentities03.phpt deleted file mode 100644 index 7e933544fe..0000000000 --- a/ext/standard/tests/strings/htmlentities03.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -htmlentities() test 3 (setlocale / de_DE.ISO-8859-1) ---SKIPIF-- -<?php -$result = (bool)setlocale(LC_CTYPE, "de_DE.ISO-8859-1", "de_DE.ISO8859-1"); -if (!$result || preg_match('/ISO/i', setlocale(LC_CTYPE, 0)) == 0) { - die("skip setlocale() failed\n"); -} -?> ---INI-- -output_handler= -default_charset= -mbstring.internal_encoding=none ---FILE-- -<?php - setlocale( LC_CTYPE, "de_DE.ISO-8859-1", "de_DE.ISO8859-1"); - var_dump(htmlentities("\xe4\xf6\xfc", ENT_QUOTES, '')); -?> ---EXPECT-- -string(18) "äöü" diff --git a/ext/standard/tests/strings/htmlentities04.phpt b/ext/standard/tests/strings/htmlentities04.phpt deleted file mode 100644 index 8e362d073c..0000000000 --- a/ext/standard/tests/strings/htmlentities04.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -htmlentities() test 4 (setlocale / ja_JP.EUC-JP) ---SKIPIF-- -<?php -$result = (bool)setlocale(LC_CTYPE, "ja_JP.EUC-JP", "ja_JP.eucJP"); -if (!$result || preg_match('/EUC[^a-zA-Z]*JP/i', setlocale(LC_CTYPE, 0)) == 0) { - die("skip setlocale() failed\n"); -} -?> ---INI-- -output_handler= -default_charset= -mbstring.internal_encoding=none ---FILE-- -<?php - setlocale( LC_CTYPE, "ja_JP.EUC-JP", "ja_JP.eucJP" ); - var_dump(htmlentities("\xa1\xa2\xa1\xa3\xa1\xa4", ENT_QUOTES, '')); -?> ---EXPECT-- -string(6) "¡¢¡£¡¤" diff --git a/ext/standard/tests/strings/htmlentities05.phpt b/ext/standard/tests/strings/htmlentities05.phpt deleted file mode 100644 index 779cf289b0..0000000000 --- a/ext/standard/tests/strings/htmlentities05.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -htmlentities() test 5 (mbstring / cp1252) ---INI-- -output_handler= ---SKIPIF-- -<?php - extension_loaded("mbstring") or die("skip mbstring not available\n"); - mb_internal_encoding('cp1252'); - $php_errormsg = NULL; - @htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, ''); - if ($php_errormsg) { - die("skip cp1252 chracter set is not supported on this platform.\n"); - } -?> ---FILE-- -<?php - mb_internal_encoding('cp1252'); - print mb_internal_encoding()."\n"; - var_dump(htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, '')); - var_dump(htmlentities("\x80\xa2\xa3\xa4\xa5", ENT_QUOTES, '')); -?> ---EXPECT-- -Windows-1252 -string(28) "‚†™Ÿ" -string(32) "€¢£¤¥" diff --git a/ext/standard/tests/strings/htmlentities06.phpt b/ext/standard/tests/strings/htmlentities06.phpt deleted file mode 100644 index 44d1466da9..0000000000 --- a/ext/standard/tests/strings/htmlentities06.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -htmlentities() test 6 (mbstring / ISO-8859-15) ---INI-- -output_handler= ---SKIPIF-- -<?php - extension_loaded("mbstring") or die("skip mbstring not available\n"); - @mb_internal_encoding('ISO-8859-15'); - @htmlentities("\xbc\xbd\xbe", ENT_QUOTES, ''); - if (@$php_errormsg) { - die("skip ISO-8859-15 chracter set is not supported on this platform.\n"); - } -?> ---FILE-- -<?php - mb_internal_encoding('ISO-8859-15'); - print mb_internal_encoding()."\n"; - var_dump(htmlentities("\xbc\xbd\xbe", ENT_QUOTES, '')); -?> ---EXPECT-- -ISO-8859-15 -string(20) "ŒœŸ" diff --git a/ext/standard/tests/strings/htmlentities07.phpt b/ext/standard/tests/strings/htmlentities07.phpt deleted file mode 100644 index efd06f08ad..0000000000 --- a/ext/standard/tests/strings/htmlentities07.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -htmlentities() test 7 (mbstring / ISO-8859-1) ---INI-- -output_handler= ---SKIPIF-- -<?php - extension_loaded("mbstring") or die("skip mbstring not available\n"); - mb_internal_encoding('ISO-8859-1'); - $php_errormsg = NULL; - @htmlentities("\xe4\xf6\xfc", ENT_QUOTES, ''); - if ($php_errormsg) { - die("skip ISO-8859-1 chracter set is not supported on this platform.\n"); - } -?> ---FILE-- -<?php - mb_internal_encoding('ISO-8859-1'); - print mb_internal_encoding()."\n"; - var_dump(htmlentities("\xe4\xf6\xfc", ENT_QUOTES, '')); -?> ---EXPECT-- -ISO-8859-1 -string(18) "äöü" diff --git a/ext/standard/tests/strings/htmlentities08.phpt b/ext/standard/tests/strings/htmlentities08.phpt deleted file mode 100644 index 0f8f912f27..0000000000 --- a/ext/standard/tests/strings/htmlentities08.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -htmlentities() test 8 (mbstring / EUC-JP) ---INI-- -output_handler= ---SKIPIF-- -<?php - extension_loaded("mbstring") or die("skip mbstring not available\n"); - mb_internal_encoding('EUC-JP'); - $php_errormsg = NULL; - @htmlentities("\xa1\xa2\xa1\xa3\xa1\xa4", ENT_QUOTES, ''); - if ($php_errormsg) { - die("skip EUC-JP chracter set is not supported on this platform.\n"); - } -?> ---FILE-- -<?php - mb_internal_encoding('EUC-JP'); - print mb_internal_encoding()."\n"; - var_dump(htmlentities("\xa1\xa2\xa1\xa3\xa1\xa4", ENT_QUOTES, '')); -?> ---EXPECT-- -EUC-JP -string(6) "¡¢¡£¡¤" diff --git a/ext/standard/tests/strings/htmlentities09.phpt b/ext/standard/tests/strings/htmlentities09.phpt deleted file mode 100644 index 4c6ef60c74..0000000000 --- a/ext/standard/tests/strings/htmlentities09.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -htmlentities() test 9 (mbstring / Shift_JIS) ---INI-- -output_handler= ---SKIPIF-- -<?php - extension_loaded("mbstring") or die("skip mbstring not available\n"); - mb_internal_encoding('Shift_JIS'); - $php_errormsg = NULL; - @htmlentities("\x81\x41\x81\x42\x81\x43", ENT_QUOTES, ''); - if ($php_errormsg) { - die("skip Shift_JIS chracter set is not supported on this platform.\n"); - } -?> ---FILE-- -<?php - mb_internal_encoding('Shift_JIS'); - print mb_internal_encoding()."\n"; - var_dump(htmlentities("\x81\x41\x81\x42\x81\x43", ENT_QUOTES, '')); -?> ---EXPECT-- -SJIS -string(6) "ABC" diff --git a/ext/standard/tests/strings/htmlentities10.phpt b/ext/standard/tests/strings/htmlentities10.phpt deleted file mode 100644 index ee5099cf34..0000000000 --- a/ext/standard/tests/strings/htmlentities10.phpt +++ /dev/null @@ -1,16 +0,0 @@ ---TEST-- -htmlentities() test 10 (default_charset / cp1252) ---INI-- -output_handler= -mbstring.internal_encoding=pass -default_charset=cp1252 ---FILE-- -<?php - print ini_get('default_charset')."\n"; - var_dump(htmlentities("\x82\x86\x99\x9f", ENT_QUOTES, '')); - var_dump(htmlentities("\x80\xa2\xa3\xa4\xa5", ENT_QUOTES, '')); -?> ---EXPECT-- -cp1252 -string(28) "‚†™Ÿ" -string(32) "€¢£¤¥" diff --git a/ext/standard/tests/strings/htmlentities11.phpt b/ext/standard/tests/strings/htmlentities11.phpt deleted file mode 100644 index 62b6aec7c8..0000000000 --- a/ext/standard/tests/strings/htmlentities11.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -htmlentities() test 11 (default_charset / ISO-8859-15) ---INI-- -output_handler= -mbstring.internal_encoding=pass -default_charset=ISO-8859-15 ---FILE-- -<?php - print ini_get('default_charset')."\n"; - var_dump(htmlentities("\xbc\xbd\xbe", ENT_QUOTES, '')); -?> ---EXPECT-- -ISO-8859-15 -string(20) "ŒœŸ" diff --git a/ext/standard/tests/strings/htmlentities12.phpt b/ext/standard/tests/strings/htmlentities12.phpt deleted file mode 100644 index 826706680d..0000000000 --- a/ext/standard/tests/strings/htmlentities12.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -htmlentities() test 12 (default_charset / ISO-8859-1) ---INI-- -output_handler= -mbstring.internal_encoding=pass -default_charset=ISO-8859-1 ---FILE-- -<?php - print ini_get('default_charset')."\n"; - var_dump(htmlentities("\xe4\xf6\xfc", ENT_QUOTES, '')); -?> ---EXPECT-- -ISO-8859-1 -string(18) "äöü" diff --git a/ext/standard/tests/strings/htmlentities13.phpt b/ext/standard/tests/strings/htmlentities13.phpt deleted file mode 100644 index 2c559916e9..0000000000 --- a/ext/standard/tests/strings/htmlentities13.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -htmlentities() test 13 (default_charset / EUC-JP) ---INI-- -output_handler= -mbstring.internal_encoding=pass -default_charset=EUC-JP ---FILE-- -<?php - print ini_get('default_charset')."\n"; - var_dump(htmlentities("\xa1\xa2\xa1\xa3\xa1\xa4", ENT_QUOTES, '')); -?> ---EXPECT-- -EUC-JP -string(6) "¡¢¡£¡¤" diff --git a/ext/standard/tests/strings/htmlentities14.phpt b/ext/standard/tests/strings/htmlentities14.phpt deleted file mode 100644 index 9190d26515..0000000000 --- a/ext/standard/tests/strings/htmlentities14.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -htmlentities() test 14 (default_charset / Shift_JIS) ---INI-- -output_handler= -mbstring.internal_encoding=pass -default_charset=Shift_JIS ---FILE-- -<?php - print ini_get('default_charset')."\n"; - var_dump(htmlentities("\x81\x41\x81\x42\x81\x43", ENT_QUOTES, '')); -?> ---EXPECT-- -Shift_JIS -string(6) "ABC" diff --git a/ext/standard/tests/strings/htmlentities15.phpt b/ext/standard/tests/strings/htmlentities15.phpt deleted file mode 100644 index a0e534aba0..0000000000 --- a/ext/standard/tests/strings/htmlentities15.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -htmlentities() test 15 (setlocale / KOI8-R) ---INI-- -output_handler= -default_charset= -mbstring.internal_encoding=none ---SKIPIF-- -<?php -$result = (bool)setlocale(LC_CTYPE, "ru_RU.koi8r"); -if (!$result || preg_match('/koi8/i', setlocale(LC_CTYPE, 0)) == 0) { - die("skip setlocale() failed\n"); -} -?> ---FILE-- -<?php -setlocale(LC_CTYPE, "ru_RU.koi8r"); -$str = "ÒÏÓËÏÛÎÙÊ"; -var_dump($str, htmlentities($str, ENT_QUOTES, '')); -?> ---EXPECT-- -string(9) "ÒÏÓËÏÛÎÙÊ" -string(63) "роскошный" diff --git a/ext/standard/tests/strings/htmlentities16.phpt b/ext/standard/tests/strings/htmlentities16.phpt deleted file mode 100644 index 0f945280b5..0000000000 --- a/ext/standard/tests/strings/htmlentities16.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -htmlentities() test 16 (mbstring / cp1251) ---INI-- -output_handler= ---SKIPIF-- -<?php - extension_loaded("mbstring") or die("skip mbstring not available\n"); - if (!@mb_internal_encoding('cp1251') || - @htmlentities("\x88\xa9\xd2\xcf\xd3\xcb\xcf\xdb\xce\xd9\xca", ENT_QUOTES, '') == '') { - die("skip cp1251 character set is not available in this build.\n"); - } -?> ---FILE-- -<?php -mb_internal_encoding('cp1251'); -$str = "\x88\xa9\xf0\xee\xf1\xea\xee\xf8\xed\xfb\xe9"; -var_dump($str, htmlentities($str, ENT_QUOTES, '')); -?> ---EXPECT-- -string(11) "ˆ©ðîñêîøíûé" -string(75) "€©роскошный" diff --git a/ext/standard/tests/strings/implode.phpt b/ext/standard/tests/strings/implode.phpt deleted file mode 100644 index 66d6c435ae..0000000000 --- a/ext/standard/tests/strings/implode.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -implode() function ---POST-- ---GET-- ---INI-- -error_reporting=2047 -log_errors=0 -display_errors=0 -track_errors=1 ---FILE-- -<?php -echo implode(array())."\n"; -echo implode('nothing', array())."\n"; -echo implode(array('foo', 'bar', 'baz'))."\n"; -echo implode(':', array('foo', 'bar', 'baz'))."\n"; -echo implode(':', array('foo', array('bar', 'baz'), 'burp'))."\n"; -echo $php_errormsg."\n"; -?> ---EXPECTF-- - - -foobarbaz -foo:bar:baz -foo:Array:burp -Array to string conversion diff --git a/ext/standard/tests/strings/md5.phpt b/ext/standard/tests/strings/md5.phpt deleted file mode 100644 index 32dba03609..0000000000 --- a/ext/standard/tests/strings/md5.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -md5() with ASCII output ---FILE-- -<?php -echo md5("")."\n"; -echo md5("a")."\n"; -echo md5("abc")."\n"; -echo md5("message digest")."\n"; -echo md5("abcdefghijklmnopqrstuvwxyz")."\n"; -echo md5("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")."\n"; -echo md5("12345678901234567890123456789012345678901234567890123456789012345678901234567890")."\n"; -?> ---EXPECT-- -d41d8cd98f00b204e9800998ecf8427e -0cc175b9c0f1b6a831c399e269772661 -900150983cd24fb0d6963f7d28e17f72 -f96b697d7cb7938d525a2f31aaf161d0 -c3fcd3d76192e4007dfb496cca67e13b -d174ab98d277d9f5a5611c2c9f419d9f -57edf4a22be3c955ac49da2e2107b67a diff --git a/ext/standard/tests/strings/md5raw.phpt b/ext/standard/tests/strings/md5raw.phpt deleted file mode 100644 index 8f71ea6d0e..0000000000 --- a/ext/standard/tests/strings/md5raw.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -md5() with RAW output ---FILE-- -<?php -echo bin2hex(md5("", TRUE))."\n"; -echo bin2hex(md5("a", TRUE))."\n"; -echo bin2hex(md5("abc", TRUE))."\n"; -echo bin2hex(md5("message digest", TRUE))."\n"; -echo bin2hex(md5("abcdefghijklmnopqrstuvwxyz", TRUE))."\n"; -echo bin2hex(md5("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", TRUE))."\n"; -echo bin2hex(md5("12345678901234567890123456789012345678901234567890123456789012345678901234567890", TRUE))."\n"; -?> ---EXPECT-- -d41d8cd98f00b204e9800998ecf8427e -0cc175b9c0f1b6a831c399e269772661 -900150983cd24fb0d6963f7d28e17f72 -f96b697d7cb7938d525a2f31aaf161d0 -c3fcd3d76192e4007dfb496cca67e13b -d174ab98d277d9f5a5611c2c9f419d9f -57edf4a22be3c955ac49da2e2107b67a diff --git a/ext/standard/tests/strings/nl2br.phpt b/ext/standard/tests/strings/nl2br.phpt deleted file mode 100644 index 63801afb66..0000000000 --- a/ext/standard/tests/strings/nl2br.phpt +++ /dev/null @@ -1,62 +0,0 @@ ---TEST-- -nl2br() function ---POST-- ---GET-- ---FILE-- -<?php - var_dump(nl2br("test")); - var_dump(nl2br("")); - var_dump(nl2br(NULL)); - var_dump(nl2br("\r\n")); - var_dump(nl2br("\n")); - var_dump(nl2br("\r")); - var_dump(nl2br("\n\r")); - - var_dump(nl2br("\n\r\r\n\r\r\r\r")); - var_dump(nl2br("\n\r\n\n\r\n\r\r\n\r\n")); - var_dump(nl2br("\n\r\n\n\n\n\r\r\r\r\n\r")); - -?> ---EXPECT-- -string(4) "test" -string(0) "" -string(0) "" -string(8) "<br /> -" -string(7) "<br /> -" -string(7) "<br /> -" -string(8) "<br /> - -" -string(44) "<br /> - -<br /> -<br /> -<br /> -<br /> -<br /> -" -string(47) "<br /> - -<br /> -<br /> - -<br /> - -<br /> -<br /> -" -string(66) "<br /> - -<br /> -<br /> -<br /> -<br /> - -<br /> -<br /> -<br /> -<br /> -" diff --git a/ext/standard/tests/strings/sha1.phpt b/ext/standard/tests/strings/sha1.phpt deleted file mode 100644 index c405eedde5..0000000000 --- a/ext/standard/tests/strings/sha1.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -sha1() with ASCII output ---FILE-- -<?php -echo sha1("abc")."\n"; -echo sha1("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq")."\n"; -echo sha1("a")."\n"; -echo sha1("0123456701234567012345670123456701234567012345670123456701234567")."\n"; -?> ---EXPECT-- -a9993e364706816aba3e25717850c26c9cd0d89d -84983e441c3bd26ebaae4aa1f95129e5e54670f1 -86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 -e0c094e867ef46c350ef54a7f59dd60bed92ae83 diff --git a/ext/standard/tests/strings/sha1raw.phpt b/ext/standard/tests/strings/sha1raw.phpt deleted file mode 100644 index 6777cab3ee..0000000000 --- a/ext/standard/tests/strings/sha1raw.phpt +++ /dev/null @@ -1,14 +0,0 @@ ---TEST-- -sha1() with RAW output ---FILE-- -<?php -echo bin2hex(sha1("abc", TRUE))."\n"; -echo bin2hex(sha1("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", TRUE))."\n"; -echo bin2hex(sha1("a", TRUE))."\n"; -echo bin2hex(sha1("0123456701234567012345670123456701234567012345670123456701234567", TRUE))."\n"; -?> ---EXPECT-- -a9993e364706816aba3e25717850c26c9cd0d89d -84983e441c3bd26ebaae4aa1f95129e5e54670f1 -86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 -e0c094e867ef46c350ef54a7f59dd60bed92ae83 diff --git a/ext/standard/tests/strings/str_repeat.phpt b/ext/standard/tests/strings/str_repeat.phpt deleted file mode 100644 index 406e811af7..0000000000 --- a/ext/standard/tests/strings/str_repeat.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -str_repeat() function ---POST-- ---GET-- ---FILE-- -<?php -$input = array('a', 'foo', 'barbazbax'); -foreach($input AS $i) { - for($n=0; $n<5; $n++) { - echo str_repeat($i, $n)."\n"; - } -} -?> ---EXPECT-- - -a -aa -aaa -aaaa - -foo -foofoo -foofoofoo -foofoofoofoo - -barbazbax -barbazbaxbarbazbax -barbazbaxbarbazbaxbarbazbax -barbazbaxbarbazbaxbarbazbaxbarbazbax diff --git a/ext/standard/tests/strings/str_shuffle.phpt b/ext/standard/tests/strings/str_shuffle.phpt deleted file mode 100644 index 32f387287b..0000000000 --- a/ext/standard/tests/strings/str_shuffle.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Testing str_shuffle. ---FILE-- -<?php -/* Do not change this test it is a README.TESTING example. */ -$s = '123'; -var_dump(str_shuffle($s)); -var_dump($s); -?> ---EXPECTF-- -string(3) %s -string(3) "123"
\ No newline at end of file diff --git a/ext/standard/tests/strings/strcspn.phpt b/ext/standard/tests/strings/strcspn.phpt deleted file mode 100644 index 88bcee5c19..0000000000 --- a/ext/standard/tests/strings/strcspn.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Test strcspn() behavior ---FILE-- -<?php -$a = "22222222aaaa bbb1111 cccc"; -$b = "1234"; -var_dump($a); -var_dump($b); -var_dump(strcspn($a,$b)); -var_dump(strcspn($a,$b,9)); -var_dump(strcspn($a,$b,9,6)); -?> ---EXPECT-- -string(25) "22222222aaaa bbb1111 cccc" -string(4) "1234" -int(0) -int(7) -int(6) diff --git a/ext/standard/tests/strings/strings001.phpt b/ext/standard/tests/strings/strings001.phpt deleted file mode 100644 index 87f8489b8a..0000000000 --- a/ext/standard/tests/strings/strings001.phpt +++ /dev/null @@ -1,12 +0,0 @@ ---TEST-- -Test whether strstr() and strrchr() are binary safe. ---FILE-- -<?php -/* Do not change this test it is a README.TESTING example. */ -$s = "alabala nica".chr(0)."turska panica"; -var_dump(strstr($s, "nic")); -var_dump(strrchr($s," nic")); -?> ---EXPECTREGEX-- -string\(18\) \"nica\x00turska panica\" -string\(19\) \" nica\x00turska panica\" diff --git a/ext/standard/tests/strings/strip_tags.phpt b/ext/standard/tests/strings/strip_tags.phpt deleted file mode 100644 index 9c55bc6465..0000000000 --- a/ext/standard/tests/strings/strip_tags.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -strip_tags() function ---POST-- ---GET-- ---FILE-- -<?php - echo strip_tags('NEAT <? cool < blah ?> STUFF'); - echo "\n"; - echo strip_tags('NEAT <? cool > blah ?> STUFF'); - echo "\n"; - echo strip_tags('NEAT <!-- cool < blah --> STUFF'); - echo "\n"; - echo strip_tags('NEAT <!-- cool > blah --> STUFF'); - echo "\n"; - echo strip_tags('NEAT <? echo \"\\\"\"?> STUFF'); - echo "\n"; - echo strip_tags('NEAT <? echo \'\\\'\'?> STUFF'); - echo "\n"; - echo strip_tags('TESTS ?!!?!?!!!?!!'); - echo "\n"; -?> ---EXPECT-- -NEAT STUFF -NEAT STUFF -NEAT STUFF -NEAT STUFF -NEAT STUFF -NEAT STUFF -TESTS ?!!?!?!!!?!! diff --git a/ext/standard/tests/strings/strpos.phpt b/ext/standard/tests/strings/strpos.phpt deleted file mode 100644 index 7a9af70940..0000000000 --- a/ext/standard/tests/strings/strpos.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -strpos() function ---POST-- ---GET-- ---FILE-- -<?php - var_dump(strpos("test string", "test")); - var_dump(strpos("test string", "string")); - var_dump(strpos("test string", "strin")); - var_dump(strpos("test string", "t s")); - var_dump(strpos("test string", "g")); - var_dump(strpos("te".chr(0)."st", chr(0))); - var_dump(strpos("tEst", "test")); - var_dump(strpos("teSt", "test")); - var_dump(@strpos("", "")); - var_dump(@strpos("a", "")); - var_dump(@strpos("", "a")); - var_dump(@strpos("\\\\a", "\\a")); -?> ---EXPECT-- -int(0) -int(5) -int(5) -int(3) -int(10) -int(2) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(1) diff --git a/ext/standard/tests/strings/strrev.phpt b/ext/standard/tests/strings/strrev.phpt deleted file mode 100644 index 6eb892b135..0000000000 --- a/ext/standard/tests/strings/strrev.phpt +++ /dev/null @@ -1,21 +0,0 @@ ---TEST-- -strrev() function ---POST-- ---GET-- ---FILE-- -<?php - $i = 0; - $str = ''; - - while ($i<256) { - $str .= chr($i++); - } - - var_dump(md5(strrev($str))); - var_dump(strrev(NULL)); - var_dump(strrev("")); -?> ---EXPECT-- -string(32) "ec6df70f2569891eae50321a9179eb82" -string(0) "" -string(0) "" diff --git a/ext/standard/tests/strings/strripos.phpt b/ext/standard/tests/strings/strripos.phpt deleted file mode 100644 index c9c6eae7e3..0000000000 --- a/ext/standard/tests/strings/strripos.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -strripos() function ---POST-- ---GET-- ---FILE-- -<?php - var_dump(strripos("test test string", "test")); - var_dump(strripos("test string sTring", "string")); - var_dump(strripos("test strip string strand", "str")); - var_dump(strripos("I am what I am and that's all what I am", "am", -3)); - var_dump(strripos("test string", "g")); - var_dump(strripos("te".chr(0)."st", chr(0))); - var_dump(strripos("tEst", "test")); - var_dump(strripos("teSt", "test")); - var_dump(@strripos("foo", "f", 1)); - var_dump(@strripos("", "")); - var_dump(@strripos("a", "")); - var_dump(@strripos("", "a")); - var_dump(@strripos("\\\\a", "\\a")); -?> ---EXPECT-- -int(5) -int(12) -int(18) -int(12) -int(10) -int(2) -int(0) -int(0) -bool(false) -bool(false) -bool(false) -bool(false) -int(1) - diff --git a/ext/standard/tests/strings/strrpos.phpt b/ext/standard/tests/strings/strrpos.phpt deleted file mode 100644 index 0d4337605a..0000000000 --- a/ext/standard/tests/strings/strrpos.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -strrpos() function ---POST-- ---GET-- ---FILE-- -<?php - var_dump(strrpos("test test string", "test")); - var_dump(strrpos("test string sTring", "string")); - var_dump(strrpos("test strip string strand", "str")); - var_dump(strrpos("I am what I am and that's all what I am", "am", -3)); - var_dump(strrpos("test string", "g")); - var_dump(strrpos("te".chr(0)."st", chr(0))); - var_dump(strrpos("tEst", "test")); - var_dump(strrpos("teSt", "test")); - var_dump(@strrpos("foo", "f", 1)); - var_dump(@strrpos("", "")); - var_dump(@strrpos("a", "")); - var_dump(@strrpos("", "a")); - var_dump(@strrpos("\\\\a", "\\a")); -?> ---EXPECT-- -int(5) -int(5) -int(18) -int(12) -int(10) -int(2) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -int(1) diff --git a/ext/standard/tests/strings/strspn.phpt b/ext/standard/tests/strings/strspn.phpt deleted file mode 100644 index 9f498b84d6..0000000000 --- a/ext/standard/tests/strings/strspn.phpt +++ /dev/null @@ -1,18 +0,0 @@ ---TEST-- -Test strspn() behavior ---FILE-- -<?php -$a = "22222222aaaa bbb1111 cccc"; -$b = "1234"; -var_dump($a); -var_dump($b); -var_dump(strspn($a,$b)); -var_dump(strspn($a,$b,2)); -var_dump(strspn($a,$b,2,3)); -?> ---EXPECT-- -string(25) "22222222aaaa bbb1111 cccc" -string(4) "1234" -int(8) -int(6) -int(3) diff --git a/ext/standard/tests/strings/strstr.phpt b/ext/standard/tests/strings/strstr.phpt deleted file mode 100644 index 29cd30a2a9..0000000000 --- a/ext/standard/tests/strings/strstr.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -strstr() function ---POST-- ---GET-- ---FILE-- -<?php - var_dump(strstr("test string", "test")); - var_dump(strstr("test string", "string")); - var_dump(strstr("test string", "strin")); - var_dump(strstr("test string", "t s")); - var_dump(strstr("test string", "g")); - var_dump(md5(strstr("te".chr(0)."st", chr(0)))); - var_dump(strstr("tEst", "test")); - var_dump(strstr("teSt", "test")); - var_dump(@strstr("", "")); - var_dump(@strstr("a", "")); - var_dump(@strstr("", "a")); - var_dump(md5(@strstr("\\\\a\\", "\\a"))); -?> ---EXPECT-- -string(11) "test string" -string(6) "string" -string(6) "string" -string(8) "t string" -string(1) "g" -string(32) "7272696018bdeb2c9a3f8d01fc2a9273" -bool(false) -bool(false) -bool(false) -bool(false) -bool(false) -string(32) "6ec19f52f0766c463f3bb240f4396913" diff --git a/ext/standard/tests/strings/strtoupper.phpt b/ext/standard/tests/strings/strtoupper.phpt deleted file mode 100644 index 41bc5e6080..0000000000 --- a/ext/standard/tests/strings/strtoupper.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -Test strtoupper on non-ASCII characters ---SKIPIF-- -<?php -if (!setlocale(LC_CTYPE, "de_DE", "de", "german", "ge", "de_DE.ISO8859-1", "ISO8859-1")) { - die("skip locale needed for this test is not supported on this platform"); -} -?> ---FILE-- -<?php -$chars = "äöü"; -// Not sure which is most portable. BSD's answer to -// this one. A small array based on PHP_OS should -// cover a majority of systems and makes the problem -// of locales transparent for the end user. -setlocale(LC_CTYPE, "de_DE", "de", "german", "ge", "de_DE.ISO8859-1", "ISO8859-1"); -echo strtoupper($chars)."\n"; -?> ---EXPECT-- -ÄÖÜ diff --git a/ext/standard/tests/strings/strtr.phpt b/ext/standard/tests/strings/strtr.phpt deleted file mode 100644 index 80ed722b8e..0000000000 --- a/ext/standard/tests/strings/strtr.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -strtr() function ---FILE-- -<?php -/* Do not change this test it is a README.TESTING example. */ -$trans = array("hello"=>"hi", "hi"=>"hello", "a"=>"A", "world"=>"planet"); -var_dump(strtr("# hi all, I said hello world! #", $trans)); -?> ---EXPECT-- -string(32) "# hello All, I sAid hi planet! #"
\ No newline at end of file diff --git a/ext/standard/tests/strings/substr_count.phpt b/ext/standard/tests/strings/substr_count.phpt deleted file mode 100644 index 29f43dfae2..0000000000 --- a/ext/standard/tests/strings/substr_count.phpt +++ /dev/null @@ -1,26 +0,0 @@ ---TEST-- -substr_count() function ---POST-- ---GET-- ---FILE-- -<?php - var_dump(@substr_count("", "")); - var_dump(@substr_count("a", "")); - var_dump(@substr_count("", "a")); - var_dump(@substr_count("", "a")); - var_dump(@substr_count("", chr(0))); - - $a = str_repeat("abcacba", 100); - var_dump(@substr_count($a, "bca")); - - $a = str_repeat("abcacbabca", 100); - var_dump(@substr_count($a, "bca")); -?> ---EXPECT-- -bool(false) -bool(false) -int(0) -int(0) -int(0) -int(100) -int(200) diff --git a/ext/standard/tests/strings/substr_replace.phpt b/ext/standard/tests/strings/substr_replace.phpt deleted file mode 100644 index ada02eb83f..0000000000 --- a/ext/standard/tests/strings/substr_replace.phpt +++ /dev/null @@ -1,812 +0,0 @@ ---TEST-- -substr_replace() function ---POST-- ---GET-- ---FILE-- -<?php -$str = "try this"; -$repl = "bala "; -$start = 2; -echo "\n"; - - -echo "substr_replace('$str', '$repl', $start)\n"; -var_dump(substr_replace($str, $repl, $start)); -echo "\n"; - -$len = 3; -echo "substr_replace('$str', '$repl', $start, $len)\n"; -var_dump(substr_replace($str, $repl, $start, $len)); -echo "\n"; - -$len = 0; -echo "substr_replace('$str', '$repl', $start, $len)\n"; -var_dump(substr_replace($str, $repl, $start, $len)); -echo "\n"; - -$len = -2; -echo "substr_replace('$str', '$repl', $start, $len)\n"; -var_dump(substr_replace($str, $repl, $start, $len)); -echo "\n"; -echo "\n"; -echo "\n"; - - -$str = "try this"; -$repl = array("bala "); -$start = 4; -$len = 3; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).", ".var_export($start,1)."")."\n"; -var_dump(substr_replace($str, $repl, $start))."\n"; -echo "\n"; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).", ".var_export($start,1)."")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - -echo "\n"; -echo "\n"; -echo "\n"; - - - -$str = array("ala portokala"); -$repl = array("bala "); -$start = array(4); -$len = array(3); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).", ".var_export($start,1)."")."\n"; -var_dump(substr_replace($str, $repl, $start))."\n"; -echo "\n"; - -$len = array(3); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).", ".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - -$len = array(0); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).", ".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - -$len = array(-2); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).", ".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - - - -$str = array("ala portokala"); -$repl = "bala "; -$start = 4; -$len = 3; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start))."\n"; -echo "\n"; -echo "\n"; - - - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = 4; -$len = 3; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = 4; -$len = 3; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = 4; -$len = 0; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = 4; -$len = 0; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = 4; -$len = -2; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = 4; -$len = -2; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - - - -$str = array("ala portokala"); -$repl = "bala "; -$start = array(4); -$len = 3; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start))."\n"; -echo "\n"; -echo "\n"; - - - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = array(4); -$len = 3; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = array(4); -$len = 3; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = array(4); -$len = 0; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = array(4); -$len = 0; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = array(4); -$len = -2; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = array(4); -$len = -2; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala"); -$repl = "bala "; -$start = array(4,2); -$len = 3; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start))."\n"; -echo "\n"; -echo "\n"; - - - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = array(4,2); -$len = 3; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = array(4,2); -$len = 3; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = array(4,2); -$len = 0; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = array(4,2); -$len = 0; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = array(4,2); -$len = -2; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = array(4,2); -$len = -2; -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - - - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala"); -$repl = "bala "; -$start = array(4,2); -$len = array(3); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start))."\n"; -echo "\n"; -echo "\n"; - - - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = array(4,2); -$len = array(3); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = array(4,2); -$len = array(3); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = array(4,2); -$len = array(0); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = array(4,2); -$len = array(0); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = array(4,2); -$len = array(-2); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = array(4,2); -$len = array(-2); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - - -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala"); -$repl = "bala "; -$start = array(4,2); -$len = array(3,2); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start))."\n"; -echo "\n"; -echo "\n"; - - - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = array(4,2); -$len = array(3,2); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = array(4,2); -$len = array(3,2); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = array(4,2); -$len = array(0,0); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = array(4,2); -$len = array(0,0); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - -$str = array("ala portokala", "try this"); -$repl = array("bala "); -$start = array(4,2); -$len = array(-2,-3); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; -echo "\n"; - - -$str = array("ala portokala", "try this"); -$repl = "bala "; -$start = array(4,2); -$len = array(-2,-3); -echo str_replace("\n","","substr_replace(".var_export($str,1).", ".var_export($repl,1).",".var_export($start,1).", ".var_export($len,1).")")."\n"; -var_dump(substr_replace($str, $repl, $start, $len))."\n"; -echo "\n"; - - - - -?> ---EXPECT-- -substr_replace('try this', 'bala ', 2) -string(7) "trbala " - -substr_replace('try this', 'bala ', 2, 3) -string(10) "trbala his" - -substr_replace('try this', 'bala ', 2, 0) -string(13) "trbala y this" - -substr_replace('try this', 'bala ', 2, -2) -string(9) "trbala is" - - - -substr_replace('try this', array ( 0 => 'bala ',), 4 -string(9) "try bala " - -substr_replace('try this', array ( 0 => 'bala ',), 4 -string(10) "try bala s" - - - - -substr_replace(array ( 0 => 'ala portokala',), array ( 0 => 'bala ',), array ( 0 => 4,) -array(1) { - [0]=> - string(9) "ala bala " -} - -substr_replace(array ( 0 => 'ala portokala',), array ( 0 => 'bala ',), array ( 0 => 4,), array ( 0 => 3,)) -array(1) { - [0]=> - string(15) "ala bala tokala" -} - -substr_replace(array ( 0 => 'ala portokala',), array ( 0 => 'bala ',), array ( 0 => 4,), array ( 0 => 0,)) -array(1) { - [0]=> - string(18) "ala bala portokala" -} - -substr_replace(array ( 0 => 'ala portokala',), array ( 0 => 'bala ',), array ( 0 => 4,), array ( 0 => -2,)) -array(1) { - [0]=> - string(11) "ala bala la" -} - - - -substr_replace(array ( 0 => 'ala portokala',), 'bala ',4) -array(1) { - [0]=> - string(9) "ala bala " -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),4, 3) -array(2) { - [0]=> - string(15) "ala bala tokala" - [1]=> - string(5) "try s" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',4, 3) -array(2) { - [0]=> - string(15) "ala bala tokala" - [1]=> - string(10) "try bala s" -} - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),4, 0) -array(2) { - [0]=> - string(18) "ala bala portokala" - [1]=> - string(8) "try this" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',4, 0) -array(2) { - [0]=> - string(18) "ala bala portokala" - [1]=> - string(13) "try bala this" -} - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),4, -2) -array(2) { - [0]=> - string(11) "ala bala la" - [1]=> - string(6) "try is" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',4, -2) -array(2) { - [0]=> - string(11) "ala bala la" - [1]=> - string(11) "try bala is" -} - - - - - - -substr_replace(array ( 0 => 'ala portokala',), 'bala ',array ( 0 => 4,)) -array(1) { - [0]=> - string(9) "ala bala " -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),array ( 0 => 4,), 3) -array(2) { - [0]=> - string(15) "ala bala tokala" - [1]=> - string(5) " this" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',array ( 0 => 4,), 3) -array(2) { - [0]=> - string(15) "ala bala tokala" - [1]=> - string(10) "bala this" -} - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),array ( 0 => 4,), 0) -array(2) { - [0]=> - string(18) "ala bala portokala" - [1]=> - string(8) "try this" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',array ( 0 => 4,), 0) -array(2) { - [0]=> - string(18) "ala bala portokala" - [1]=> - string(13) "bala try this" -} - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),array ( 0 => 4,), -2) -array(2) { - [0]=> - string(11) "ala bala la" - [1]=> - string(2) "is" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',array ( 0 => 4,), -2) -array(2) { - [0]=> - string(11) "ala bala la" - [1]=> - string(7) "bala is" -} - - - - - - - -substr_replace(array ( 0 => 'ala portokala',), 'bala ',array ( 0 => 4, 1 => 2,)) -array(1) { - [0]=> - string(9) "ala bala " -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),array ( 0 => 4, 1 => 2,), 3) -array(2) { - [0]=> - string(15) "ala bala tokala" - [1]=> - string(5) "trhis" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',array ( 0 => 4, 1 => 2,), 3) -array(2) { - [0]=> - string(15) "ala bala tokala" - [1]=> - string(10) "trbala his" -} - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),array ( 0 => 4, 1 => 2,), 0) -array(2) { - [0]=> - string(18) "ala bala portokala" - [1]=> - string(8) "try this" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',array ( 0 => 4, 1 => 2,), 0) -array(2) { - [0]=> - string(18) "ala bala portokala" - [1]=> - string(13) "trbala y this" -} - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),array ( 0 => 4, 1 => 2,), -2) -array(2) { - [0]=> - string(11) "ala bala la" - [1]=> - string(4) "tris" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',array ( 0 => 4, 1 => 2,), -2) -array(2) { - [0]=> - string(11) "ala bala la" - [1]=> - string(9) "trbala is" -} - - - - - - - -substr_replace(array ( 0 => 'ala portokala',), 'bala ',array ( 0 => 4, 1 => 2,)) -array(1) { - [0]=> - string(9) "ala bala " -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),array ( 0 => 4, 1 => 2,), array ( 0 => 3,)) -array(2) { - [0]=> - string(15) "ala bala tokala" - [1]=> - string(2) "tr" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',array ( 0 => 4, 1 => 2,), array ( 0 => 3,)) -array(2) { - [0]=> - string(15) "ala bala tokala" - [1]=> - string(7) "trbala " -} - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),array ( 0 => 4, 1 => 2,), array ( 0 => 0,)) -array(2) { - [0]=> - string(18) "ala bala portokala" - [1]=> - string(2) "tr" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',array ( 0 => 4, 1 => 2,), array ( 0 => 0,)) -array(2) { - [0]=> - string(18) "ala bala portokala" - [1]=> - string(7) "trbala " -} - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),array ( 0 => 4, 1 => 2,), array ( 0 => -2,)) -array(2) { - [0]=> - string(11) "ala bala la" - [1]=> - string(2) "tr" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',array ( 0 => 4, 1 => 2,), array ( 0 => -2,)) -array(2) { - [0]=> - string(11) "ala bala la" - [1]=> - string(7) "trbala " -} - - - - - - - -substr_replace(array ( 0 => 'ala portokala',), 'bala ',array ( 0 => 4, 1 => 2,)) -array(1) { - [0]=> - string(9) "ala bala " -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),array ( 0 => 4, 1 => 2,), array ( 0 => 3, 1 => 2,)) -array(2) { - [0]=> - string(15) "ala bala tokala" - [1]=> - string(6) "trthis" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',array ( 0 => 4, 1 => 2,), array ( 0 => 3, 1 => 2,)) -array(2) { - [0]=> - string(15) "ala bala tokala" - [1]=> - string(11) "trbala this" -} - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),array ( 0 => 4, 1 => 2,), array ( 0 => 0, 1 => 0,)) -array(2) { - [0]=> - string(18) "ala bala portokala" - [1]=> - string(8) "try this" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',array ( 0 => 4, 1 => 2,), array ( 0 => 0, 1 => 0,)) -array(2) { - [0]=> - string(18) "ala bala portokala" - [1]=> - string(13) "trbala y this" -} - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), array ( 0 => 'bala ',),array ( 0 => 4, 1 => 2,), array ( 0 => -2, 1 => -3,)) -array(2) { - [0]=> - string(11) "ala bala la" - [1]=> - string(5) "trhis" -} - - -substr_replace(array ( 0 => 'ala portokala', 1 => 'try this',), 'bala ',array ( 0 => 4, 1 => 2,), array ( 0 => -2, 1 => -3,)) -array(2) { - [0]=> - string(11) "ala bala la" - [1]=> - string(10) "trbala his" -} - diff --git a/ext/standard/tests/strings/trim.phpt b/ext/standard/tests/strings/trim.phpt deleted file mode 100644 index c4f5860e2f..0000000000 --- a/ext/standard/tests/strings/trim.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -trim(), rtrim() and ltrim() functions ---POST-- ---GET-- ---FILE-- -<?php - -$tests = <<<TESTS -'ABC' === trim('ABC') -'ABC' === ltrim('ABC') -'ABC' === rtrim('ABC') -'ABC' === trim(" \\0\\t\\nABC \\0\\t\\n") -"ABC \\0\\t\\n" === ltrim(" \\0\\t\\nABC \\0\\t\\n") -" \\0\\t\\nABC" === rtrim(" \\0\\t\\nABC \\0\\t\\n") -" \\0\\t\\nABC \\0\\t\\n" === trim(" \\0\\t\\nABC \\0\\t\\n",'') -" \\0\\t\\nABC \\0\\t\\n" === ltrim(" \\0\\t\\nABC \\0\\t\\n",'') -" \\0\\t\\nABC \\0\\t\\n" === rtrim(" \\0\\t\\nABC \\0\\t\\n",'') -"ABC\\x50\\xC1" === trim("ABC\\x50\\xC1\\x60\\x90","\\x51..\\xC0") -"ABC\\x50" === trim("ABC\\x50\\xC1\\x60\\x90","\\x51..\\xC1") -"ABC" === trim("ABC\\x50\\xC1\\x60\\x90","\\x50..\\xC1") -"ABC\\x50\\xC1" === trim("ABC\\x50\\xC1\\x60\\x90","\\x51..\\xC0") -"ABC\\x50" === trim("ABC\\x50\\xC1\\x60\\x90","\\x51..\\xC1") -"ABC" === trim("ABC\\x50\\xC1\\x60\\x90","\\x50..\\xC1") -TESTS; - -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); - ---EXPECT-- -OK diff --git a/ext/standard/tests/strings/url_t.phpt b/ext/standard/tests/strings/url_t.phpt deleted file mode 100644 index 1af113a695..0000000000 --- a/ext/standard/tests/strings/url_t.phpt +++ /dev/null @@ -1,652 +0,0 @@ ---TEST-- -parse_url() function ---POST-- ---GET-- ---FILE-- -<?php -$sample_urls = array ( -'', -'64.246.30.37', -'http://64.246.30.37', -'http://64.246.30.37/', -'64.246.30.37/', -'64.246.30.37:80/', -'php.net', -'php.net/', -'http://php.net', -'http://php.net/', -'www.php.net', -'www.php.net/', -'http://www.php.net', -'http://www.php.net/', -'www.php.net:80', -'http://www.php.net:80', -'http://www.php.net:80/', -'http://www.php.net/index.php', -'www.php.net/?', -'www.php.net:80/?', -'http://www.php.net/?', -'http://www.php.net:80/?', -'http://www.php.net:80/index.php', -'http://www.php.net:80/foo/bar/index.php', -'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php', -'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php?lots=1&of=2¶meters=3&too=4&here=5', -'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/', -'http://www.php.net:80/this/is/a/very/deep/directory/structure/and/file.php', -'http://www.php.net:80/this/../a/../deep/directory', -'http://www.php.net:80/this/../a/../deep/directory/', -'http://www.php.net:80/this/is/a/very/deep/directory/../file.php', -'http://www.php.net:80/index.php', -'http://www.php.net:80/index.php?', -'http://www.php.net:80/#foo', -'http://www.php.net:80/?#', -'http://www.php.net:80/?test=1', -'http://www.php.net/?test=1&', -'http://www.php.net:80/?&', -'http://www.php.net:80/index.php?test=1&', -'http://www.php.net/index.php?&', -'http://www.php.net:80/index.php?foo&', -'http://www.php.net/index.php?&foo', -'http://www.php.net:80/index.php?test=1&test2=char&test3=mixesCI', -'www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123', -'http://secret@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123', -'http://secret:@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123', -'http://:hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123', -'http://secret:hideout@www.php.net/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123', -'http://secret@hideout@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123', -'http://secret:hid:out@www.php.net:80/index.php?test=1&test2=char&test3=mixesCI#some_page_ref123', -'nntp://news.php.net', -'ftp://ftp.gnu.org/gnu/glic/glibc.tar.gz', -'zlib:http://foo@bar', -'zlib:filename.txt', -'zlib:/path/to/my/file/file.txt', -'foo://foo@bar', -'mailto:me@mydomain.com', -'/foo.php?a=b&c=d', -'foo.php?a=b&c=d', -'http://user:passwd@www.example.com:8080?bar=1&boom=0', -'file:///path/to/file', -'file://path/to/file', -'file:/path/to/file', -'http://1.2.3.4:/abc.asp?a=1&b=2' -); - - foreach ($sample_urls as $url) { - var_dump(@parse_url($url)); - } -?> ---EXPECT-- -array(1) { - ["path"]=> - string(0) "" -} -array(1) { - ["path"]=> - string(12) "64.246.30.37" -} -array(2) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(12) "64.246.30.37" -} -array(3) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(12) "64.246.30.37" - ["path"]=> - string(1) "/" -} -array(1) { - ["path"]=> - string(13) "64.246.30.37/" -} -array(3) { - ["host"]=> - string(12) "64.246.30.37" - ["port"]=> - int(80) - ["path"]=> - string(1) "/" -} -array(1) { - ["path"]=> - string(7) "php.net" -} -array(1) { - ["path"]=> - string(8) "php.net/" -} -array(2) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(7) "php.net" -} -array(3) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(7) "php.net" - ["path"]=> - string(1) "/" -} -array(1) { - ["path"]=> - string(11) "www.php.net" -} -array(1) { - ["path"]=> - string(12) "www.php.net/" -} -array(2) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" -} -array(3) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["path"]=> - string(1) "/" -} -array(2) { - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) -} -array(3) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(1) "/" -} -array(3) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["path"]=> - string(10) "/index.php" -} -array(1) { - ["path"]=> - string(12) "www.php.net/" -} -array(3) { - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(1) "/" -} -array(3) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["path"]=> - string(1) "/" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(1) "/" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(10) "/index.php" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(18) "/foo/bar/index.php" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(53) "/this/is/a/very/deep/directory/structure/and/file.php" -} -array(5) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(53) "/this/is/a/very/deep/directory/structure/and/file.php" - ["query"]=> - string(37) "lots=1&of=2¶meters=3&too=4&here=5" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(45) "/this/is/a/very/deep/directory/structure/and/" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(53) "/this/is/a/very/deep/directory/structure/and/file.php" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(28) "/this/../a/../deep/directory" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(29) "/this/../a/../deep/directory/" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(42) "/this/is/a/very/deep/directory/../file.php" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(10) "/index.php" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(10) "/index.php" -} -array(5) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(1) "/" - ["fragment"]=> - string(3) "foo" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(1) "/" -} -array(5) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(1) "/" - ["query"]=> - string(6) "test=1" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["path"]=> - string(1) "/" - ["query"]=> - string(7) "test=1&" -} -array(5) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(1) "/" - ["query"]=> - string(1) "&" -} -array(5) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(7) "test=1&" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(1) "&" -} -array(5) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(4) "foo&" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(4) "&foo" -} -array(5) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(31) "test=1&test2=char&test3=mixesCI" -} -array(5) { - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(31) "test=1&test2=char&test3=mixesCI" - ["fragment"]=> - string(16) "some_page_ref123" -} -array(7) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["user"]=> - string(6) "secret" - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(31) "test=1&test2=char&test3=mixesCI" - ["fragment"]=> - string(16) "some_page_ref123" -} -array(6) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["user"]=> - string(6) "secret" - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(31) "test=1&test2=char&test3=mixesCI" - ["fragment"]=> - string(16) "some_page_ref123" -} -array(7) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["pass"]=> - string(7) "hideout" - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(31) "test=1&test2=char&test3=mixesCI" - ["fragment"]=> - string(16) "some_page_ref123" -} -array(7) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["user"]=> - string(6) "secret" - ["pass"]=> - string(7) "hideout" - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(31) "test=1&test2=char&test3=mixesCI" - ["fragment"]=> - string(16) "some_page_ref123" -} -array(7) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(19) "hideout@www.php.net" - ["port"]=> - int(80) - ["user"]=> - string(6) "secret" - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(31) "test=1&test2=char&test3=mixesCI" - ["fragment"]=> - string(16) "some_page_ref123" -} -array(8) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(11) "www.php.net" - ["port"]=> - int(80) - ["user"]=> - string(6) "secret" - ["pass"]=> - string(7) "hid:out" - ["path"]=> - string(10) "/index.php" - ["query"]=> - string(31) "test=1&test2=char&test3=mixesCI" - ["fragment"]=> - string(16) "some_page_ref123" -} -array(2) { - ["scheme"]=> - string(4) "nntp" - ["host"]=> - string(12) "news.php.net" -} -array(3) { - ["scheme"]=> - string(3) "ftp" - ["host"]=> - string(11) "ftp.gnu.org" - ["path"]=> - string(22) "/gnu/glic/glibc.tar.gz" -} -array(2) { - ["scheme"]=> - string(4) "zlib" - ["path"]=> - string(14) "http://foo@bar" -} -array(2) { - ["scheme"]=> - string(4) "zlib" - ["path"]=> - string(12) "filename.txt" -} -array(2) { - ["scheme"]=> - string(4) "zlib" - ["path"]=> - string(25) "/path/to/my/file/file.txt" -} -array(3) { - ["scheme"]=> - string(3) "foo" - ["host"]=> - string(3) "bar" - ["user"]=> - string(3) "foo" -} -array(2) { - ["scheme"]=> - string(6) "mailto" - ["path"]=> - string(15) "me@mydomain.com" -} -array(2) { - ["path"]=> - string(8) "/foo.php" - ["query"]=> - string(7) "a=b&c=d" -} -array(2) { - ["path"]=> - string(7) "foo.php" - ["query"]=> - string(7) "a=b&c=d" -} -array(6) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(15) "www.example.com" - ["port"]=> - int(8080) - ["user"]=> - string(4) "user" - ["pass"]=> - string(6) "passwd" - ["query"]=> - string(12) "bar=1&boom=0" -} -array(2) { - ["scheme"]=> - string(4) "file" - ["path"]=> - string(13) "/path/to/file" -} -array(3) { - ["scheme"]=> - string(4) "file" - ["host"]=> - string(4) "path" - ["path"]=> - string(8) "/to/file" -} -array(2) { - ["scheme"]=> - string(4) "file" - ["path"]=> - string(13) "/path/to/file" -} -array(4) { - ["scheme"]=> - string(4) "http" - ["host"]=> - string(7) "1.2.3.4" - ["path"]=> - string(8) "/abc.asp" - ["query"]=> - string(7) "a=1&b=2" -} diff --git a/ext/standard/tests/strings/wordwrap.phpt b/ext/standard/tests/strings/wordwrap.phpt deleted file mode 100644 index eb85d32dc9..0000000000 --- a/ext/standard/tests/strings/wordwrap.phpt +++ /dev/null @@ -1,37 +0,0 @@ ---TEST-- -wordwrap() function ---POST-- ---GET-- ---FILE-- -<?php - -$tests = <<<TESTS -"12345 12345 12345 12345" === wordwrap("12345 12345 12345 12345") -"12345 12345\\n1234567890\\n1234567890" === wordwrap("12345 12345 1234567890 1234567890",12) -"12345\\n12345\\n12345\\n12345" === wordwrap("12345 12345 12345 12345",0) -"12345ab12345ab12345ab12345" === wordwrap("12345 12345 12345 12345",0,"ab") -"12345 12345ab1234567890ab1234567890" === wordwrap("12345 12345 1234567890 1234567890",12,"ab") -"123ab123ab123" === wordwrap("123ab123ab123", 3, "ab") -"123ab123ab123" === wordwrap("123ab123ab123", 5, "ab") -"123ab 123ab123" === wordwrap("123 123ab123", 3, "ab") -"123ab123ab123" === wordwrap("123 123ab123", 5, "ab") -"123 123ab123" === wordwrap("123 123 123", 10, "ab") - -"123ab123ab123" === wordwrap("123ab123ab123", 3, "ab", 1) -"123ab123ab123" === wordwrap("123ab123ab123", 5, "ab", 1) -"123ab 12ab3ab123" === wordwrap("123 123ab123", 3, "ab", 1) -"123 ab123ab123" === wordwrap("123 123ab123", 5, "ab", 1) -"123 123ab 123" === wordwrap("123 123 123", 8, "ab", 1) -"123 ab12345 ab123" === wordwrap("123 12345 123", 8, "ab", 1) -"1ab2ab3ab4" === wordwrap("1234", 1, "ab", 1) - -"12345|12345|67890" === wordwrap("12345 1234567890", 5, "|", 1) - -"123|==1234567890|==123" === wordwrap("123 1234567890 123", 10, "|==", 1) - -TESTS; - -include(dirname(__FILE__) . '/../../../../tests/quicktester.inc'); - ---EXPECT-- -OK diff --git a/ext/standard/tests/time/001.phpt b/ext/standard/tests/time/001.phpt deleted file mode 100644 index 74802ec7fc..0000000000 --- a/ext/standard/tests/time/001.phpt +++ /dev/null @@ -1,34 +0,0 @@ ---TEST-- -microtime() function ---SKIPIF-- -<?php - if (!function_exists('microtime')) die('skip microtime() not available'); - die('warn system dependent'); -?> ---FILE-- -<?php -$passed = 0; -$failed = 0; -$last_m = 0; -$last_t = 0; -$result = ''; - -set_time_limit(0); - -for ($i=1;$i<=100000;$i++) { - list($micro,$time)=explode(" ",microtime()); - if ($time > $last_t || ($time == $last_t && $micro > $last_m)) { - $passed++; - } else if ($failed++ <=10) { - $result .= sprintf('%06d', $i).": $time $micro < $last_t $last_m\n"; - } - $last_m = $micro; - $last_t = $time; -} -echo "Passed: $passed\n"; -echo "Failed: $failed\n"; -echo $result; -?> ---EXPECT-- -Passed: 100000 -Failed: 0 diff --git a/ext/standard/tests/time/002-win32.phpt b/ext/standard/tests/time/002-win32.phpt deleted file mode 100644 index 1d7ef57153..0000000000 --- a/ext/standard/tests/time/002-win32.phpt +++ /dev/null @@ -1,66 +0,0 @@ ---TEST-- -strtotime() function ---SKIPIF-- -<?php -if (substr(PHP_OS, 0, 3) != 'WIN') { - print 'skip test for win32 only'; -} -if (!@putenv("TZ=GST-1GDT") || getenv("TZ") != 'GST-1GDT') { - die("skip unable to change TZ enviroment variable\n"); -} -?> ---FILE-- -<?php - $dates = array ( - "1999-10-13", - "Oct 13 1999", - "2000-01-19", - "Jan 19 2000", - "2001-12-21", - "Dec 21 2001", - "2001-12-21 12:16", - "Dec 21 2001 12:16", - "2001-10-22 21:19:58", - "2001-10-22 21:19:58-02", - "2001-10-22 21:19:58-0213", - "2001-10-22 21:19:58+02", - "2001-10-22 21:19:58+0213" - ); - - putenv ("TZ=GMT"); - foreach ($dates as $date) { - echo date("Y-m-d H:i:s\n", strtotime ($date)); - } - - putenv ("TZ=GST-1GDT"); - foreach ($dates as $date) { - echo date("Y-m-d H:i:s\n", strtotime ($date)); - } -?> ---EXPECT-- -1999-10-13 00:00:00 -1999-10-13 00:00:00 -2000-01-19 00:00:00 -2000-01-19 00:00:00 -2001-12-21 00:00:00 -2001-12-21 00:00:00 -2001-12-21 12:16:00 -2001-12-21 12:16:00 -2001-10-22 21:19:58 -2001-10-22 23:19:58 -2001-10-22 23:32:58 -2001-10-22 19:19:58 -2001-10-22 19:06:58 -1999-10-13 00:00:00 -1999-10-13 00:00:00 -2000-01-19 00:00:00 -2000-01-19 00:00:00 -2001-12-21 00:00:00 -2001-12-21 00:00:00 -2001-12-21 12:16:00 -2001-12-21 12:16:00 -2001-10-22 21:19:58 -2001-10-23 01:19:58 -2001-10-23 01:32:58 -2001-10-22 21:19:58 -2001-10-22 21:06:58 diff --git a/ext/standard/tests/time/002.phpt b/ext/standard/tests/time/002.phpt deleted file mode 100644 index ed1b0f1370..0000000000 --- a/ext/standard/tests/time/002.phpt +++ /dev/null @@ -1,74 +0,0 @@ ---TEST-- -strtotime() function ---SKIPIF-- -<?php -if (substr(PHP_OS, 0, 3) == 'WIN') { - die('skip Windows does not support dates prior to midnight (00:00:00), January 1, 1970'); -} -if (!@putenv("TZ=EST5") || getenv("TZ") != 'EST5') { - die("skip unable to change TZ enviroment variable\n"); -} -?> ---FILE-- -<?php - $dates = array ( - "1999-10-13", - "Oct 13 1999", - "2000-01-19", - "Jan 19 2000", - "2001-12-21", - "Dec 21 2001", - "2001-12-21 12:16", - "Dec 21 2001 12:16", - "Dec 21 12:16", - "2001-10-22 21:19:58", - "2001-10-22 21:19:58-02", - "2001-10-22 21:19:58-0213", - "2001-10-22 21:19:58+02", - "2001-10-22 21:19:58+0213" - ); - - putenv ("TZ=GMT0"); - foreach ($dates as $date) { - echo date ("Y-m-d H:i:s\n", strtotime ($date)); - } - - putenv("TZ=US/Eastern"); - if( date("T") == "GMT" ) { - // POSIX style - putenv ("TZ=EST5EDT4,M4.1.0,M10.5.0"); - } - - foreach ($dates as $date) { - echo date ("Y-m-d H:i:s\n", strtotime ($date)); - } -?> ---EXPECT-- -1999-10-13 00:00:00 -1999-10-13 00:00:00 -2000-01-19 00:00:00 -2000-01-19 00:00:00 -2001-12-21 00:00:00 -2001-12-21 00:00:00 -2001-12-21 12:16:00 -2001-12-21 12:16:00 -1969-12-31 23:59:59 -2001-10-22 21:19:58 -2001-10-22 23:19:58 -2001-10-22 23:32:58 -2001-10-22 19:19:58 -2001-10-22 19:06:58 -1999-10-13 00:00:00 -1999-10-13 00:00:00 -2000-01-19 00:00:00 -2000-01-19 00:00:00 -2001-12-21 00:00:00 -2001-12-21 00:00:00 -2001-12-21 12:16:00 -2001-12-21 12:16:00 -1969-12-31 18:59:59 -2001-10-22 21:19:58 -2001-10-22 19:19:58 -2001-10-22 19:32:58 -2001-10-22 15:19:58 -2001-10-22 15:06:58 diff --git a/ext/standard/tests/time/003.phpt b/ext/standard/tests/time/003.phpt deleted file mode 100644 index 2da8121b6a..0000000000 --- a/ext/standard/tests/time/003.phpt +++ /dev/null @@ -1,44 +0,0 @@ ---TEST-- -Check for mktime with out-of-range parameters ---SKIPIF-- ---POST-- ---GET-- ---FILE-- -<?php - # MacOS/X libc implementation doesn't treat out-of-range values - # the same way other unices do (Bug# 10686) so some extra code - # was added to datetime.c to take care of this - echo date("Y-m-d", mktime( 12, 0, 0, 3, 0, 2000)) ."\n"; - echo date("Y-m-d", mktime( 12, 0, 0, 3, -1, 2000)) ."\n"; - echo date("Y-m-d", mktime( 12, 0, 0, 2, 29, 2000)) ."\n"; - echo date("Y-m-d", mktime( 12, 0, 0, 3, 0, 2001)) ."\n"; - echo date("Y-m-d", mktime( 12, 0, 0, 2, 29, 2001)) ."\n"; - echo date("Y-m-d", mktime( 12, 0, 0, 0, 0, 2000)) ."\n"; - - putenv("TZ=GST-1GDT"); - echo date("Y-m-d H:i:s", mktime(12,0,0,3,+90,2000,-1))."\n"; - echo date("Y-m-d H:i:s", mktime(12,0,0,3,+90,2000,0))."\n"; - echo date("Y-m-d H:i:s", mktime(12,0,0,3,+90,2000,1))."\n"; - echo date("Y-m-d H:i:s", mktime(12,0,0,5,-90,2000,-1))."\n"; - echo date("Y-m-d H:i:s", mktime(12,0,0,5,-90,2000,0))."\n"; - echo date("Y-m-d H:i:s", mktime(12,0,0,5,-90,2000,1))."\n"; - echo date("Y-m-d H:i:s", mktime(12,0,0,5,-1,2000,-1))."\n"; - echo date("Y-m-d H:i:s", mktime(12,0,0,5,-1,2000,0))."\n"; - echo date("Y-m-d H:i:s", mktime(12,0,0,5,-1,2000,1))."\n"; -?> ---EXPECT-- -2000-02-29 -2000-02-28 -2000-02-29 -2001-02-28 -2001-03-01 -1999-11-30 -2000-05-29 12:00:00 -2000-05-29 13:00:00 -2000-05-29 12:00:00 -2000-01-31 12:00:00 -2000-01-31 12:00:00 -2000-01-31 11:00:00 -2000-04-29 12:00:00 -2000-04-29 13:00:00 -2000-04-29 12:00:00 diff --git a/ext/standard/tests/time/bug13142.phpt b/ext/standard/tests/time/bug13142.phpt deleted file mode 100644 index af3e1f2f31..0000000000 --- a/ext/standard/tests/time/bug13142.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -Bug #13142 strtotime handling of "M d H:i:s Y" format ---SKIPIF-- -<?php -if (!@putenv("TZ=US/Eastern") || getenv("TZ") != 'US/Eastern') { - die("skip unable to change TZ enviroment variable\n"); -} -?> ---FILE-- -<?php -putenv("TZ=US/Eastern"); -if (date('T') == 'GMT') { - putenv("TZ=EST5EDT4,M4.1.0,M10.5.0"); -} -echo date("r\n", strtotime("Sep 04 16:39:45 2001")); -echo date("r\n", strtotime("Sep 04 2001 16:39:45")); -?> ---EXPECT-- -Tue, 4 Sep 2001 16:39:45 -0400 -Tue, 4 Sep 2001 16:39:45 -0400 diff --git a/ext/standard/tests/time/bug17988.phpt b/ext/standard/tests/time/bug17988.phpt deleted file mode 100644 index 5fbc3c845f..0000000000 --- a/ext/standard/tests/time/bug17988.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -Bug #17988 strtotime handling of postgresql timestamps ---FILE-- -<?php -putenv("TZ=GMT"); -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728"))."\n"; -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 GMT"))."\n"; -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 MET"))."\n"; -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 MEST"))."\n"; -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728 EDT"))."\n"; -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-00"))."\n"; -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+00"))."\n"; -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-04"))."\n"; -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+04"))."\n"; -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-0300"))."\n"; -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+0300"))."\n"; -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728-0330"))."\n"; -echo gmdate('Y-m-d H:i:s', strtotime("2002-06-25 14:18:48.543728+0330"))."\n"; -?> ---EXPECT-- -2002-06-25 14:18:48 -2002-06-25 14:18:48 -2002-06-25 13:18:48 -2002-06-25 12:18:48 -2002-06-25 18:18:48 -2002-06-25 14:18:48 -2002-06-25 14:18:48 -2002-06-25 18:18:48 -2002-06-25 10:18:48 -2002-06-25 17:18:48 -2002-06-25 11:18:48 -2002-06-25 17:48:48 -2002-06-25 10:48:48 diff --git a/ext/standard/tests/time/bug26198.phpt b/ext/standard/tests/time/bug26198.phpt deleted file mode 100644 index 318108da78..0000000000 --- a/ext/standard/tests/time/bug26198.phpt +++ /dev/null @@ -1,10 +0,0 @@ ---TEST-- -Bug #26198 (strtotime handling of "M Y" and "Y M" format) ---FILE-- -<?php - echo date("F Y\n", strtotime("Oct 2001")); - echo date("M Y\n", strtotime("2001 Oct")); -?> ---EXPECT-- -October 2001 -Oct 2001 diff --git a/ext/standard/tests/time/bug26317.phpt b/ext/standard/tests/time/bug26317.phpt deleted file mode 100644 index c889666dc9..0000000000 --- a/ext/standard/tests/time/bug26317.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -Bug #26317 (military timezone offset signedness) ---SKIP-- -if (!@putenv("TZ=GMT0") || getenv("TZ") != 'GMT0') { - die("skip unable to change TZ enviroment variable\n"); -} ---FILE-- -<?php - putenv("TZ=GMT0"); - echo date("Y-m-d H:i:s\n", strtotime("2003-11-19 16:20:42 Z")); - echo date("Y-m-d H:i:s\n", strtotime("2003-11-19 09:20:42 T")); - echo date("Y-m-d H:i:s\n", strtotime("2003-11-19 19:20:42 C")); -?> ---EXPECT-- -2003-11-19 16:20:42 -2003-11-19 16:20:42 -2003-11-19 16:20:42 diff --git a/ext/standard/tests/time/bug26320.phpt b/ext/standard/tests/time/bug26320.phpt deleted file mode 100644 index b57712009f..0000000000 --- a/ext/standard/tests/time/bug26320.phpt +++ /dev/null @@ -1,15 +0,0 @@ ---TEST-- -Bug #26320 (strtotime handling of XML Schema/ISO 8601 format) ---SKIP-- -if (!@putenv("TZ=GMT0") || getenv("TZ") != 'GMT0') { - die("skip unable to change TZ enviroment variable\n"); -} ---FILE-- -<?php - putenv("TZ=GMT0"); - echo date("Y-m-d H:i:s\n", strtotime("2003-11-19T12:30:42")); - echo date("Y-m-d H:i:s\n", strtotime("2003-11-19T12:30:42Z")); -?> ---EXPECT-- -2003-11-19 12:30:42 -2003-11-19 12:30:42
\ No newline at end of file diff --git a/ext/standard/tests/time/date.phpt b/ext/standard/tests/time/date.phpt deleted file mode 100644 index 87cae0b310..0000000000 --- a/ext/standard/tests/time/date.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -date() function ---FILE-- -<?php -$tmp = "cr"; -putenv ("TZ=GMT0"); - -for($a = 0;$a < strlen($tmp); $a++){ - echo $tmp{$a}, ': ', date($tmp{$a}, 1043324459)."\n"; -} - -putenv ("TZ=MET"); - -for($a = 0;$a < strlen($tmp); $a++){ - echo $tmp{$a}, ': ', date($tmp{$a}, 1043324459)."\n"; -} -?> ---EXPECT-- -c: 2003-01-23T12:20:59+00:00 -r: Thu, 23 Jan 2003 12:20:59 +0000 -c: 2003-01-23T13:20:59+01:00 -r: Thu, 23 Jan 2003 13:20:59 +0100 diff --git a/ext/standard/tests/time/idate.phpt b/ext/standard/tests/time/idate.phpt deleted file mode 100644 index 485f9804af..0000000000 --- a/ext/standard/tests/time/idate.phpt +++ /dev/null @@ -1,32 +0,0 @@ ---TEST-- -idate() function ---FILE-- -<?php -putenv ("TZ=GMT0"); - -$tmp = "UYzymndjHGhgistwLBIW"; -for($a = 0;$a < strlen($tmp); $a++){ - echo $tmp{$a}, ': ', idate($tmp{$a}, 1043324459)."\n"; -} -?> ---EXPECT-- -U: 1043324459 -Y: 2003 -z: 22 -y: 3 -m: 1 -n: 1 -d: 23 -j: 23 -H: 12 -G: 12 -h: 12 -g: 12 -i: 20 -s: 59 -t: 31 -w: 4 -L: 0 -B: 556 -I: 0 -W: 4 diff --git a/ext/standard/tests/time/mktime.phpt b/ext/standard/tests/time/mktime.phpt deleted file mode 100644 index 95d40b9b17..0000000000 --- a/ext/standard/tests/time/mktime.phpt +++ /dev/null @@ -1,49 +0,0 @@ ---TEST-- -mktime() ---FILE-- -<?php -$timezones = array( - 'GMT0', - 'GST-1GDT' -); - -foreach($timezones as $timezone) -{ - putenv('TZ='.$timezone); - - /* status of daylight saving time unknown */ - var_dump(mktime(0, 0, 0, 1, 1, 2002)); - /* status of daylight saving time unknown */ - var_dump(mktime(0, 0, 0, 1, 1, 2002, -1)); - /* daylight saving time is not in affect */ - var_dump(mktime(0, 0, 0, 1, 1, 2002, 0)); - /* daylight saving time is in affect */ - var_dump(mktime(0, 0, 0, 1, 1, 2002, 1)); - - /* status of daylight saving time unknown */ - var_dump(mktime(0, 0, 0, 7, 1, 2002)); - /* status of daylight saving time unknown */ - var_dump(mktime(0, 0, 0, 7, 1, 2002, -1)); - /* daylight saving time is not in affect */ - var_dump(mktime(0, 0, 0, 7, 1, 2002, 0)); - /* daylight saving time is in affect */ - var_dump(mktime(0, 0, 0, 7, 1, 2002, 1)); -} -?> ---EXPECT-- -int(1009843200) -int(1009843200) -int(1009843200) -int(1009843200) -int(1025481600) -int(1025481600) -int(1025481600) -int(1025481600) -int(1009839600) -int(1009839600) -int(1009839600) -int(1009836000) -int(1025474400) -int(1025474400) -int(1025478000) -int(1025474400) diff --git a/ext/standard/tests/versioning/version_compare.phpt b/ext/standard/tests/versioning/version_compare.phpt deleted file mode 100644 index 6ef49ba777..0000000000 --- a/ext/standard/tests/versioning/version_compare.phpt +++ /dev/null @@ -1,600 +0,0 @@ ---TEST-- -version_compare test ---FILE-- -<?php - -print "TESTING COMPARE\n"; -$special_forms = array("-dev", "a1", "b1", "RC1", "", "pl1"); -$operators = array( - "lt", "<", - "le", "<=", - "gt", ">", - "ge", ">=", - "eq", "=", "==", - "ne", "<>", "!=" -); -test("1", "2"); -test("10", "2"); -test("1.0", "1.1"); -test("1.2", "1.0.1"); -foreach ($special_forms as $f1) { - foreach ($special_forms as $f2) { - test("1.0$f1", "1.0$f2"); - } -} -print "TESTING OPERATORS\n"; -foreach ($special_forms as $f1) { - foreach ($special_forms as $f2) { - foreach ($operators as $op) { - $v1 = "1.0$f1"; - $v2 = "1.0$f2"; - $test = version_compare($v1, $v2, $op) ? "true" : "false"; - printf("%7s %2s %-7s : %s\n", $v1, $op, $v2, $test); - } - } -} - -function test($v1, $v2) { - $compare = version_compare($v1, $v2); - switch ($compare) { - case -1: - print "$v1 < $v2\n"; - break; - case 1: - print "$v1 > $v2\n"; - break; - case 0: - default: - print "$v1 = $v2\n"; - break; - } -} - -?> ---EXPECT-- -TESTING COMPARE -1 < 2 -10 > 2 -1.0 < 1.1 -1.2 > 1.0.1 -1.0-dev = 1.0-dev -1.0-dev < 1.0a1 -1.0-dev < 1.0b1 -1.0-dev < 1.0RC1 -1.0-dev < 1.0 -1.0-dev < 1.0pl1 -1.0a1 > 1.0-dev -1.0a1 = 1.0a1 -1.0a1 < 1.0b1 -1.0a1 < 1.0RC1 -1.0a1 < 1.0 -1.0a1 < 1.0pl1 -1.0b1 > 1.0-dev -1.0b1 > 1.0a1 -1.0b1 = 1.0b1 -1.0b1 < 1.0RC1 -1.0b1 < 1.0 -1.0b1 < 1.0pl1 -1.0RC1 > 1.0-dev -1.0RC1 > 1.0a1 -1.0RC1 > 1.0b1 -1.0RC1 = 1.0RC1 -1.0RC1 < 1.0 -1.0RC1 < 1.0pl1 -1.0 > 1.0-dev -1.0 > 1.0a1 -1.0 > 1.0b1 -1.0 > 1.0RC1 -1.0 = 1.0 -1.0 < 1.0pl1 -1.0pl1 > 1.0-dev -1.0pl1 > 1.0a1 -1.0pl1 > 1.0b1 -1.0pl1 > 1.0RC1 -1.0pl1 > 1.0 -1.0pl1 = 1.0pl1 -TESTING OPERATORS -1.0-dev lt 1.0-dev : false -1.0-dev < 1.0-dev : false -1.0-dev le 1.0-dev : true -1.0-dev <= 1.0-dev : true -1.0-dev gt 1.0-dev : false -1.0-dev > 1.0-dev : false -1.0-dev ge 1.0-dev : true -1.0-dev >= 1.0-dev : true -1.0-dev eq 1.0-dev : true -1.0-dev = 1.0-dev : true -1.0-dev == 1.0-dev : true -1.0-dev ne 1.0-dev : false -1.0-dev <> 1.0-dev : false -1.0-dev != 1.0-dev : false -1.0-dev lt 1.0a1 : true -1.0-dev < 1.0a1 : true -1.0-dev le 1.0a1 : true -1.0-dev <= 1.0a1 : true -1.0-dev gt 1.0a1 : false -1.0-dev > 1.0a1 : false -1.0-dev ge 1.0a1 : false -1.0-dev >= 1.0a1 : false -1.0-dev eq 1.0a1 : false -1.0-dev = 1.0a1 : false -1.0-dev == 1.0a1 : false -1.0-dev ne 1.0a1 : true -1.0-dev <> 1.0a1 : true -1.0-dev != 1.0a1 : true -1.0-dev lt 1.0b1 : true -1.0-dev < 1.0b1 : true -1.0-dev le 1.0b1 : true -1.0-dev <= 1.0b1 : true -1.0-dev gt 1.0b1 : false -1.0-dev > 1.0b1 : false -1.0-dev ge 1.0b1 : false -1.0-dev >= 1.0b1 : false -1.0-dev eq 1.0b1 : false -1.0-dev = 1.0b1 : false -1.0-dev == 1.0b1 : false -1.0-dev ne 1.0b1 : true -1.0-dev <> 1.0b1 : true -1.0-dev != 1.0b1 : true -1.0-dev lt 1.0RC1 : true -1.0-dev < 1.0RC1 : true -1.0-dev le 1.0RC1 : true -1.0-dev <= 1.0RC1 : true -1.0-dev gt 1.0RC1 : false -1.0-dev > 1.0RC1 : false -1.0-dev ge 1.0RC1 : false -1.0-dev >= 1.0RC1 : false -1.0-dev eq 1.0RC1 : false -1.0-dev = 1.0RC1 : false -1.0-dev == 1.0RC1 : false -1.0-dev ne 1.0RC1 : true -1.0-dev <> 1.0RC1 : true -1.0-dev != 1.0RC1 : true -1.0-dev lt 1.0 : true -1.0-dev < 1.0 : true -1.0-dev le 1.0 : true -1.0-dev <= 1.0 : true -1.0-dev gt 1.0 : false -1.0-dev > 1.0 : false -1.0-dev ge 1.0 : false -1.0-dev >= 1.0 : false -1.0-dev eq 1.0 : false -1.0-dev = 1.0 : false -1.0-dev == 1.0 : false -1.0-dev ne 1.0 : true -1.0-dev <> 1.0 : true -1.0-dev != 1.0 : true -1.0-dev lt 1.0pl1 : true -1.0-dev < 1.0pl1 : true -1.0-dev le 1.0pl1 : true -1.0-dev <= 1.0pl1 : true -1.0-dev gt 1.0pl1 : false -1.0-dev > 1.0pl1 : false -1.0-dev ge 1.0pl1 : false -1.0-dev >= 1.0pl1 : false -1.0-dev eq 1.0pl1 : false -1.0-dev = 1.0pl1 : false -1.0-dev == 1.0pl1 : false -1.0-dev ne 1.0pl1 : true -1.0-dev <> 1.0pl1 : true -1.0-dev != 1.0pl1 : true - 1.0a1 lt 1.0-dev : false - 1.0a1 < 1.0-dev : false - 1.0a1 le 1.0-dev : false - 1.0a1 <= 1.0-dev : false - 1.0a1 gt 1.0-dev : true - 1.0a1 > 1.0-dev : true - 1.0a1 ge 1.0-dev : true - 1.0a1 >= 1.0-dev : true - 1.0a1 eq 1.0-dev : false - 1.0a1 = 1.0-dev : false - 1.0a1 == 1.0-dev : false - 1.0a1 ne 1.0-dev : true - 1.0a1 <> 1.0-dev : true - 1.0a1 != 1.0-dev : true - 1.0a1 lt 1.0a1 : false - 1.0a1 < 1.0a1 : false - 1.0a1 le 1.0a1 : true - 1.0a1 <= 1.0a1 : true - 1.0a1 gt 1.0a1 : false - 1.0a1 > 1.0a1 : false - 1.0a1 ge 1.0a1 : true - 1.0a1 >= 1.0a1 : true - 1.0a1 eq 1.0a1 : true - 1.0a1 = 1.0a1 : true - 1.0a1 == 1.0a1 : true - 1.0a1 ne 1.0a1 : false - 1.0a1 <> 1.0a1 : false - 1.0a1 != 1.0a1 : false - 1.0a1 lt 1.0b1 : true - 1.0a1 < 1.0b1 : true - 1.0a1 le 1.0b1 : true - 1.0a1 <= 1.0b1 : true - 1.0a1 gt 1.0b1 : false - 1.0a1 > 1.0b1 : false - 1.0a1 ge 1.0b1 : false - 1.0a1 >= 1.0b1 : false - 1.0a1 eq 1.0b1 : false - 1.0a1 = 1.0b1 : false - 1.0a1 == 1.0b1 : false - 1.0a1 ne 1.0b1 : true - 1.0a1 <> 1.0b1 : true - 1.0a1 != 1.0b1 : true - 1.0a1 lt 1.0RC1 : true - 1.0a1 < 1.0RC1 : true - 1.0a1 le 1.0RC1 : true - 1.0a1 <= 1.0RC1 : true - 1.0a1 gt 1.0RC1 : false - 1.0a1 > 1.0RC1 : false - 1.0a1 ge 1.0RC1 : false - 1.0a1 >= 1.0RC1 : false - 1.0a1 eq 1.0RC1 : false - 1.0a1 = 1.0RC1 : false - 1.0a1 == 1.0RC1 : false - 1.0a1 ne 1.0RC1 : true - 1.0a1 <> 1.0RC1 : true - 1.0a1 != 1.0RC1 : true - 1.0a1 lt 1.0 : true - 1.0a1 < 1.0 : true - 1.0a1 le 1.0 : true - 1.0a1 <= 1.0 : true - 1.0a1 gt 1.0 : false - 1.0a1 > 1.0 : false - 1.0a1 ge 1.0 : false - 1.0a1 >= 1.0 : false - 1.0a1 eq 1.0 : false - 1.0a1 = 1.0 : false - 1.0a1 == 1.0 : false - 1.0a1 ne 1.0 : true - 1.0a1 <> 1.0 : true - 1.0a1 != 1.0 : true - 1.0a1 lt 1.0pl1 : true - 1.0a1 < 1.0pl1 : true - 1.0a1 le 1.0pl1 : true - 1.0a1 <= 1.0pl1 : true - 1.0a1 gt 1.0pl1 : false - 1.0a1 > 1.0pl1 : false - 1.0a1 ge 1.0pl1 : false - 1.0a1 >= 1.0pl1 : false - 1.0a1 eq 1.0pl1 : false - 1.0a1 = 1.0pl1 : false - 1.0a1 == 1.0pl1 : false - 1.0a1 ne 1.0pl1 : true - 1.0a1 <> 1.0pl1 : true - 1.0a1 != 1.0pl1 : true - 1.0b1 lt 1.0-dev : false - 1.0b1 < 1.0-dev : false - 1.0b1 le 1.0-dev : false - 1.0b1 <= 1.0-dev : false - 1.0b1 gt 1.0-dev : true - 1.0b1 > 1.0-dev : true - 1.0b1 ge 1.0-dev : true - 1.0b1 >= 1.0-dev : true - 1.0b1 eq 1.0-dev : false - 1.0b1 = 1.0-dev : false - 1.0b1 == 1.0-dev : false - 1.0b1 ne 1.0-dev : true - 1.0b1 <> 1.0-dev : true - 1.0b1 != 1.0-dev : true - 1.0b1 lt 1.0a1 : false - 1.0b1 < 1.0a1 : false - 1.0b1 le 1.0a1 : false - 1.0b1 <= 1.0a1 : false - 1.0b1 gt 1.0a1 : true - 1.0b1 > 1.0a1 : true - 1.0b1 ge 1.0a1 : true - 1.0b1 >= 1.0a1 : true - 1.0b1 eq 1.0a1 : false - 1.0b1 = 1.0a1 : false - 1.0b1 == 1.0a1 : false - 1.0b1 ne 1.0a1 : true - 1.0b1 <> 1.0a1 : true - 1.0b1 != 1.0a1 : true - 1.0b1 lt 1.0b1 : false - 1.0b1 < 1.0b1 : false - 1.0b1 le 1.0b1 : true - 1.0b1 <= 1.0b1 : true - 1.0b1 gt 1.0b1 : false - 1.0b1 > 1.0b1 : false - 1.0b1 ge 1.0b1 : true - 1.0b1 >= 1.0b1 : true - 1.0b1 eq 1.0b1 : true - 1.0b1 = 1.0b1 : true - 1.0b1 == 1.0b1 : true - 1.0b1 ne 1.0b1 : false - 1.0b1 <> 1.0b1 : false - 1.0b1 != 1.0b1 : false - 1.0b1 lt 1.0RC1 : true - 1.0b1 < 1.0RC1 : true - 1.0b1 le 1.0RC1 : true - 1.0b1 <= 1.0RC1 : true - 1.0b1 gt 1.0RC1 : false - 1.0b1 > 1.0RC1 : false - 1.0b1 ge 1.0RC1 : false - 1.0b1 >= 1.0RC1 : false - 1.0b1 eq 1.0RC1 : false - 1.0b1 = 1.0RC1 : false - 1.0b1 == 1.0RC1 : false - 1.0b1 ne 1.0RC1 : true - 1.0b1 <> 1.0RC1 : true - 1.0b1 != 1.0RC1 : true - 1.0b1 lt 1.0 : true - 1.0b1 < 1.0 : true - 1.0b1 le 1.0 : true - 1.0b1 <= 1.0 : true - 1.0b1 gt 1.0 : false - 1.0b1 > 1.0 : false - 1.0b1 ge 1.0 : false - 1.0b1 >= 1.0 : false - 1.0b1 eq 1.0 : false - 1.0b1 = 1.0 : false - 1.0b1 == 1.0 : false - 1.0b1 ne 1.0 : true - 1.0b1 <> 1.0 : true - 1.0b1 != 1.0 : true - 1.0b1 lt 1.0pl1 : true - 1.0b1 < 1.0pl1 : true - 1.0b1 le 1.0pl1 : true - 1.0b1 <= 1.0pl1 : true - 1.0b1 gt 1.0pl1 : false - 1.0b1 > 1.0pl1 : false - 1.0b1 ge 1.0pl1 : false - 1.0b1 >= 1.0pl1 : false - 1.0b1 eq 1.0pl1 : false - 1.0b1 = 1.0pl1 : false - 1.0b1 == 1.0pl1 : false - 1.0b1 ne 1.0pl1 : true - 1.0b1 <> 1.0pl1 : true - 1.0b1 != 1.0pl1 : true - 1.0RC1 lt 1.0-dev : false - 1.0RC1 < 1.0-dev : false - 1.0RC1 le 1.0-dev : false - 1.0RC1 <= 1.0-dev : false - 1.0RC1 gt 1.0-dev : true - 1.0RC1 > 1.0-dev : true - 1.0RC1 ge 1.0-dev : true - 1.0RC1 >= 1.0-dev : true - 1.0RC1 eq 1.0-dev : false - 1.0RC1 = 1.0-dev : false - 1.0RC1 == 1.0-dev : false - 1.0RC1 ne 1.0-dev : true - 1.0RC1 <> 1.0-dev : true - 1.0RC1 != 1.0-dev : true - 1.0RC1 lt 1.0a1 : false - 1.0RC1 < 1.0a1 : false - 1.0RC1 le 1.0a1 : false - 1.0RC1 <= 1.0a1 : false - 1.0RC1 gt 1.0a1 : true - 1.0RC1 > 1.0a1 : true - 1.0RC1 ge 1.0a1 : true - 1.0RC1 >= 1.0a1 : true - 1.0RC1 eq 1.0a1 : false - 1.0RC1 = 1.0a1 : false - 1.0RC1 == 1.0a1 : false - 1.0RC1 ne 1.0a1 : true - 1.0RC1 <> 1.0a1 : true - 1.0RC1 != 1.0a1 : true - 1.0RC1 lt 1.0b1 : false - 1.0RC1 < 1.0b1 : false - 1.0RC1 le 1.0b1 : false - 1.0RC1 <= 1.0b1 : false - 1.0RC1 gt 1.0b1 : true - 1.0RC1 > 1.0b1 : true - 1.0RC1 ge 1.0b1 : true - 1.0RC1 >= 1.0b1 : true - 1.0RC1 eq 1.0b1 : false - 1.0RC1 = 1.0b1 : false - 1.0RC1 == 1.0b1 : false - 1.0RC1 ne 1.0b1 : true - 1.0RC1 <> 1.0b1 : true - 1.0RC1 != 1.0b1 : true - 1.0RC1 lt 1.0RC1 : false - 1.0RC1 < 1.0RC1 : false - 1.0RC1 le 1.0RC1 : true - 1.0RC1 <= 1.0RC1 : true - 1.0RC1 gt 1.0RC1 : false - 1.0RC1 > 1.0RC1 : false - 1.0RC1 ge 1.0RC1 : true - 1.0RC1 >= 1.0RC1 : true - 1.0RC1 eq 1.0RC1 : true - 1.0RC1 = 1.0RC1 : true - 1.0RC1 == 1.0RC1 : true - 1.0RC1 ne 1.0RC1 : false - 1.0RC1 <> 1.0RC1 : false - 1.0RC1 != 1.0RC1 : false - 1.0RC1 lt 1.0 : true - 1.0RC1 < 1.0 : true - 1.0RC1 le 1.0 : true - 1.0RC1 <= 1.0 : true - 1.0RC1 gt 1.0 : false - 1.0RC1 > 1.0 : false - 1.0RC1 ge 1.0 : false - 1.0RC1 >= 1.0 : false - 1.0RC1 eq 1.0 : false - 1.0RC1 = 1.0 : false - 1.0RC1 == 1.0 : false - 1.0RC1 ne 1.0 : true - 1.0RC1 <> 1.0 : true - 1.0RC1 != 1.0 : true - 1.0RC1 lt 1.0pl1 : true - 1.0RC1 < 1.0pl1 : true - 1.0RC1 le 1.0pl1 : true - 1.0RC1 <= 1.0pl1 : true - 1.0RC1 gt 1.0pl1 : false - 1.0RC1 > 1.0pl1 : false - 1.0RC1 ge 1.0pl1 : false - 1.0RC1 >= 1.0pl1 : false - 1.0RC1 eq 1.0pl1 : false - 1.0RC1 = 1.0pl1 : false - 1.0RC1 == 1.0pl1 : false - 1.0RC1 ne 1.0pl1 : true - 1.0RC1 <> 1.0pl1 : true - 1.0RC1 != 1.0pl1 : true - 1.0 lt 1.0-dev : false - 1.0 < 1.0-dev : false - 1.0 le 1.0-dev : false - 1.0 <= 1.0-dev : false - 1.0 gt 1.0-dev : true - 1.0 > 1.0-dev : true - 1.0 ge 1.0-dev : true - 1.0 >= 1.0-dev : true - 1.0 eq 1.0-dev : false - 1.0 = 1.0-dev : false - 1.0 == 1.0-dev : false - 1.0 ne 1.0-dev : true - 1.0 <> 1.0-dev : true - 1.0 != 1.0-dev : true - 1.0 lt 1.0a1 : false - 1.0 < 1.0a1 : false - 1.0 le 1.0a1 : false - 1.0 <= 1.0a1 : false - 1.0 gt 1.0a1 : true - 1.0 > 1.0a1 : true - 1.0 ge 1.0a1 : true - 1.0 >= 1.0a1 : true - 1.0 eq 1.0a1 : false - 1.0 = 1.0a1 : false - 1.0 == 1.0a1 : false - 1.0 ne 1.0a1 : true - 1.0 <> 1.0a1 : true - 1.0 != 1.0a1 : true - 1.0 lt 1.0b1 : false - 1.0 < 1.0b1 : false - 1.0 le 1.0b1 : false - 1.0 <= 1.0b1 : false - 1.0 gt 1.0b1 : true - 1.0 > 1.0b1 : true - 1.0 ge 1.0b1 : true - 1.0 >= 1.0b1 : true - 1.0 eq 1.0b1 : false - 1.0 = 1.0b1 : false - 1.0 == 1.0b1 : false - 1.0 ne 1.0b1 : true - 1.0 <> 1.0b1 : true - 1.0 != 1.0b1 : true - 1.0 lt 1.0RC1 : false - 1.0 < 1.0RC1 : false - 1.0 le 1.0RC1 : false - 1.0 <= 1.0RC1 : false - 1.0 gt 1.0RC1 : true - 1.0 > 1.0RC1 : true - 1.0 ge 1.0RC1 : true - 1.0 >= 1.0RC1 : true - 1.0 eq 1.0RC1 : false - 1.0 = 1.0RC1 : false - 1.0 == 1.0RC1 : false - 1.0 ne 1.0RC1 : true - 1.0 <> 1.0RC1 : true - 1.0 != 1.0RC1 : true - 1.0 lt 1.0 : false - 1.0 < 1.0 : false - 1.0 le 1.0 : true - 1.0 <= 1.0 : true - 1.0 gt 1.0 : false - 1.0 > 1.0 : false - 1.0 ge 1.0 : true - 1.0 >= 1.0 : true - 1.0 eq 1.0 : true - 1.0 = 1.0 : true - 1.0 == 1.0 : true - 1.0 ne 1.0 : false - 1.0 <> 1.0 : false - 1.0 != 1.0 : false - 1.0 lt 1.0pl1 : true - 1.0 < 1.0pl1 : true - 1.0 le 1.0pl1 : true - 1.0 <= 1.0pl1 : true - 1.0 gt 1.0pl1 : false - 1.0 > 1.0pl1 : false - 1.0 ge 1.0pl1 : false - 1.0 >= 1.0pl1 : false - 1.0 eq 1.0pl1 : false - 1.0 = 1.0pl1 : false - 1.0 == 1.0pl1 : false - 1.0 ne 1.0pl1 : true - 1.0 <> 1.0pl1 : true - 1.0 != 1.0pl1 : true - 1.0pl1 lt 1.0-dev : false - 1.0pl1 < 1.0-dev : false - 1.0pl1 le 1.0-dev : false - 1.0pl1 <= 1.0-dev : false - 1.0pl1 gt 1.0-dev : true - 1.0pl1 > 1.0-dev : true - 1.0pl1 ge 1.0-dev : true - 1.0pl1 >= 1.0-dev : true - 1.0pl1 eq 1.0-dev : false - 1.0pl1 = 1.0-dev : false - 1.0pl1 == 1.0-dev : false - 1.0pl1 ne 1.0-dev : true - 1.0pl1 <> 1.0-dev : true - 1.0pl1 != 1.0-dev : true - 1.0pl1 lt 1.0a1 : false - 1.0pl1 < 1.0a1 : false - 1.0pl1 le 1.0a1 : false - 1.0pl1 <= 1.0a1 : false - 1.0pl1 gt 1.0a1 : true - 1.0pl1 > 1.0a1 : true - 1.0pl1 ge 1.0a1 : true - 1.0pl1 >= 1.0a1 : true - 1.0pl1 eq 1.0a1 : false - 1.0pl1 = 1.0a1 : false - 1.0pl1 == 1.0a1 : false - 1.0pl1 ne 1.0a1 : true - 1.0pl1 <> 1.0a1 : true - 1.0pl1 != 1.0a1 : true - 1.0pl1 lt 1.0b1 : false - 1.0pl1 < 1.0b1 : false - 1.0pl1 le 1.0b1 : false - 1.0pl1 <= 1.0b1 : false - 1.0pl1 gt 1.0b1 : true - 1.0pl1 > 1.0b1 : true - 1.0pl1 ge 1.0b1 : true - 1.0pl1 >= 1.0b1 : true - 1.0pl1 eq 1.0b1 : false - 1.0pl1 = 1.0b1 : false - 1.0pl1 == 1.0b1 : false - 1.0pl1 ne 1.0b1 : true - 1.0pl1 <> 1.0b1 : true - 1.0pl1 != 1.0b1 : true - 1.0pl1 lt 1.0RC1 : false - 1.0pl1 < 1.0RC1 : false - 1.0pl1 le 1.0RC1 : false - 1.0pl1 <= 1.0RC1 : false - 1.0pl1 gt 1.0RC1 : true - 1.0pl1 > 1.0RC1 : true - 1.0pl1 ge 1.0RC1 : true - 1.0pl1 >= 1.0RC1 : true - 1.0pl1 eq 1.0RC1 : false - 1.0pl1 = 1.0RC1 : false - 1.0pl1 == 1.0RC1 : false - 1.0pl1 ne 1.0RC1 : true - 1.0pl1 <> 1.0RC1 : true - 1.0pl1 != 1.0RC1 : true - 1.0pl1 lt 1.0 : false - 1.0pl1 < 1.0 : false - 1.0pl1 le 1.0 : false - 1.0pl1 <= 1.0 : false - 1.0pl1 gt 1.0 : true - 1.0pl1 > 1.0 : true - 1.0pl1 ge 1.0 : true - 1.0pl1 >= 1.0 : true - 1.0pl1 eq 1.0 : false - 1.0pl1 = 1.0 : false - 1.0pl1 == 1.0 : false - 1.0pl1 ne 1.0 : true - 1.0pl1 <> 1.0 : true - 1.0pl1 != 1.0 : true - 1.0pl1 lt 1.0pl1 : false - 1.0pl1 < 1.0pl1 : false - 1.0pl1 le 1.0pl1 : true - 1.0pl1 <= 1.0pl1 : true - 1.0pl1 gt 1.0pl1 : false - 1.0pl1 > 1.0pl1 : false - 1.0pl1 ge 1.0pl1 : true - 1.0pl1 >= 1.0pl1 : true - 1.0pl1 eq 1.0pl1 : true - 1.0pl1 = 1.0pl1 : true - 1.0pl1 == 1.0pl1 : true - 1.0pl1 ne 1.0pl1 : false - 1.0pl1 <> 1.0pl1 : false - 1.0pl1 != 1.0pl1 : false |