diff options
author | Jani Taskinen <jani@php.net> | 2007-11-02 19:41:12 +0000 |
---|---|---|
committer | Jani Taskinen <jani@php.net> | 2007-11-02 19:41:12 +0000 |
commit | a541bb80788100606c59bf5a67478234a2045a6a (patch) | |
tree | c782839faa71f4f23368c3efba128d89a723edac /ext | |
parent | b48925117750da2a7fb7cff629e3852d13917f2f (diff) | |
download | php-git-a541bb80788100606c59bf5a67478234a2045a6a.tar.gz |
- Fix tests
- Update README.PARAMETER_PARSING_API
Diffstat (limited to 'ext')
157 files changed, 4845 insertions, 2415 deletions
diff --git a/ext/dom/tests/dom003.phpt b/ext/dom/tests/dom003.phpt index 1eb6d4a4f7..bc864432b7 100644 --- a/ext/dom/tests/dom003.phpt +++ b/ext/dom/tests/dom003.phpt @@ -22,15 +22,15 @@ $rootNode->appendChild($rootNode); --EXPECTF-- --- Catch exception with try/catch object(DOMException)#%d (6) { - ["message:protected"]=> + ["message":protected]=> string(23) "Hierarchy Request Error" - ["string:private"]=> + ["string":"Exception":private]=> string(0) "" - ["file:protected"]=> + ["file":protected]=> string(%d) "%sdom003.php" - ["line:protected"]=> + ["line":protected]=> int(8) - ["trace:private"]=> + ["trace":"Exception":private]=> array(1) { [0]=> array(6) { diff --git a/ext/dom/tests/dom_set_attr_node.phpt b/ext/dom/tests/dom_set_attr_node.phpt index 7d783c5620..9749083874 100644 --- a/ext/dom/tests/dom_set_attr_node.phpt +++ b/ext/dom/tests/dom_set_attr_node.phpt @@ -32,15 +32,15 @@ try { ?> --EXPECTF-- object(DOMException)#%d (6) { - ["message:protected"]=> + ["message":protected]=> string(20) "Wrong Document Error" - ["string:private"]=> + ["string":"Exception":private]=> string(0) "" - ["file:protected"]=> + ["file":protected]=> string(%d) "%sdom_set_attr_node.php" - ["line:protected"]=> + ["line":protected]=> int(%d) - ["trace:private"]=> + ["trace":"Exception":private]=> array(1) { [0]=> array(6) { diff --git a/ext/spl/tests/array_001.phpt b/ext/spl/tests/array_001.phpt index 1c7566ecb9..79dfc424e7 100755 --- a/ext/spl/tests/array_001.phpt +++ b/ext/spl/tests/array_001.phpt @@ -38,11 +38,14 @@ var_dump($ar); ===DONE=== <?php exit(0); ?> --EXPECTF-- -object(ArrayObject)#1 (2) { - [0]=> - int(0) - [1]=> - int(1) +object(ArrayObject)#1 (1) { + ["storage":"ArrayObject":private]=> + array(2) { + [0]=> + int(0) + [1]=> + int(1) + } } int(2) int(3) @@ -61,17 +64,20 @@ array(6) { int(5) } string(1) "a" -object(ArrayObject)#1 (5) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(2) - [3]=> - int(3) - ["a"]=> - string(1) "a" +object(ArrayObject)#1 (1) { + ["storage":"ArrayObject":private]=> + array(5) { + [0]=> + int(0) + [1]=> + int(1) + [2]=> + int(2) + [3]=> + int(3) + ["a"]=> + string(1) "a" + } } int(0) @@ -84,20 +90,26 @@ NULL Notice: Undefined offset: 7 in %sarray_001.php on line %d Notice: Undefined index: c in %sarray_001.php on line %d -object(ArrayObject)#1 (2) { - [0]=> - int(0) - [2]=> - int(2) +object(ArrayObject)#1 (1) { + ["storage":"ArrayObject":private]=> + array(2) { + [0]=> + int(0) + [2]=> + int(2) + } } -object(ArrayObject)#1 (4) { - [0]=> - int(0) - [2]=> - int(2) - [4]=> - string(1) "3" - [5]=> - int(4) +object(ArrayObject)#1 (1) { + ["storage":"ArrayObject":private]=> + array(4) { + [0]=> + int(0) + [2]=> + int(2) + [4]=> + string(1) "3" + [5]=> + int(4) + } } ===DONE=== diff --git a/ext/spl/tests/array_002.phpt b/ext/spl/tests/array_002.phpt index 960253f335..315f1e6913 100755 --- a/ext/spl/tests/array_002.phpt +++ b/ext/spl/tests/array_002.phpt @@ -22,16 +22,22 @@ var_dump($arrayObject); ===DONE=== <?php exit(0); ?> --EXPECTF-- -object(ArrayObject)#%d (5) { - [1]=> - string(3) "one" - [2]=> - string(3) "two" - [3]=> - string(5) "three" - [4]=> - string(4) "four" - [5]=> - string(4) "five" +object(ArrayObject)#%d (1) { + ["storage":"ArrayObject":private]=> + object(ArrayObject)#1 (1) { + ["storage":"ArrayObject":private]=> + array(5) { + [1]=> + string(3) "one" + [2]=> + string(3) "two" + [3]=> + string(5) "three" + [4]=> + string(4) "four" + [5]=> + string(4) "five" + } + } } ===DONE=== diff --git a/ext/spl/tests/array_003.phpt b/ext/spl/tests/array_003.phpt index 386c7bcf7d..a7f44e1ca3 100755 --- a/ext/spl/tests/array_003.phpt +++ b/ext/spl/tests/array_003.phpt @@ -43,17 +43,21 @@ test Object ( [pub] => public [pro:protected] => protected - [pri:private] => private + [pri:test:private] => private [imp] => implicit [dyn] => dynamic ) ArrayObject Object ( - [pub] => public - [pro:protected] => protected - [pri:private] => private - [imp] => implicit - [dyn] => dynamic + [storage:ArrayObject:private] => test Object + ( + [pub] => public + [pro:protected] => protected + [pri:test:private] => private + [imp] => implicit + [dyn] => dynamic + ) + ) pub => public imp => implicit diff --git a/ext/spl/tests/array_004.phpt b/ext/spl/tests/array_004.phpt index e7abf2b1dc..084cf849a5 100755 --- a/ext/spl/tests/array_004.phpt +++ b/ext/spl/tests/array_004.phpt @@ -3,7 +3,7 @@ SPL: ArrayIterator --SKIPIF-- <?php if (!extension_loaded("spl")) print "skip"; ?> --INI-- -allow_call_time_pass_reference=1 +error_reporting=2047 --FILE-- <?php diff --git a/ext/spl/tests/array_006.phpt b/ext/spl/tests/array_006.phpt index 5dd9bdec7a..274007aea4 100755 --- a/ext/spl/tests/array_006.phpt +++ b/ext/spl/tests/array_006.phpt @@ -3,7 +3,7 @@ SPL: ArrayIterator without ArrayObject --SKIPIF-- <?php if (!extension_loaded("spl")) print "skip"; ?> --INI-- -allow_call_time_pass_reference=1 +error_reporting=2047 --FILE-- <?php diff --git a/ext/spl/tests/array_007.phpt b/ext/spl/tests/array_007.phpt index 3e74e00da4..269d71cb6e 100755 --- a/ext/spl/tests/array_007.phpt +++ b/ext/spl/tests/array_007.phpt @@ -47,17 +47,25 @@ test Object ( [pub] => public [pro:protected] => protected - [pri:private] => private + [pri:test:private] => private [imp] => implicit [dyn] => dynamic ) ArrayIterator Object ( - [pub] => public - [pro:protected] => protected - [pri:private] => private - [imp] => implicit - [dyn] => dynamic + [storage:ArrayIterator:private] => ArrayObject Object + ( + [storage:ArrayObject:private] => test Object + ( + [pub] => public + [pro:protected] => protected + [pri:test:private] => private + [imp] => implicit + [dyn] => dynamic + ) + + ) + ) pub => public imp => implicit diff --git a/ext/spl/tests/array_008.phpt b/ext/spl/tests/array_008.phpt index 613e324776..883a35873d 100755 --- a/ext/spl/tests/array_008.phpt +++ b/ext/spl/tests/array_008.phpt @@ -3,7 +3,7 @@ SPL: ArrayIterator and foreach reference --SKIPIF-- <?php if (!extension_loaded("spl")) print "skip"; ?> --INI-- -allow_call_time_pass_reference=1 +error_reporting=2047 --FILE-- <?php diff --git a/ext/spl/tests/array_015.phpt b/ext/spl/tests/array_015.phpt index 79d6a867f0..a21bab5344 100755 --- a/ext/spl/tests/array_015.phpt +++ b/ext/spl/tests/array_015.phpt @@ -43,38 +43,47 @@ var_dump($ar); ===DONE=== <?php exit(0); ?> --EXPECTF-- -object(ArrayObject)#%d (5) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) +object(ArrayObject)#%d (1) { + %s"storage"%s"ArrayObject":private]=> + array(5) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(4) + [4]=> + int(5) + } } Notice: ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in %sarray_015.php on line %d int(2) -object(ArrayObject)#%d (4) { - [1]=> - int(2) - [2]=> - int(3) - [3]=> - int(4) - [4]=> - int(5) +object(ArrayObject)#%d (1) { + %s"storage"%s"ArrayObject":private]=> + array(4) { + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(4) + [4]=> + int(5) + } } 1=>2 3=>4 -object(ArrayObject)#%d (2) { - [1]=> - int(2) - [3]=> - int(4) +object(ArrayObject)#%d (1) { + %s"storage"%s"ArrayObject":private]=> + array(2) { + [1]=> + int(2) + [3]=> + int(4) + } } 1=>2 @@ -82,6 +91,9 @@ Notice: main(): ArrayIterator::next(): Array was modified outside object and int 3=>4 Notice: main(): ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in %sarray_015.php on line %d -object(ArrayObject)#%d (0) { +object(ArrayObject)#%d (1) { + %s"storage"%s"ArrayObject":private]=> + array(0) { + } } ===DONE=== diff --git a/ext/spl/tests/array_017.phpt b/ext/spl/tests/array_017.phpt index 72bf639986..51563d1f6a 100755 --- a/ext/spl/tests/array_017.phpt +++ b/ext/spl/tests/array_017.phpt @@ -148,13 +148,26 @@ array(3) { int(42) } ["$this"]=> - object(ArrayObjectEx)#1 (3) { - [0]=> - int(1) - ["a"]=> - int(25) + object(ArrayObjectEx)#%d (6) { ["pub1"]=> - int(42) + int(1) + ["pro1":protected]=> + int(2) + ["pri1":"ArrayObjectEx":private]=> + int(3) + ["imp1"]=> + int(4) + ["dyn1"]=> + int(5) + ["storage":"ArrayObject":private]=> + array(3) { + [0]=> + int(1) + ["a"]=> + int(25) + ["pub1"]=> + int(42) + } } } ArrayObjectEx::show() @@ -172,13 +185,39 @@ array(3) { int(42) } ["$this"]=> - object(ArrayIteratorEx)#2 (3) { - [0]=> + object(ArrayIteratorEx)#%d (6) { + ["pub2"]=> int(1) - ["a"]=> - int(25) - ["pub1"]=> - int(42) + ["pro2":protected]=> + int(2) + ["pri2":"ArrayIteratorEx":private]=> + int(3) + ["imp2"]=> + int(4) + ["dyn2"]=> + int(5) + ["storage":"ArrayIterator":private]=> + object(ArrayObjectEx)#%d (6) { + ["pub1"]=> + int(1) + ["pro1":protected]=> + int(2) + ["pri1":"ArrayObjectEx":private]=> + int(3) + ["imp1"]=> + int(4) + ["dyn1"]=> + int(5) + ["storage":"ArrayObject":private]=> + array(3) { + [0]=> + int(1) + ["a"]=> + int(25) + ["pub1"]=> + int(42) + } + } } } array(1) { @@ -208,13 +247,39 @@ array(3) { int(42) } ["$this"]=> - object(ArrayIteratorEx)#3 (3) { - [0]=> + object(ArrayIteratorEx)#%d (6) { + ["pub2"]=> int(1) - ["a"]=> - int(25) - ["pub1"]=> - int(42) + ["pro2":protected]=> + int(2) + ["pri2":"ArrayIteratorEx":private]=> + int(3) + ["imp2"]=> + int(4) + ["dyn2"]=> + int(5) + ["storage":"ArrayIterator":private]=> + object(ArrayObjectEx)#%d (6) { + ["pub1"]=> + int(1) + ["pro1":protected]=> + int(2) + ["pri1":"ArrayObjectEx":private]=> + int(3) + ["imp1"]=> + int(4) + ["dyn1"]=> + int(5) + ["storage":"ArrayObject":private]=> + array(3) { + [0]=> + int(1) + ["a"]=> + int(25) + ["pub1"]=> + int(42) + } + } } } array(1) { @@ -260,17 +325,26 @@ array(3) { int(5) } ["$this"]=> - object(ArrayObjectEx)#1 (5) { + object(ArrayObjectEx)#%d (6) { ["pub1"]=> int(1) - ["pro1:protected"]=> + ["pro1":protected]=> int(2) - ["pri1:private"]=> + ["pri1":"ArrayObjectEx":private]=> int(3) ["imp1"]=> int(4) ["dyn1"]=> int(5) + ["storage":"ArrayObject":private]=> + array(3) { + [0]=> + int(1) + ["a"]=> + int(25) + ["pub1"]=> + int(42) + } } } ArrayObjectEx::show() @@ -294,17 +368,39 @@ array(3) { int(5) } ["$this"]=> - object(ArrayIteratorEx)#3 (5) { + object(ArrayIteratorEx)#%d (6) { ["pub2"]=> int(1) - ["pro2:protected"]=> + ["pro2":protected]=> int(2) - ["pri2:private"]=> + ["pri2":"ArrayIteratorEx":private]=> int(3) ["imp2"]=> int(4) ["dyn2"]=> int(5) + ["storage":"ArrayIterator":private]=> + object(ArrayObjectEx)#%d (6) { + ["pub1"]=> + int(1) + ["pro1":protected]=> + int(2) + ["pri1":"ArrayObjectEx":private]=> + int(3) + ["imp1"]=> + int(4) + ["dyn1"]=> + int(5) + ["storage":"ArrayObject":private]=> + array(3) { + [0]=> + int(1) + ["a"]=> + int(25) + ["pub1"]=> + int(42) + } + } } } array(1) { @@ -340,17 +436,39 @@ array(3) { int(5) } ["$this"]=> - object(ArrayIteratorEx)#2 (5) { + object(ArrayIteratorEx)#%d (6) { ["pub2"]=> int(1) - ["pro2:protected"]=> + ["pro2":protected]=> int(2) - ["pri2:private"]=> + ["pri2":"ArrayIteratorEx":private]=> int(3) ["imp2"]=> int(4) ["dyn2"]=> int(5) + ["storage":"ArrayIterator":private]=> + object(ArrayObjectEx)#%d (6) { + ["pub1"]=> + int(1) + ["pro1":protected]=> + int(2) + ["pri1":"ArrayObjectEx":private]=> + int(3) + ["imp1"]=> + int(4) + ["dyn1"]=> + int(5) + ["storage":"ArrayObject":private]=> + array(3) { + [0]=> + int(1) + ["a"]=> + int(25) + ["pub1"]=> + int(42) + } + } } } array(1) { @@ -398,12 +516,12 @@ array(3) { int(5) } ["$this"]=> - object(ArrayObjectEx)#1 (5) { + object(ArrayObjectEx)#%d (5) { ["pub1"]=> int(1) - ["pro1:protected"]=> + ["pro1":protected]=> int(2) - ["pri1:private"]=> + ["pri1":"ArrayObjectEx":private]=> int(3) ["imp1"]=> int(4) @@ -430,17 +548,30 @@ array(3) { int(5) } ["$this"]=> - object(ArrayIteratorEx)#2 (5) { - ["pub1"]=> + object(ArrayIteratorEx)#%d (6) { + ["pub2"]=> int(1) - ["pro1:protected"]=> + ["pro2":protected]=> int(2) - ["pri1:private"]=> + ["pri2":"ArrayIteratorEx":private]=> int(3) - ["imp1"]=> + ["imp2"]=> int(4) - ["dyn1"]=> + ["dyn2"]=> int(5) + ["storage":"ArrayIterator":private]=> + object(ArrayObjectEx)#%d (5) { + ["pub1"]=> + int(1) + ["pro1":protected]=> + int(2) + ["pri1":"ArrayObjectEx":private]=> + int(3) + ["imp1"]=> + int(4) + ["dyn1"]=> + int(5) + } } } array(1) { @@ -474,17 +605,30 @@ array(3) { int(5) } ["$this"]=> - object(ArrayIteratorEx)#3 (5) { - ["pub1"]=> + object(ArrayIteratorEx)#%d (6) { + ["pub2"]=> int(1) - ["pro1:protected"]=> + ["pro2":protected]=> int(2) - ["pri1:private"]=> + ["pri2":"ArrayIteratorEx":private]=> int(3) - ["imp1"]=> + ["imp2"]=> int(4) - ["dyn1"]=> + ["dyn2"]=> int(5) + ["storage":"ArrayIterator":private]=> + object(ArrayObjectEx)#%d (5) { + ["pub1"]=> + int(1) + ["pro1":protected]=> + int(2) + ["pri1":"ArrayObjectEx":private]=> + int(3) + ["imp1"]=> + int(4) + ["dyn1"]=> + int(5) + } } } array(1) { @@ -530,12 +674,12 @@ array(3) { int(5) } ["$this"]=> - object(ArrayObjectEx)#1 (5) { + object(ArrayObjectEx)#%d (5) { ["pub1"]=> int(1) - ["pro1:protected"]=> + ["pro1":protected]=> int(2) - ["pri1:private"]=> + ["pri1":"ArrayObjectEx":private]=> int(3) ["imp1"]=> int(4) @@ -564,17 +708,30 @@ array(3) { int(5) } ["$this"]=> - object(ArrayIteratorEx)#3 (5) { + object(ArrayIteratorEx)#%d (6) { ["pub2"]=> int(1) - ["pro2:protected"]=> + ["pro2":protected]=> int(2) - ["pri2:private"]=> + ["pri2":"ArrayIteratorEx":private]=> int(3) ["imp2"]=> int(4) ["dyn2"]=> int(5) + ["storage":"ArrayIterator":private]=> + object(ArrayObjectEx)#%d (5) { + ["pub1"]=> + int(1) + ["pro1":protected]=> + int(2) + ["pri1":"ArrayObjectEx":private]=> + int(3) + ["imp1"]=> + int(4) + ["dyn1"]=> + int(5) + } } } array(1) { @@ -610,17 +767,30 @@ array(3) { int(5) } ["$this"]=> - object(ArrayIteratorEx)#2 (5) { + object(ArrayIteratorEx)#%d (6) { ["pub2"]=> int(1) - ["pro2:protected"]=> + ["pro2":protected]=> int(2) - ["pri2:private"]=> + ["pri2":"ArrayIteratorEx":private]=> int(3) ["imp2"]=> int(4) ["dyn2"]=> int(5) + ["storage":"ArrayIterator":private]=> + object(ArrayObjectEx)#%d (5) { + ["pub1"]=> + int(1) + ["pro1":protected]=> + int(2) + ["pri1":"ArrayObjectEx":private]=> + int(3) + ["imp1"]=> + int(4) + ["dyn1"]=> + int(5) + } } } array(1) { diff --git a/ext/spl/tests/array_018.phpt b/ext/spl/tests/array_018.phpt index ef48b97493..bb19e7d526 100755 --- a/ext/spl/tests/array_018.phpt +++ b/ext/spl/tests/array_018.phpt @@ -34,9 +34,15 @@ var_dump($foo); ===DONE=== --EXPECTF-- string(44) "An offset must not begin with \0 or be empty" -object(ArrayObject)#%d (0) { +object(ArrayObject)#%d (1) { + ["storage":"ArrayObject":private]=> + array(0) { + } } string(44) "An offset must not begin with \0 or be empty" -object(ArrayObject)#%d (0) { +object(ArrayObject)#%d (1) { + ["storage":"ArrayObject":private]=> + array(0) { + } } ===DONE=== diff --git a/ext/spl/tests/array_022.phpt b/ext/spl/tests/array_022.phpt index 9cb2193f10..5f5549c8cd 100755 --- a/ext/spl/tests/array_022.phpt +++ b/ext/spl/tests/array_022.phpt @@ -52,21 +52,31 @@ object(MyArrayObject)#%d (1) { ["bar"]=> string(3) "baz" } -object(MyArrayObject)#%d (2) { +object(MyArrayObject)#%d (3) { ["bar"]=> string(3) "baz" ["baz"]=> string(3) "Foo" + ["storage":"ArrayObject":private]=> + array(1) { + ["bar"]=> + string(3) "baz" + } } ==ArrayIterator=== object(MyArrayIterator)#%d (1) { ["bar"]=> string(3) "baz" } -object(MyArrayIterator)#%d (2) { +object(MyArrayIterator)#%d (3) { ["bar"]=> string(3) "baz" ["baz"]=> string(3) "Foo" + ["storage":"ArrayIterator":private]=> + object(MyArrayIterator)#%d (1) { + ["bar"]=> + string(3) "baz" + } } ===DONE=== diff --git a/ext/spl/tests/bug31185.phpt b/ext/spl/tests/bug31185.phpt index 421eb89ec1..5d93381d4e 100755 --- a/ext/spl/tests/bug31185.phpt +++ b/ext/spl/tests/bug31185.phpt @@ -52,7 +52,7 @@ FooBar::offsetSet(2, 2) CAUGHT: FAIL FooBar Object ( - [array:private] => Array + [array:FooBar:private] => Array ( [0] => 0 [1] => 1 diff --git a/ext/spl/tests/bug33136.phpt b/ext/spl/tests/bug33136.phpt index 2f3155f272..5d9a75dba9 100755 --- a/ext/spl/tests/bug33136.phpt +++ b/ext/spl/tests/bug33136.phpt @@ -66,9 +66,17 @@ Collection::offsetGet(foo) string(3) "baz" Collection Object ( - [0] => foo - [1] => bar - [foo] => baz + [data:Collection:private] => Array + ( + ) + + [storage:ArrayObject:private] => Array + ( + [0] => foo + [1] => bar + [foo] => baz + ) + ) int(3) ===DONE=== diff --git a/ext/spl/tests/bug36258.phpt b/ext/spl/tests/bug36258.phpt index 297c7f5978..c112670efa 100644 --- a/ext/spl/tests/bug36258.phpt +++ b/ext/spl/tests/bug36258.phpt @@ -13,9 +13,9 @@ foreach ($diriter as $key => $file) { break; } -echo "Done\n"; ?> +===DONE=== --EXPECTF-- string(%d) "%s" string(%d) "%s" -Done +===DONE=== diff --git a/ext/spl/tests/bug36287.phpt b/ext/spl/tests/bug36287.phpt index 03e695e2a2..69ecf2bf58 100755 --- a/ext/spl/tests/bug36287.phpt +++ b/ext/spl/tests/bug36287.phpt @@ -11,15 +11,9 @@ $idx = 0; foreach($it as $file) { echo "First\n"; - if("." != $file && ".." != $file) - { - var_Dump($file->getFilename()); - } + var_Dump($file->getFilename()); echo "Second\n"; - if($file != "." && $file != "..") - { - var_dump($file->getFilename()); - } + var_dump($file->getFilename()); if (++$idx > 1) { break; diff --git a/ext/spl/tests/bug40872.phpt b/ext/spl/tests/bug40872.phpt index a48fe74feb..70472c44e9 100755 --- a/ext/spl/tests/bug40872.phpt +++ b/ext/spl/tests/bug40872.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #40872 (inconsistency in offsetSet, offsetExists treatment of string enclosed integers) +--SKIPIF-- +<?php if (!extension_loaded("spl")) die("skip"); ?> --FILE-- <?php class Project { diff --git a/ext/spl/tests/bug41692.phpt b/ext/spl/tests/bug41692.phpt index 8a2b958fc1..b2ede4ec5d 100644 --- a/ext/spl/tests/bug41692.phpt +++ b/ext/spl/tests/bug41692.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #41692 (ArrayObject shows weird behaviour in respect to inheritance) +--SKIPIF-- +<?php if (!extension_loaded("spl")) die("skip"); ?> --FILE-- <?php @@ -21,20 +23,44 @@ var_dump($bar); echo "Done\n"; ?> --EXPECTF-- -object(Bar)#%d (3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) +object(Bar)#%d (2) { + ["foo":"Bar":private]=> + array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + } + ["storage":"ArrayObject":private]=> + array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + } } -object(Bar)#%d (3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) +object(Bar)#%d (2) { + ["foo":"Bar":private]=> + array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + } + ["storage":"ArrayObject":private]=> + array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + } } Done diff --git a/ext/spl/tests/bug42364.phpt b/ext/spl/tests/bug42364.phpt index b218be36af..3ca083e079 100644 --- a/ext/spl/tests/bug42364.phpt +++ b/ext/spl/tests/bug42364.phpt @@ -6,13 +6,21 @@ Bug #42364 (Crash when using getRealPath with DirectoryIterator) <?php $it = new DirectoryIterator(dirname(__FILE__)); +$count = 0; + foreach ($it as $e) { - if (gettype($e->getRealPath()) != "string") { + $count++; + $type = gettype($e->getRealPath()); + if ($type != "string" && $type != "unicode") { echo $e->getFilename(), " is a ", gettype($e->getRealPath()), "\n"; } } +if ($count > 0) { + echo "Found $count entries!\n"; +} echo "===DONE===" ?> ---EXPECT-- +--EXPECTF-- +Found %i entries! ===DONE=== diff --git a/ext/spl/tests/bug42654.phpt b/ext/spl/tests/bug42654.phpt index bac87e2310..20aad74b73 100755 --- a/ext/spl/tests/bug42654.phpt +++ b/ext/spl/tests/bug42654.phpt @@ -23,10 +23,47 @@ var_dump($copy); ?> --EXPECTF-- update 1 -object(RecursiveArrayIterator)#%d (3) { - [1]=> - string(4) "val1" - [2]=> +object(RecursiveArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> + array(3) { + [1]=> + string(4) "val1" + [2]=> + array(2) { + [2]=> + string(4) "val2" + [3]=> + array(1) { + [3]=> + string(4) "val3" + } + } + [4]=> + string(4) "val4" + } +} +object(RecursiveArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> + array(3) { + [1]=> + string(5) "alter" + [2]=> + array(2) { + [2]=> + string(4) "val2" + [3]=> + array(1) { + [3]=> + string(4) "val3" + } + } + [4]=> + string(4) "val4" + } +} +update 2 +object(RecursiveArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> array(2) { [2]=> string(4) "val2" @@ -36,85 +73,72 @@ object(RecursiveArrayIterator)#%d (3) { string(4) "val3" } } - [4]=> - string(4) "val4" } -object(RecursiveArrayIterator)#%d (3) { - [1]=> - string(5) "alter" - [2]=> +object(RecursiveArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> array(2) { [2]=> - string(4) "val2" + string(5) "alter" [3]=> array(1) { [3]=> string(4) "val3" } } - [4]=> - string(4) "val4" } -update 2 -object(RecursiveArrayIterator)#%d (2) { - [2]=> - string(4) "val2" - [3]=> +update 3 +object(RecursiveArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> array(1) { [3]=> string(4) "val3" } } -object(RecursiveArrayIterator)#%d (2) { - [2]=> - string(5) "alter" - [3]=> +object(RecursiveArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> array(1) { [3]=> - string(4) "val3" + string(5) "alter" } } -update 3 -object(RecursiveArrayIterator)#%d (1) { - [3]=> - string(4) "val3" -} -object(RecursiveArrayIterator)#%d (1) { - [3]=> - string(5) "alter" -} update 4 -object(RecursiveArrayIterator)#%d (3) { - [1]=> - string(5) "alter" - [2]=> - array(2) { +object(RecursiveArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> + array(3) { + [1]=> + string(5) "alter" [2]=> - string(4) "val2" - [3]=> - array(1) { + array(2) { + [2]=> + string(4) "val2" [3]=> - string(4) "val3" + array(1) { + [3]=> + string(4) "val3" + } } + [4]=> + string(4) "val4" } - [4]=> - string(4) "val4" } -object(RecursiveArrayIterator)#%d (3) { - [1]=> - string(5) "alter" - [2]=> - array(2) { +object(RecursiveArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> + array(3) { + [1]=> + string(5) "alter" [2]=> - string(4) "val2" - [3]=> - array(1) { + array(2) { + [2]=> + string(4) "val2" [3]=> - string(4) "val3" + array(1) { + [3]=> + string(4) "val3" + } } + [4]=> + string(5) "alter" } - [4]=> - string(5) "alter" } array(3) { [1]=> diff --git a/ext/spl/tests/dit_001.phpt b/ext/spl/tests/dit_001.phpt index f02291c77b..eb27aa699d 100755 --- a/ext/spl/tests/dit_001.phpt +++ b/ext/spl/tests/dit_001.phpt @@ -12,7 +12,9 @@ var_dump(is_string($d)); ?> ===DONE=== --EXPECTF-- -object(DirectoryIterator)#%d (0) { +object(DirectoryIterator)#%d (1) { + %s"pathName"%s"SplFileInfo":private]=> + %s(1) "." } bool(false) bool(false) diff --git a/ext/spl/tests/fileobject_003.phpt b/ext/spl/tests/fileobject_003.phpt index 0b19ad7fbd..de11f6f356 100755 --- a/ext/spl/tests/fileobject_003.phpt +++ b/ext/spl/tests/fileobject_003.phpt @@ -45,14 +45,22 @@ test(dirname(__FILE__), substr(dirname(__FILE__),-1), 'l'); <?php exit(0); ?> --EXPECTF-- ===0=== -object(SplFileInfo)#%d (0) { +object(SplFileInfo)#%d (2) { + ["pathName":"SplFileInfo":private]=> + string(%d) "%s" + ["fileName":"SplFileInfo":private]=> + string(%d) "%sfileobject_001a.txt" } -object(SplFileInfo)#%d (0) { +object(SplFileInfo)#%d (2) { + ["pathName":"SplFileInfo":private]=> + string(%d) "%s" + ["fileName":"SplFileInfo":private]=> + string(%d) "%sfileobject_001a.txt" } bool(false) bool(true) bool(true) -string(%d) "%sfileobject_001a.txt" +%s(%d) "%sfileobject_001a.txt" string(%d) "%sfileobject_001a.txt" bool(true) string(19) "fileobject_001a.txt" @@ -63,14 +71,22 @@ string(%d) "%sfileobject_001a.txt" string(19) "fileobject_001a.txt" string(%d) "%stests" ===1=== -object(SplFileInfo)#%d (0) { +object(SplFileInfo)#%d (2) { + ["pathName":"SplFileInfo":private]=> + string(%d) "%s" + ["fileName":"SplFileInfo":private]=> + string(%d) "%s" } -object(SplFileInfo)#%d (0) { +object(SplFileInfo)#%d (2) { + ["pathName":"SplFileInfo":private]=> + string(%d) "%s" + ["fileName":"SplFileInfo":private]=> + string(%d) "%s" } bool(false) bool(true) bool(true) -string(%d) "%stests/" +%s(%d) "%stests/" string(%d) "%stests" bool(true) string(5) "tests" @@ -81,14 +97,22 @@ string(%d) "%stests" string(%d) "%stests" string(%d) "%stests" ===2=== -object(SplFileInfo)#1 (0) { +object(SplFileInfo)#%d (2) { + ["pathName":"SplFileInfo":private]=> + string(%d) "%s" + ["fileName":"SplFileInfo":private]=> + string(%d) "%s" } -object(SplFileInfo)#2 (0) { +object(SplFileInfo)#%d (2) { + ["pathName":"SplFileInfo":private]=> + string(%d) "%s" + ["fileName":"SplFileInfo":private]=> + string(%d) "%s" } bool(false) bool(true) bool(true) -string(%d) "%stests" +%s(%d) "%stests" string(%d) "%stests" bool(true) string(%d) "tests" diff --git a/ext/spl/tests/iterator_006.phpt b/ext/spl/tests/iterator_006.phpt index 05a1cc5a94..aa8fd0e44d 100755 --- a/ext/spl/tests/iterator_006.phpt +++ b/ext/spl/tests/iterator_006.phpt @@ -5,7 +5,7 @@ SPL: IteratorIterator and SimpleXMlElement --FILE-- <?php -$root = simplexml_load_string('<?xml version="1.0"?> +$root = simplexml_load_string(b'<?xml version="1.0"?> <root> <child>Hello</child> <child>World</child> diff --git a/ext/spl/tests/iterator_026.phpt b/ext/spl/tests/iterator_026.phpt index 4c6fcf73b5..4866de5c6b 100755 --- a/ext/spl/tests/iterator_026.phpt +++ b/ext/spl/tests/iterator_026.phpt @@ -20,7 +20,7 @@ foreach($it as $k=>$v) ?> ===DONE=== <?php exit(0); ?> ---EXPECT-- +--EXPECTF-- 0=>1 hasNext: yes 1=>2 diff --git a/ext/spl/tests/iterator_042.phpt b/ext/spl/tests/iterator_042.phpt index 8615450654..4f470849af 100755 --- a/ext/spl/tests/iterator_042.phpt +++ b/ext/spl/tests/iterator_042.phpt @@ -40,41 +40,62 @@ foreach($it as $k => $v) <?php exit(0); ?> --EXPECTF-- Error Argument 1 passed to AppendIterator::append() must implement interface Iterator, array given in %siterator_042.php on line %d -object(ArrayIterator)#%d (2) { - [0]=> - object(ArrayIterator)#%d (1) { +object(ArrayIterator)#%d (1) { + %s"storage"%s"ArrayIterator":private]=> + array(2) { [0]=> - int(1) - } - [1]=> - object(ArrayIterator)#%d (2) { - [0]=> - int(21) + object(ArrayIterator)#%d (1) { + %s"storage"%s"ArrayIterator":private]=> + array(1) { + [0]=> + int(1) + } + } [1]=> - int(22) + object(ArrayIterator)#%d (1) { + %s"storage"%s"ArrayIterator":private]=> + array(2) { + [0]=> + int(21) + [1]=> + int(22) + } + } } } -object(ArrayIterator)#%d (3) { - [0]=> - object(ArrayIterator)#%d (1) { - [0]=> - int(1) - } - [1]=> - object(ArrayIterator)#%d (2) { - [0]=> - int(21) - [1]=> - int(22) - } - [2]=> - object(ArrayIterator)#5 (3) { +object(ArrayIterator)#%d (1) { + %s"storage"%s"ArrayIterator":private]=> + array(3) { [0]=> - int(31) + object(ArrayIterator)#%d (1) { + %s"storage"%s"ArrayIterator":private]=> + array(1) { + [0]=> + int(1) + } + } [1]=> - int(32) + object(ArrayIterator)#%d (1) { + %s"storage"%s"ArrayIterator":private]=> + array(2) { + [0]=> + int(21) + [1]=> + int(22) + } + } [2]=> - int(33) + object(ArrayIterator)#5 (1) { + %s"storage"%s"ArrayIterator":private]=> + array(3) { + [0]=> + int(31) + [1]=> + int(32) + [2]=> + int(33) + } + } } } ===0=== diff --git a/ext/spl/tests/iterator_047.phpt b/ext/spl/tests/iterator_047.phpt index b313df3012..9a49a7e0d2 100755 --- a/ext/spl/tests/iterator_047.phpt +++ b/ext/spl/tests/iterator_047.phpt @@ -88,14 +88,14 @@ int(4) int(4) ===1=== MyRecursiveArrayIterator::hasChildren() -Exception: State 1: MyRecursiveArrayIterator::hasChildren() in %siterator_047.php on line %d +Exception: State 1: MyRecursiveArrayIterator::hasChildren() in %s on line %d ===2=== MyRecursiveArrayIterator::hasChildren() int(0) int(0) MyRecursiveArrayIterator::hasChildren() MyRecursiveArrayIterator::getChildren() -Exception: State 2: MyRecursiveArrayIterator::getChildren() in %siterator_047.php on line %d +Exception: State 2: MyRecursiveArrayIterator::getChildren() in %s on line %d ===3=== MyRecursiveArrayIterator::hasChildren() int(0) diff --git a/ext/spl/tests/iterator_049.phpt b/ext/spl/tests/iterator_049.phpt index 8e25643809..e868cfb23c 100755 --- a/ext/spl/tests/iterator_049.phpt +++ b/ext/spl/tests/iterator_049.phpt @@ -14,8 +14,11 @@ var_dump($ar->getArrayCopy()); <?php exit(0); ?> --EXPECTF-- object(ArrayIterator)#%d (1) { - [""]=> - NULL + ["storage":"ArrayIterator":private]=> + array(1) { + [""]=> + NULL + } } array(1) { [""]=> diff --git a/ext/spl/tests/iterator_049b.phpt b/ext/spl/tests/iterator_049b.phpt Binary files differindex 9b894cd1c1..d39d9ef418 100755 --- a/ext/spl/tests/iterator_049b.phpt +++ b/ext/spl/tests/iterator_049b.phpt diff --git a/ext/spl/tests/iterator_050.phpt b/ext/spl/tests/iterator_050.phpt index 6bd84a3a87..5d9d381618 100755 --- a/ext/spl/tests/iterator_050.phpt +++ b/ext/spl/tests/iterator_050.phpt @@ -33,61 +33,64 @@ var_dump($ar); int(1) array(3) { [0]=> - string(3) "1,2" + %s(3) "1,2" [1]=> - string(1) "1" + %s(1) "1" [2]=> - string(1) "2" + %s(1) "2" } int(2) array(3) { [0]=> - string(3) "1,2" + %s(3) "1,2" [1]=> - string(1) "1" + %s(1) "1" [2]=> - string(1) "2" + %s(1) "2" } int(0) array(2) { [0]=> - string(1) "1" + %s(1) "1" [1]=> - string(1) "1" + %s(1) "1" } int(1) array(2) { [0]=> - string(1) "1" + %s(1) "1" [1]=> - string(1) "1" + %s(1) "1" } int(2) array(2) { [0]=> - string(1) "1" - [1]=> - string(1) "1" -} -object(ArrayIterator)#%d (9) { - [0]=> %s(1) "1" [1]=> - %s(3) "1,2" - [2]=> - %s(5) "1,2,3" - [3]=> - %s(0) "" - [4]=> - NULL - [5]=> - array(0) { + %s(1) "1" +} +object(ArrayIterator)#%d (1) { + %s"storage"%s"ArrayIterator":private]=> + array(9) { + [0]=> + %s(1) "1" + [1]=> + %s(3) "1,2" + [2]=> + %s(5) "1,2,3" + [3]=> + %s(0) "" + [4]=> + NULL + [5]=> + array(0) { + } + [6]=> + %s(6) "FooBar" + [7]=> + %s(1) "," + [8]=> + %s(2) ",," } - [6]=> - %s(6) "FooBar" - [7]=> - %s(1) "," - [8]=> - %s(2) ",," } ===DONE=== diff --git a/ext/spl/tests/iterator_051.phpt b/ext/spl/tests/iterator_051.phpt index 626d27474a..44d5ed252b 100755 --- a/ext/spl/tests/iterator_051.phpt +++ b/ext/spl/tests/iterator_051.phpt @@ -76,20 +76,23 @@ array(2) { [1]=> string(1) "0" } -object(ArrayIterator)#%d (7) { - [1]=> - int(0) - ["1,2"]=> - int(1) - ["1,2,3"]=> - int(2) - [0]=> - int(3) - ["FooBar"]=> - int(4) - [","]=> - int(5) - [",,"]=> - int(6) +object(ArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> + array(7) { + [1]=> + int(0) + ["1,2"]=> + int(1) + ["1,2,3"]=> + int(2) + [0]=> + int(3) + ["FooBar"]=> + int(4) + [","]=> + int(5) + [",,"]=> + int(6) + } } ===DONE=== diff --git a/ext/spl/tests/iterator_052.phpt b/ext/spl/tests/iterator_052.phpt index 9bd7d899ec..3601683a3f 100755 --- a/ext/spl/tests/iterator_052.phpt +++ b/ext/spl/tests/iterator_052.phpt @@ -290,25 +290,28 @@ array(2) { array(0) { } } -object(ArrayIterator)#%d (9) { - [0]=> - %s(1) "1" - [1]=> - %s(3) "1,2" - [2]=> - %s(5) "1,2,3" - [3]=> - %s(0) "" - [4]=> - NULL - [5]=> - array(0) { - } - [6]=> - %s(6) "FooBar" - [7]=> - %s(1) "," - [8]=> - %s(2) ",," +object(ArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> + array(9) { + [0]=> + %s(1) "1" + [1]=> + %s(3) "1,2" + [2]=> + %s(5) "1,2,3" + [3]=> + %s(0) "" + [4]=> + NULL + [5]=> + array(0) { + } + [6]=> + %s(6) "FooBar" + [7]=> + %s(1) "," + [8]=> + %s(2) ",," + } } ===DONE=== diff --git a/ext/spl/tests/iterator_053.phpt b/ext/spl/tests/iterator_053.phpt index 4d68b0113f..584849b341 100755 --- a/ext/spl/tests/iterator_053.phpt +++ b/ext/spl/tests/iterator_053.phpt @@ -290,25 +290,28 @@ array(2) { string(1) "8" } } -object(ArrayIterator)#%d (9) { - [0]=> - %s(1) "1" - [1]=> - %s(3) "1,2" - [2]=> - %s(5) "1,2,3" - [3]=> - %s(0) "" - [4]=> - NULL - [5]=> - array(0) { +object(ArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> + array(9) { + [0]=> + %s(1) "1" + [1]=> + %s(3) "1,2" + [2]=> + %s(5) "1,2,3" + [3]=> + %s(0) "" + [4]=> + NULL + [5]=> + array(0) { + } + [6]=> + %s(6) "FooBar" + [7]=> + %s(1) "," + [8]=> + %s(2) ",," } - [6]=> - %s(6) "FooBar" - [7]=> - %s(1) "," - [8]=> - %s(2) ",," } ===DONE=== diff --git a/ext/spl/tests/iterator_054.phpt b/ext/spl/tests/iterator_054.phpt index 3f724697a9..cdf108417f 100755 --- a/ext/spl/tests/iterator_054.phpt +++ b/ext/spl/tests/iterator_054.phpt @@ -60,25 +60,28 @@ array(3) { [2]=> string(0) "" } -object(ArrayIterator)#%d (9) { - [0]=> - %s(1) "1" - [1]=> - %s(3) "1,2" - [2]=> - %s(5) "1,2,3" - [3]=> - %s(0) "" - [4]=> - NULL - [5]=> - array(0) { +object(ArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> + array(9) { + [0]=> + %s(1) "1" + [1]=> + %s(3) "1,2" + [2]=> + %s(5) "1,2,3" + [3]=> + %s(0) "" + [4]=> + NULL + [5]=> + array(0) { + } + [6]=> + %s(6) "FooBar" + [7]=> + %s(1) "," + [8]=> + %s(2) ",," } - [6]=> - %s(6) "FooBar" - [7]=> - %s(1) "," - [8]=> - %s(2) ",," } ===DONE=== diff --git a/ext/spl/tests/iterator_055.phpt b/ext/spl/tests/iterator_055.phpt index 35a050c396..851d6ed666 100755 --- a/ext/spl/tests/iterator_055.phpt +++ b/ext/spl/tests/iterator_055.phpt @@ -42,20 +42,23 @@ array(2) { [1]=> string(2) ",3" } -object(ArrayIterator)#%d (7) { - [1]=> - int(0) - ["1,2"]=> - int(1) - ["1,2,3"]=> - int(2) - [0]=> - int(3) - ["FooBar"]=> - int(4) - [","]=> - int(5) - [",,"]=> - int(6) +object(ArrayIterator)#%d (1) { + ["storage":"ArrayIterator":private]=> + array(7) { + [1]=> + int(0) + ["1,2"]=> + int(1) + ["1,2,3"]=> + int(2) + [0]=> + int(3) + ["FooBar"]=> + int(4) + [","]=> + int(5) + [",,"]=> + int(6) + } } ===DONE=== diff --git a/ext/spl/tests/observer_004.phpt b/ext/spl/tests/observer_004.phpt index 78b480ab1c..c24f5ed777 100755 --- a/ext/spl/tests/observer_004.phpt +++ b/ext/spl/tests/observer_004.phpt @@ -62,17 +62,43 @@ var_dump($storage2); int(2) int(1) int(2) -object(MyStorage)#%d (1) { +object(MyStorage)#%d (2) { ["bla"]=> int(26) + ["storage":"SplObjectStorage":private]=> + array(2) { + ["%s"]=> + object(TestClass)#%d (1) { + ["test"]=> + int(1) + } + ["%s"]=> + object(TestClass)#%d (1) { + ["test"]=> + int(2) + } + } } string(%d) "%s" ===UNSERIALIZE=== int(2) int(1) int(2) -object(MyStorage)#%d (1) { +object(MyStorage)#%d (2) { ["bla"]=> int(26) + ["storage":"SplObjectStorage":private]=> + array(2) { + ["%s"]=> + object(TestClass)#%d (1) { + ["test"]=> + int(1) + } + ["%s"]=> + object(TestClass)#%d (1) { + ["test"]=> + int(2) + } + } } ===DONE=== diff --git a/ext/spl/tests/observer_005.phpt b/ext/spl/tests/observer_005.phpt index 46971cc2dd..ae5966bfe7 100755 --- a/ext/spl/tests/observer_005.phpt +++ b/ext/spl/tests/observer_005.phpt @@ -83,9 +83,9 @@ object(TestClass)#%d (4) { int(24) ["pub"]=> int(4) - ["pro:protected"]=> + ["pro":protected]=> int(5) - ["pri:private"]=> + ["pri":"TestClass":private]=> int(6) } object(TestClass)#%d (4) { @@ -93,20 +93,45 @@ object(TestClass)#%d (4) { int(24) ["pub"]=> int(7) - ["pro:protected"]=> + ["pro":protected]=> int(8) - ["pri:private"]=> + ["pri":"TestClass":private]=> int(9) } -object(MyStorage)#%d (4) { +object(MyStorage)#%d (5) { ["def"]=> int(24) ["pub"]=> int(1) - ["pro:protected"]=> + ["pro":protected]=> int(2) - ["pri:private"]=> + ["pri":"MyStorage":private]=> int(3) + ["storage":"SplObjectStorage":private]=> + array(2) { + ["%s"]=> + object(TestClass)#%d (4) { + ["def"]=> + int(24) + ["pub"]=> + int(4) + ["pro":protected]=> + int(5) + ["pri":"TestClass":private]=> + int(6) + } + ["%s"]=> + object(TestClass)#%d (4) { + ["def"]=> + int(24) + ["pub"]=> + int(7) + ["pro":protected]=> + int(8) + ["pri":"TestClass":private]=> + int(9) + } + } } string(%d) "%s" ===UNSERIALIZE=== @@ -116,9 +141,9 @@ object(TestClass)#%d (4) { int(24) ["pub"]=> int(4) - ["pro:protected"]=> + ["pro":protected]=> int(5) - ["pri:private"]=> + ["pri":"TestClass":private]=> int(6) } object(TestClass)#%d (4) { @@ -126,19 +151,44 @@ object(TestClass)#%d (4) { int(24) ["pub"]=> int(7) - ["pro:protected"]=> + ["pro":protected]=> int(8) - ["pri:private"]=> + ["pri":"TestClass":private]=> int(9) } -object(MyStorage)#%d (4) { +object(MyStorage)#%d (5) { ["def"]=> int(24) ["pub"]=> int(1) - ["pro:protected"]=> + ["pro":protected]=> int(2) - ["pri:private"]=> + ["pri":"MyStorage":private]=> int(3) + ["storage":"SplObjectStorage":private]=> + array(2) { + ["%s"]=> + object(TestClass)#%d (4) { + ["def"]=> + int(24) + ["pub"]=> + int(4) + ["pro":protected]=> + int(5) + ["pri":"TestClass":private]=> + int(6) + } + ["%s"]=> + object(TestClass)#%d (4) { + ["def"]=> + int(24) + ["pub"]=> + int(7) + ["pro":protected]=> + int(8) + ["pri":"TestClass":private]=> + int(9) + } + } } ===DONE=== diff --git a/ext/spl/tests/spl_003.phpt b/ext/spl/tests/spl_003.phpt index cadf3b5a6c..b9daa67cd7 100755 --- a/ext/spl/tests/spl_003.phpt +++ b/ext/spl/tests/spl_003.phpt @@ -73,4 +73,4 @@ array(0) { } bool(false) bool(false) -===DONE===
\ No newline at end of file +===DONE=== diff --git a/ext/spl/tests/spl_004.phpt b/ext/spl/tests/spl_004.phpt index 60da28042a..179ba0f7a6 100755 --- a/ext/spl/tests/spl_004.phpt +++ b/ext/spl/tests/spl_004.phpt @@ -79,7 +79,7 @@ int(4) Error: Argument 3 passed to iterator_apply() must be an array, integer given Error: iterator_apply() expects parameter 3 to be array, integer given NULL -Error: iterator_apply() expects parameter 2 to be function,%sstring given +Error: iterator_apply() expects parameter 2 to be valid callback,%sstring given NULL Error: iterator_apply() expects at most 3 parameters, 4 given NULL diff --git a/ext/spl/tests/spl_autoload_002.phpt b/ext/spl/tests/spl_autoload_002.phpt index e7fda9c446..82fe82e67a 100755 --- a/ext/spl/tests/spl_autoload_002.phpt +++ b/ext/spl/tests/spl_autoload_002.phpt @@ -1,8 +1,8 @@ --TEST-- -SPL: spl_autoloadfunctions() +SPL: spl_autoload_functions() --SKIPIF-- <?php - if (!extension_loaded("spl")) die ("skip"); + if (!extension_loaded("spl")) die("skip"); if (spl_autoload_functions() !== false) die('skip __autoload() registered by php.ini'); ?> --FILE-- diff --git a/ext/spl/tests/sxe_001.phpt b/ext/spl/tests/sxe_001.phpt index c6e6b41d0c..8ab37d4310 100755 --- a/ext/spl/tests/sxe_001.phpt +++ b/ext/spl/tests/sxe_001.phpt @@ -26,7 +26,7 @@ $xml =<<<EOF </sxe> EOF; -var_dump(simplexml_load_string($xml, 'SimpleXMLIterator')); +var_dump(simplexml_load_string((binary)$xml, 'SimpleXMLIterator')); ?> ===DONE=== diff --git a/ext/spl/tests/sxe_002.phpt b/ext/spl/tests/sxe_002.phpt index ea9edd39f7..d8a939e5a6 100755 --- a/ext/spl/tests/sxe_002.phpt +++ b/ext/spl/tests/sxe_002.phpt @@ -37,7 +37,7 @@ $xml =<<<EOF </sxe> EOF; -$sxe = simplexml_load_string($xml, 'SimpleXMLIterator'); +$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator'); foreach(new RecursiveIteratorIterator($sxe, 1) as $name => $data) { var_dump($name); diff --git a/ext/spl/tests/sxe_003.phpt b/ext/spl/tests/sxe_003.phpt index e222af6eb9..e0d09d1549 100755 --- a/ext/spl/tests/sxe_003.phpt +++ b/ext/spl/tests/sxe_003.phpt @@ -37,7 +37,7 @@ $xml =<<<EOF </sxe> EOF; -$sxe = simplexml_load_string($xml, 'SimpleXMLIterator'); +$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator'); foreach($sxe->getChildren() as $name => $data) { var_dump($name); diff --git a/ext/spl/tests/sxe_004.phpt b/ext/spl/tests/sxe_004.phpt index 718a626b61..f57b10c132 100755 --- a/ext/spl/tests/sxe_004.phpt +++ b/ext/spl/tests/sxe_004.phpt @@ -76,7 +76,7 @@ class SXETest extends SimpleXMLIterator } } -$sxe = new SXETest($xml); +$sxe = new SXETest((binary)$xml); $rit = new RecursiveIteratorIterator($sxe, RecursiveIteratorIterator::SELF_FIRST); foreach($rit as $data) { diff --git a/ext/spl/tests/sxe_005.phpt b/ext/spl/tests/sxe_005.phpt index 2efd0a6bee..dbef1dd99b 100755 --- a/ext/spl/tests/sxe_005.phpt +++ b/ext/spl/tests/sxe_005.phpt @@ -28,7 +28,7 @@ class SXETest extends SimpleXMLIterator } } -$sxe = new SXETest($xml); +$sxe = new SXETest((binary)$xml); var_dump(count($sxe)); var_dump(count($sxe->elem1)); diff --git a/ext/standard/tests/array/002.phpt b/ext/standard/tests/array/002.phpt index f33cf42067..b865dc100c 100644 --- a/ext/standard/tests/array/002.phpt +++ b/ext/standard/tests/array/002.phpt @@ -29,7 +29,7 @@ foreach (array ('arsort', 'asort', 'krsort', 'ksort', 'rsort', 'sort') as $test_ } ?> ---EXPECT-- +--EXPECTF-- Unsorted data: array(8) { [0]=> diff --git a/ext/standard/tests/array/004.phpt b/ext/standard/tests/array/004.phpt index 1074134890..765637b26c 100644 --- a/ext/standard/tests/array/004.phpt +++ b/ext/standard/tests/array/004.phpt @@ -56,4 +56,4 @@ array(5) { 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 index 626c961665..f72493215f 100644 --- a/ext/standard/tests/array/005.phpt +++ b/ext/standard/tests/array/005.phpt @@ -84,16 +84,16 @@ echo"Done"; --EXPECTF-- *** Testing Error Conditions *** -Warning: Wrong parameter count for array_shift() in %s line %d +Warning: array_shift() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: array_shift(): The argument should be an array in %s on line %d +Warning: array_shift() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_shift(): The argument should be an array in %s on line %d +Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: Wrong parameter count for array_shift() in %s on line %d +Warning: array_shift() expects exactly 1 parameter, 2 given in %s on line %d NULL NULL diff --git a/ext/standard/tests/array/007.phpt b/ext/standard/tests/array/007.phpt index 45cc9b6c27..e30b8fe2c1 100644 --- a/ext/standard/tests/array/007.phpt +++ b/ext/standard/tests/array/007.phpt @@ -61,10 +61,6 @@ class cr { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } - - function __toString() { - return "Object"; - } } function comp_func($a, $b) { @@ -114,12 +110,6 @@ 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")); @@ -314,21 +304,21 @@ var_dump(array_udiff_uassoc($a, $b, "comp_func_cr", "comp_func")); array(3) { ["0.1"]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(9) ["public_member"]=> int(9) } ["0.5"]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(12) ["public_member"]=> int(12) } [0]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(23) ["public_member"]=> int(23) @@ -392,21 +382,21 @@ var_dump(array_udiff_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func")); array(3) { ["0.1"]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(9) ["public_member"]=> int(9) } ["0.5"]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(12) ["public_member"]=> int(12) } [0]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(23) ["public_member"]=> int(23) @@ -466,82 +456,18 @@ $b=array ( 'public_member' => -15, )), ); -var_dump(array_diff_assoc($a, $b)); -array(1) { - ["0.1"]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(9) - ["public_member"]=> - int(9) - } -} -$a=array ( - '0.1' => - cr::__set_state(array( - 'priv_member' => 9, - 'public_member' => 9, - )), - '0.5' => - cr::__set_state(array( - 'priv_member' => 12, - 'public_member' => 12, - )), - 0 => - cr::__set_state(array( - 'priv_member' => 23, - 'public_member' => 23, - )), - 1 => - cr::__set_state(array( - 'priv_member' => 4, - 'public_member' => 4, - )), - 2 => - cr::__set_state(array( - 'priv_member' => -15, - 'public_member' => -15, - )), -); -$b=array ( - '0.2' => - cr::__set_state(array( - 'priv_member' => 9, - 'public_member' => 9, - )), - '0.5' => - cr::__set_state(array( - 'priv_member' => 22, - 'public_member' => 22, - )), - 0 => - cr::__set_state(array( - 'priv_member' => 3, - 'public_member' => 3, - )), - 1 => - cr::__set_state(array( - 'priv_member' => 4, - 'public_member' => 4, - )), - 2 => - cr::__set_state(array( - 'priv_member' => -15, - 'public_member' => -15, - )), -); var_dump(array_udiff($a, $b, "comp_func_cr")); array(2) { ["0.5"]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(12) ["public_member"]=> int(12) } [0]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(23) ["public_member"]=> int(23) @@ -605,21 +531,21 @@ var_dump(array_udiff_assoc($a, $b, "comp_func_cr")); array(3) { ["0.1"]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(9) ["public_member"]=> int(9) } ["0.5"]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(12) ["public_member"]=> int(12) } [0]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(23) ["public_member"]=> int(23) diff --git a/ext/standard/tests/array/009.phpt b/ext/standard/tests/array/009.phpt index 399a1d5aaf..f88f8763fa 100644 --- a/ext/standard/tests/array/009.phpt +++ b/ext/standard/tests/array/009.phpt @@ -114,89 +114,6 @@ var_dump( reset($int_var) ); var_dump( reset($float_var) ); var_dump( reset($string) ); -echo "\n*** Testing operation on Objects ***\n"; -// class having members of different scope -class test_class -{ - private $private_var = "private_var"; - public $public_var = "public_var"; - protected $protected_var = "protected_var"; - private $var1 = 10; - public $var2 = 30; - protected $var3 = 40; - var $integer = 3092; - - private function private_fun() { - echo "private_fun() called\n"; - } - - protected function protected_fun() { - echo "protected_fun() called\n"; - } - - public function public_fun() { - echo "public_fun() called\n"; - } -} -// class with no member variables -class zero_member_var_class -{ - public function fun() { - echo "fun() called\n"; - } -} -// class with no members -class zero_member_class -{ - // no members -} - -//create object of all classes defined above -$test_class_obj = new test_class(); -$zero_member_var_class_obj = new zero_member_var_class(); -$zero_member_class_obj = new zero_member_class(); - -$object_array = array ( - $test_class_obj, - $zero_member_var_class_obj, - $zero_member_class_obj -); - -/* loop to use function key(), current(), next() and reset() - on different class objects */ -$loop_count = 1; -foreach( $object_array as $object ) { - echo "--- Outerloop Iteration $loop_count ---\n"; - - /* dump the object before performing operation on it */ - echo "Object before performing operations ...\n"; - var_dump($object) ; - - /* loop to feach all the key/value pair from the object*/ - $inner_loop_count = 1; - do { - echo "-- Innerloop iteration $inner_loop_count of Outerloop Iteration $loop_count --\n"; - $inner_loop_count ++; - - // print the key/value pair of the current value - echo "current => "; var_dump( current($object) ); // key & value pair - echo "key => "; var_dump( key($object) ); // key - - $next_pair = next($object); - echo "next => "; var_dump($next_pair); - - } while( FALSE != $next_pair ); - - $loop_count++; - - /* reset the object */ - echo "reset => "; var_dump( reset($object) ); - echo "current => "; var_dump( current($object) ); // first variable in object - - echo "\nObject after performing operations ...\n"; - var_dump($object) ; // no change expected -} - echo "Done\n"; ?> --EXPECTF-- @@ -542,173 +459,77 @@ array(5) { -- Testing variation: when array is unset -- -Warning: current(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: current() expects parameter 1 to be array, null given in %s on line %d +NULL -Warning: key(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: key() expects parameter 1 to be array, null given in %s on line %d +NULL -Warning: next(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: next() expects parameter 1 to be array, null given in %s on line %d +NULL -Warning: reset(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: reset() expects parameter 1 to be array, null given in %s on line %d +NULL *** Testing error conditions *** -Warning: Wrong parameter count for key() in %s on line %d +Warning: key() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for current() in %s on line %d +Warning: current() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for reset() in %s on line %d +Warning: reset() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for next() in %s on line %d +Warning: next() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for key() in %s on line %d +Warning: key() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for current() in %s on line %d +Warning: current() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for reset() in %s on line %d +Warning: reset() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: Wrong parameter count for next() in %s on line %d +Warning: next() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: key(): Passed variable is not an array or object in %s on line %d -bool(false) - -Warning: key(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: key() expects parameter 1 to be array, integer given in %s on line %d +NULL -Warning: key(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: key() expects parameter 1 to be array, double given in %s on line %d +NULL -Warning: current(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: key() expects parameter 1 to be array, string given in %s on line %d +NULL -Warning: current(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: current() expects parameter 1 to be array, integer given in %s on line %d +NULL -Warning: current(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: current() expects parameter 1 to be array, double given in %s on line %d +NULL -Warning: next(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: current() expects parameter 1 to be array, string given in %s on line %d +NULL -Warning: next(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: next() expects parameter 1 to be array, integer given in %s on line %d +NULL -Warning: next(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: next() expects parameter 1 to be array, double given in %s on line %d +NULL -Warning: reset(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: next() expects parameter 1 to be array, string given in %s on line %d +NULL -Warning: reset(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: reset() expects parameter 1 to be array, integer given in %s on line %d +NULL -Warning: reset(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: reset() expects parameter 1 to be array, double given in %s on line %d +NULL -*** Testing operation on Objects *** ---- Outerloop Iteration 1 --- -Object before performing operations ... -object(test_class)#1 (7) { - ["private_var:private"]=> - string(11) "private_var" - ["public_var"]=> - string(10) "public_var" - ["protected_var:protected"]=> - string(13) "protected_var" - ["var1:private"]=> - int(10) - ["var2"]=> - int(30) - ["var3:protected"]=> - int(40) - ["integer"]=> - int(3092) -} --- Innerloop iteration 1 of Outerloop Iteration 1 -- -current => string(11) "private_var" -key => string(23) " -next => string(10) "public_var" --- Innerloop iteration 2 of Outerloop Iteration 1 -- -current => string(10) "public_var" -key => string(10) "public_var" -next => string(13) "protected_var" --- Innerloop iteration 3 of Outerloop Iteration 1 -- -current => string(13) "protected_var" -key => string(16) " -next => int(10) --- Innerloop iteration 4 of Outerloop Iteration 1 -- -current => int(10) -key => string(16) " -next => int(30) --- Innerloop iteration 5 of Outerloop Iteration 1 -- -current => int(30) -key => string(4) "var2" -next => int(40) --- Innerloop iteration 6 of Outerloop Iteration 1 -- -current => int(40) -key => string(7) " -next => int(3092) --- Innerloop iteration 7 of Outerloop Iteration 1 -- -current => int(3092) -key => string(7) "integer" -next => bool(false) -reset => string(11) "private_var" -current => string(11) "private_var" - -Object after performing operations ... -object(test_class)#1 (7) { - ["private_var:private"]=> - string(11) "private_var" - ["public_var"]=> - string(10) "public_var" - ["protected_var:protected"]=> - string(13) "protected_var" - ["var1:private"]=> - int(10) - ["var2"]=> - int(30) - ["var3:protected"]=> - int(40) - ["integer"]=> - int(3092) -} ---- Outerloop Iteration 2 --- -Object before performing operations ... -object(zero_member_var_class)#2 (0) { -} --- Innerloop iteration 1 of Outerloop Iteration 2 -- -current => bool(false) -key => NULL -next => bool(false) -reset => bool(false) -current => bool(false) - -Object after performing operations ... -object(zero_member_var_class)#2 (0) { -} ---- Outerloop Iteration 3 --- -Object before performing operations ... -object(zero_member_class)#3 (0) { -} --- Innerloop iteration 1 of Outerloop Iteration 3 -- -current => bool(false) -key => NULL -next => bool(false) -reset => bool(false) -current => bool(false) - -Object after performing operations ... -object(zero_member_class)#3 (0) { -} +Warning: reset() expects parameter 1 to be array, string given in %s on line %d +NULL Done diff --git a/ext/standard/tests/array/array_change_key_case_errors.phpt b/ext/standard/tests/array/array_change_key_case_errors.phpt index 9abe1773b7..ec506f767d 100644 --- a/ext/standard/tests/array/array_change_key_case_errors.phpt +++ b/ext/standard/tests/array/array_change_key_case_errors.phpt @@ -14,15 +14,15 @@ var_dump( array_change_key_case($item, $item["one"], "CASE_UPPER") ); // more th echo "end\n"; ?> --EXPECTF-- -Warning: array_change_key_case(): The argument should be an array in %s on line %d -bool(false) +Warning: array_change_key_case() expects parameter 1 to be array, integer given in %s on line %d +NULL -Warning: array_change_key_case(): The argument should be an array in %s on line %d -bool(false) +Warning: array_change_key_case() expects parameter 1 to be array, integer given in %s on line %d +NULL -Warning: Wrong parameter count for array_change_key_case() in %s on line %d +Warning: array_change_key_case() expects at least 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for array_change_key_case() in %s on line %d +Warning: array_change_key_case() expects at most 2 parameters, 3 given in %s on line %d NULL end diff --git a/ext/standard/tests/array/array_change_key_case_variation.phpt b/ext/standard/tests/array/array_change_key_case_variation.phpt index ede297239a..e03b8d54dc 100644 --- a/ext/standard/tests/array/array_change_key_case_variation.phpt +++ b/ext/standard/tests/array/array_change_key_case_variation.phpt @@ -21,16 +21,8 @@ var_dump( array_change_key_case( array("ONE" => 1, "one" => 1, "One" => 2), 5 ) echo "end\n"; ?> --EXPECTF-- -array(4) { - ["one"]=> - int(1) - ["two"]=> - int(2) - ["three"]=> - int(3) - ["four"]=> - string(4) "four" -} +Warning: array_change_key_case() expects parameter 2 to be long, string given in %s on line %d +NULL array(4) { ["ONE"]=> int(1) @@ -45,10 +37,9 @@ array(1) { ["one"]=> int(4) } -array(1) { - ["one"]=> - int(5) -} + +Warning: array_change_key_case() expects parameter 2 to be long, string given in %s on line %d +NULL array(1) { ["ONE"]=> int(3) diff --git a/ext/standard/tests/array/array_count_values.phpt b/ext/standard/tests/array/array_count_values.phpt index d9a3ba3d5a..a6424aab9a 100644 --- a/ext/standard/tests/array/array_count_values.phpt +++ b/ext/standard/tests/array/array_count_values.phpt @@ -92,4 +92,3 @@ array(1) { [1]=> int(1) } - diff --git a/ext/standard/tests/array/array_fill_basic.phpt b/ext/standard/tests/array/array_fill_basic.phpt index 415bbf606a..8623f8e6c2 100644 --- a/ext/standard/tests/array/array_fill_basic.phpt +++ b/ext/standard/tests/array/array_fill_basic.phpt @@ -2,7 +2,7 @@ Test array_fill() function : basic functionality --FILE-- <?php -/* Prototype : array array_fill(int $start_key, int $num, mixed $val) +/* Prototype : proto array array_fill(int start_key, int num, mixed val) * Description: Create an array containing num elements starting with index start_key each initialized to val * Source code: ext/standard/array.c */ @@ -10,7 +10,6 @@ Test array_fill() function : basic functionality echo "*** Testing array_fill() : basic functionality ***\n"; // calling the array_fill with all possible valid values for 'val' argument - $start_key = 0 ; $num = 2; $heredoc = <<<HERE_DOC @@ -36,7 +35,7 @@ for($i = 0; $i < count($values); $i ++) echo "-- Iteration $counter --\n"; $val = $values[$i]; - var_dump( array_fill($start_key, $num, $val) ); + var_dump( array_fill($start_key,$num,$val) ); $counter++; } diff --git a/ext/standard/tests/array/array_fill_error.phpt b/ext/standard/tests/array/array_fill_error.phpt index 9992009f09..167163228d 100644 --- a/ext/standard/tests/array/array_fill_error.phpt +++ b/ext/standard/tests/array/array_fill_error.phpt @@ -2,10 +2,10 @@ Test array_fill() function : error conditions --FILE-- <?php -/* Prototype : array array_fill(int $start_key, int $num, mixed $val) +/* Prototype : proto array array_fill(int start_key, int num, mixed val) * Description: Create an array containing num elements starting with index start_key each initialized to val * Source code: ext/standard/array.c - */ +*/ echo "*** Testing array_fill() : error conditions ***\n"; @@ -20,21 +20,21 @@ $start_key = 0; $num = 2; $val = 1; $extra_arg = 10; -var_dump( array_fill($start_key, $num,$val, $extra_arg) ); +var_dump( array_fill($start_key,$num,$val, $extra_arg) ); // Less than the expected number of arguments echo "-- Testing array_fill() function with less than expected no. of arguments --\n"; $start_key = 0; $num = 2; -var_dump( array_fill($start_key, $num) ); +var_dump( array_fill($start_key,$num) ); //calling array_fill with negative values for 'num' parameter $num = -1; -var_dump( array_fill($start_key, $num, $val) ); +var_dump( array_fill($start_key,$num,$val) ); //callin array_fill with 'num' equal to zero value $num = 0; -var_dump( array_fill($start_key, $num, $val) ); +var_dump( array_fill($start_key,$num,$val) ); echo "Done"; ?> @@ -42,15 +42,15 @@ echo "Done"; *** Testing array_fill() : error conditions *** -- Testing array_fill() function with Zero arguments -- -Warning: Wrong parameter count for array_fill() in %s on line %d +Warning: array_fill() expects exactly 3 parameters, 0 given in %s on line %d NULL -- Testing array_fill() function with more than expected no. of arguments -- -Warning: Wrong parameter count for array_fill() in %s on line %d +Warning: array_fill() expects exactly 3 parameters, 4 given in %s on line %d NULL -- Testing array_fill() function with less than expected no. of arguments -- -Warning: Wrong parameter count for array_fill() in %s on line %d +Warning: array_fill() expects exactly 3 parameters, 2 given in %s on line %d NULL Warning: array_fill(): Number of elements must be positive in %s on line %d diff --git a/ext/standard/tests/array/array_fill_object.phpt b/ext/standard/tests/array/array_fill_object.phpt index 0714962c1c..48aac60b55 100644 --- a/ext/standard/tests/array/array_fill_object.phpt +++ b/ext/standard/tests/array/array_fill_object.phpt @@ -22,7 +22,7 @@ class Test { } -//class with public, static, constant members and consturctor to initialize the public member +//class with public member, static member , constant and consturctor to initialize the public member class Test1 { const test1_constant = "test1"; @@ -31,7 +31,7 @@ class Test1 var $var1 = 30; var $var2; - function __construct($value1, $value2) + function __construct($value1 , $value2) { $this->member1 = $value1; $this->var2 = $value2; @@ -43,14 +43,14 @@ class Child_test1 extends Test1 { public $member2; - function __construct($value1, $value2, $value3) + function __construct($value1 , $value2 , $value3) { - parent::__construct($value1, $value2); + parent::__construct($value1 , $value2); $this->member2 = $value3; } } -//class with private, static, constant members and constructor to initialize the private member +//class with private member, static member, constant and constructor to initialize the private member class Test2 { const test2_constant = "test2"; @@ -59,7 +59,7 @@ class Test2 var $var1 = 30; var $var2; - function __construct($value1,$value2) + function __construct($value1 , $value2) { $this->member1 = $value1; $this->var2 = $value2; @@ -71,14 +71,14 @@ class Child_test2 extends Test2 { private $member1; - function __construct($value1, $value2, $value3) + function __construct($value1 , $value2 , $value3) { - parent::__construct($value1, $value2); + parent::__construct($value1 , $value2); $this->member1 = $value3; } } -// class with protected, static, constant members and consturctor to initialize the protected member +// class with protected member, static member, constant and consturctor to initialize the protected member class Test3 { const test3_constant = "test3"; @@ -87,7 +87,7 @@ class Test3 var $var1 = 30; var $var2; - function __construct($value1, $value2) + function __construct($value1 , $value2) { $this->member1 = $value1; $this->var2 = $value2; @@ -99,9 +99,9 @@ class Child_test3 extends Test3 { protected $member1; - function __construct($value1, $value2, $value3) + function __construct($value1 , $value2 , $value3) { - parent::__construct($value1, $value2); + parent::__construct($value1 , $value2); $this->member1 = $value3; } } @@ -115,7 +115,7 @@ class Test4 private $member2; protected $member3; - function __construct($value1, $value2, $value3) + function __construct($value1 , $value2 , $value3) { $this->member1 = $value1; $this->member2 = $value2; @@ -128,9 +128,9 @@ class Child_test4 extends Test4 { var $var1; - function __construct($value1, $value2, $value3, $value4) + function __construct($value1 , $value2 , $value3 , $value4) { - parent::__construct($value1, $value2, $value3); + parent::__construct($value1 , $value2 , $value3); $this->var1 = $value4; } } @@ -196,7 +196,7 @@ for($index = 0; $index < count($objects); $index ++) echo "-- Iteration $counter --\n"; $val = $objects[$index]; - var_dump( array_fill($start_key, $num, $val) ); + var_dump( array_fill($start_key,$num,$val) ); $counter++; } @@ -265,7 +265,7 @@ array(2) { array(2) { [0]=> object(Test2)#%d (3) { - ["member1:private"]=> + ["member1":"Test2":private]=> int(100) ["var1"]=> int(30) @@ -274,7 +274,7 @@ array(2) { } [1]=> object(Test2)#%d (3) { - ["member1:private"]=> + ["member1":"Test2":private]=> int(100) ["var1"]=> int(30) @@ -286,9 +286,9 @@ array(2) { array(2) { [0]=> object(Child_test2)#%d (4) { - ["member1:private"]=> + ["member1":"Child_test2":private]=> int(102) - ["member1:private"]=> + ["member1":"Test2":private]=> int(100) ["var1"]=> int(30) @@ -297,9 +297,9 @@ array(2) { } [1]=> object(Child_test2)#%d (4) { - ["member1:private"]=> + ["member1":"Child_test2":private]=> int(102) - ["member1:private"]=> + ["member1":"Test2":private]=> int(100) ["var1"]=> int(30) @@ -311,7 +311,7 @@ array(2) { array(2) { [0]=> object(Test3)#%d (3) { - ["member1:protected"]=> + ["member1":protected]=> int(100) ["var1"]=> int(30) @@ -320,7 +320,7 @@ array(2) { } [1]=> object(Test3)#%d (3) { - ["member1:protected"]=> + ["member1":protected]=> int(100) ["var1"]=> int(30) @@ -332,7 +332,7 @@ array(2) { array(2) { [0]=> object(Child_test3)#%d (3) { - ["member1:protected"]=> + ["member1":protected]=> int(102) ["var1"]=> int(30) @@ -341,7 +341,7 @@ array(2) { } [1]=> object(Child_test3)#%d (3) { - ["member1:protected"]=> + ["member1":protected]=> int(102) ["var1"]=> int(30) @@ -355,18 +355,18 @@ array(2) { object(Test4)#%d (3) { ["member1"]=> int(100) - ["member2:private"]=> + ["member2":"Test4":private]=> int(101) - ["member3:protected"]=> + ["member3":protected]=> int(102) } [1]=> object(Test4)#%d (3) { ["member1"]=> int(100) - ["member2:private"]=> + ["member2":"Test4":private]=> int(101) - ["member3:protected"]=> + ["member3":protected]=> int(102) } } @@ -378,9 +378,9 @@ array(2) { int(103) ["member1"]=> int(100) - ["member2:private"]=> + ["member2":"Test4":private]=> int(101) - ["member3:protected"]=> + ["member3":protected]=> int(102) } [1]=> @@ -389,9 +389,9 @@ array(2) { int(103) ["member1"]=> int(100) - ["member2:private"]=> + ["member2":"Test4":private]=> int(101) - ["member3:protected"]=> + ["member3":protected]=> int(102) } } @@ -401,9 +401,9 @@ array(2) { object(ConcreteClass1)#%d (4) { ["member1"]=> NULL - ["member2:private"]=> + ["member2":"AbstractClass":private]=> NULL - ["member3:protected"]=> + ["member3":protected]=> NULL ["var1"]=> int(30) @@ -412,9 +412,9 @@ array(2) { object(ConcreteClass1)#%d (4) { ["member1"]=> NULL - ["member2:private"]=> + ["member2":"AbstractClass":private]=> NULL - ["member3:protected"]=> + ["member3":protected]=> NULL ["var1"]=> int(30) @@ -429,4 +429,4 @@ array(2) { object(Template1)#%d (0) { } } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/array_fill_variation1.phpt b/ext/standard/tests/array/array_fill_variation1.phpt index b265f63834..362667ddb8 100644 --- a/ext/standard/tests/array/array_fill_variation1.phpt +++ b/ext/standard/tests/array/array_fill_variation1.phpt @@ -1,8 +1,8 @@ --TEST-- -Test array_fill() function : usage variations - unexpected values for 'start_key' argument(Bug#43017) +Test array_fill() function : usage variations - unexpected values for 'start_key' argument --FILE-- <?php -/* Prototype : array array_fill(int $start_key, int $num, mixed $val) +/* Prototype : proto array array_fill(int start_key, int num, mixed val) * Description: Create an array containing num elements starting with index start_key each initialized to val * Source code: ext/standard/array.c */ @@ -42,7 +42,7 @@ $values = array( /* 1 */ 10.5, -10.5, 12.3456789000e10, - 12.3456789000E-10, + 12.34567890006E-10, .5, // array values @@ -142,26 +142,25 @@ array(2) { } -- Iteration 6 -- -Warning: array_fill(): Wrong data type for start key in %s on line %d -bool(false) +Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d +NULL -- Iteration 7 -- -Warning: array_fill(): Wrong data type for start key in %s on line %d -bool(false) +Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d +NULL -- Iteration 8 -- -Warning: array_fill(): Wrong data type for start key in %s on line %d -bool(false) +Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d +NULL -- Iteration 9 -- -Warning: array_fill(): Wrong data type for start key in %s on line %d -bool(false) +Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d +NULL -- Iteration 10 -- -Warning: array_fill(): Wrong data type for start key in %s on line %d -bool(false) +Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d +NULL -- Iteration 11 -- - array(2) { [0]=> int(100) @@ -169,7 +168,6 @@ array(2) { int(100) } -- Iteration 12 -- - array(2) { [0]=> int(100) @@ -177,7 +175,6 @@ array(2) { int(100) } -- Iteration 13 -- - array(2) { [1]=> int(100) @@ -185,7 +182,6 @@ array(2) { int(100) } -- Iteration 14 -- - array(2) { [0]=> int(100) @@ -193,7 +189,6 @@ array(2) { int(100) } -- Iteration 15 -- - array(2) { [1]=> int(100) @@ -201,7 +196,6 @@ array(2) { int(100) } -- Iteration 16 -- - array(2) { [0]=> int(100) @@ -209,47 +203,41 @@ array(2) { int(100) } -- Iteration 17 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} + +Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d +NULL -- Iteration 18 -- -array(2) { - [0]=> - int(100) - [1]=> - int(100) -} + +Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d +NULL -- Iteration 19 -- + +Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d +NULL +-- Iteration 20 -- + +Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d +NULL +-- Iteration 21 -- + +Warning: array_fill() expects parameter 1 to be long, object given in %s on line %d +NULL +-- Iteration 22 -- array(2) { [0]=> int(100) [1]=> int(100) } --- Iteration 20 -- +-- Iteration 23 -- array(2) { [0]=> int(100) [1]=> int(100) } --- Iteration 21 -- - -Warning: array_fill(): Wrong data type for start key in %s on line %d -bool(false) --- Iteration 22 -- - -Warning: array_fill(): Wrong data type for start key in %s on line %d -bool(false) --- Iteration 23 -- - -Warning: array_fill(): Wrong data type for start key in %s on line %d -bool(false) -- Iteration 24 -- -Warning: array_fill(): Wrong data type for start key in %s on line %d -bool(false) +Warning: array_fill() expects parameter 1 to be long, resource given in %s on line %d +NULL Done diff --git a/ext/standard/tests/array/array_fill_variation2.phpt b/ext/standard/tests/array/array_fill_variation2.phpt index 9eb635fded..9e9df29b0b 100644 --- a/ext/standard/tests/array/array_fill_variation2.phpt +++ b/ext/standard/tests/array/array_fill_variation2.phpt @@ -2,7 +2,7 @@ Test array_fill() function : usage variations - unexpected values for 'num' argument --FILE-- <?php -/* Prototype : array array_fill(int $start_key, int $num, mixed $val) +/* Prototype : proto array array_fill(int start_key, int num, mixed val) * Description: Create an array containing num elements starting with index start_key each initialized to val * Source code: ext/standard/array.c */ @@ -13,7 +13,7 @@ Test array_fill() function : usage variations - unexpected values for 'num' arg echo "*** Testing array_fill() : usage variations ***\n"; -// Initialise function arguments not being substituted (if any) +// Initialise function arguments not being substituted $start_key = 0; $val = 100; @@ -74,7 +74,7 @@ $values = array( @$undefined_var, // unset variable - /* 23 */ @$unset_var, + /* 24 */ @$unset_var, ); @@ -87,7 +87,7 @@ for($index = 0; $index < count($values); $index ++) echo "-- Iteration $counter --\n"; $num = $values[$index]; - var_dump( array_fill($start_key, $num, $val) ); + var_dump( array_fill($start_key,$num,$val) ); $counter ++; } @@ -131,28 +131,24 @@ Warning: array_fill(): Number of elements must be positive in %s on line %d bool(false) -- Iteration 6 -- -Warning: array_fill(): Number of elements must be positive in %s on line %d -bool(false) +Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d +NULL -- Iteration 7 -- -array(1) { - [0]=> - int(100) -} + +Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d +NULL -- Iteration 8 -- -array(1) { - [0]=> - int(100) -} + +Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d +NULL -- Iteration 9 -- -array(1) { - [0]=> - int(100) -} + +Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d +NULL -- Iteration 10 -- -array(1) { - [0]=> - int(100) -} + +Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d +NULL -- Iteration 11 -- Warning: array_fill(): Number of elements must be positive in %s on line %d @@ -181,27 +177,24 @@ Warning: array_fill(): Number of elements must be positive in %s on line %d bool(false) -- Iteration 17 -- -Warning: array_fill(): Number of elements must be positive in %s on line %d -bool(false) +Warning: array_fill() expects parameter 2 to be long, string given in %s on line %d +NULL -- Iteration 18 -- -Warning: array_fill(): Number of elements must be positive in %s on line %d -bool(false) +Warning: array_fill() expects parameter 2 to be long, string given in %s on line %d +NULL -- Iteration 19 -- -Warning: array_fill(): Number of elements must be positive in %s on line %d -bool(false) +Warning: array_fill() expects parameter 2 to be long, string given in %s on line %d +NULL -- Iteration 20 -- -Warning: array_fill(): Number of elements must be positive in %s on line %d -bool(false) +Warning: array_fill() expects parameter 2 to be long, string given in %s on line %d +NULL -- Iteration 21 -- -Notice: Object of class test could not be converted to int in %s on line %d -array(1) { - [0]=> - int(100) -} +Warning: array_fill() expects parameter 2 to be long, object given in %s on line %d +NULL -- Iteration 22 -- Warning: array_fill(): Number of elements must be positive in %s on line %d diff --git a/ext/standard/tests/array/array_fill_variation3.phpt b/ext/standard/tests/array/array_fill_variation3.phpt index fbb22d8696..4a463a9c0e 100644 --- a/ext/standard/tests/array/array_fill_variation3.phpt +++ b/ext/standard/tests/array/array_fill_variation3.phpt @@ -56,7 +56,7 @@ for($index = 0; $index < count($values); $index ++) echo "-- Iteration $counter --\n"; $val = $values[$index]; - var_dump( array_fill($start_key, $num, $val) ); + var_dump( array_fill($start_key , $num , $val) ); $counter++; } @@ -107,4 +107,4 @@ array(2) { [1]=> NULL } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/array_fill_variation4.phpt b/ext/standard/tests/array/array_fill_variation4.phpt index 247761db37..9e1f50c683 100644 --- a/ext/standard/tests/array/array_fill_variation4.phpt +++ b/ext/standard/tests/array/array_fill_variation4.phpt @@ -1,8 +1,8 @@ --TEST-- -Test array_fill() function : usage variations - using return value of array_fill as 'val' arugment +Test array_fill() function : usage variations - using return value of array_fill for 'val' argument --FILE-- <?php -/* Prototype : array array_fill(int $start_key, int $num, mixed $val) +/* Prototype : proto array array_fill(int start_key, int num, mixed val) * Description: Create an array containing num elements starting with index start_key each initialized to val * Source code: ext/standard/array.c */ @@ -36,7 +36,7 @@ for($i =0; $i < count($values); $i ++) echo "-- Iteration $counter --\n"; $val = $values[$i]; - var_dump( array_fill($start_key, $num, array_fill($start_key, $num, $val)) ); + var_dump( array_fill($start_key,$num,array_fill($start_key,$num,$val)) ); $counter++; } diff --git a/ext/standard/tests/array/array_fill_variation5.phpt b/ext/standard/tests/array/array_fill_variation5.phpt index 6260c36bd6..10fcc9c2eb 100644 --- a/ext/standard/tests/array/array_fill_variation5.phpt +++ b/ext/standard/tests/array/array_fill_variation5.phpt @@ -45,7 +45,7 @@ for($i = 0; $i < count($values); $i++) echo "-- Iteration $counter --\n"; $val = $values[$i]; - var_dump( array_fill($start_key, $num, $val) ); + var_dump( array_fill($start_key , $num , $val) ); $counter++; } diff --git a/ext/standard/tests/array/array_filter.phpt b/ext/standard/tests/array/array_filter.phpt index dcedb2eaa0..e628560d28 100644 --- a/ext/standard/tests/array/array_filter.phpt +++ b/ext/standard/tests/array/array_filter.phpt @@ -82,12 +82,12 @@ array(2) { array(0) { } -Warning: array_filter(): The second argument, 'Array', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, array given in %s on line %d NULL -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_filter(): The second argument, '1', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, integer given in %s on line %d NULL == DONE == diff --git a/ext/standard/tests/array/array_filter_error.phpt b/ext/standard/tests/array/array_filter_error.phpt index 03165b6f43..eb95c4183c 100644 --- a/ext/standard/tests/array/array_filter_error.phpt +++ b/ext/standard/tests/array/array_filter_error.phpt @@ -39,12 +39,12 @@ echo "Done" --EXPECTF-- *** Testing array_filter() : error conditions *** -- Testing array_filter() function with Zero arguments -- -Warning: Wrong parameter count for array_filter() in %s on line %d +Warning: array_filter() expects at least 1 parameter, 0 given in %s on line %d NULL -- Testing array_filter() function with more than expected no. of arguments -- -Warning: Wrong parameter count for array_filter() in %s on line %d +Warning: array_filter() expects at most 2 parameters, 3 given in %s on line %d NULL -- Testing array_filter() function with incorrect callback -- -Warning: array_filter(): The second argument, 'even', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d NULL Done diff --git a/ext/standard/tests/array/array_filter_object.phpt b/ext/standard/tests/array/array_filter_object.phpt index 4d49e8530c..de782fe69b 100644 --- a/ext/standard/tests/array/array_filter_object.phpt +++ b/ext/standard/tests/array/array_filter_object.phpt @@ -111,14 +111,14 @@ array(5) { } [2]=> object(ChildClass)#%d (2) { - ["var3:private"]=> + ["var3":"ChildClass":private]=> NULL - ["var2:protected"]=> + ["var2":protected]=> int(5) } [3]=> object(FinalClass)#%d (1) { - ["var4:private"]=> + ["var4":"FinalClass":private]=> NULL } [4]=> @@ -136,14 +136,14 @@ array(5) { } [2]=> object(ChildClass)#%d (2) { - ["var3:private"]=> + ["var3":"ChildClass":private]=> NULL - ["var2:protected"]=> + ["var2":protected]=> int(5) } [3]=> object(FinalClass)#%d (1) { - ["var4:private"]=> + ["var4":"FinalClass":private]=> NULL } [4]=> diff --git a/ext/standard/tests/array/array_filter_variation1.phpt b/ext/standard/tests/array/array_filter_variation1.phpt index f8a3ca2731..108b3dc510 100644 --- a/ext/standard/tests/array/array_filter_variation1.phpt +++ b/ext/standard/tests/array/array_filter_variation1.phpt @@ -7,7 +7,7 @@ Test array_filter() function : usage variations - Unexpected values for 'input' * Source code: ext/standard/array.c */ -/* Testing different scalar and non-scalar values for 'input' argument +/* Passing different scalar and nonscalar values for 'input' argument */ echo "*** Testing array_filter() : usage variations - unexpected values for 'input'***\n"; @@ -102,94 +102,94 @@ echo "Done" *** Testing array_filter() : usage variations - unexpected values for 'input'*** -- Iteration 1 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 2 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 3 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 4 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 5 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 6 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 7 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 8 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 9 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 10 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d NULL -- Iteration 11 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d NULL -- Iteration 12 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 13 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 14 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 15 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 16 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 17 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 18 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 19 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 20 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, object given in %s on line %d NULL -- Iteration 21 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, resource given in %s on line %d NULL -- Iteration 22 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d NULL -- Iteration 23 -- -Warning: array_filter(): The first argument should be an array in %s on line %d +Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d NULL Done diff --git a/ext/standard/tests/array/array_filter_variation2.phpt b/ext/standard/tests/array/array_filter_variation2.phpt index 323cc93648..1b5c2cc029 100644 --- a/ext/standard/tests/array/array_filter_variation2.phpt +++ b/ext/standard/tests/array/array_filter_variation2.phpt @@ -7,7 +7,7 @@ Test array_filter() function : usage variations - Unexpected values for 'callbac * Source code: ext/standard/array.c */ -/* Testing different scalar non-scalar values in place of 'callback' argument +/* Passing different scalar and nonscalar values in place of 'callback' argument */ echo "*** Testing array_filter() : usage variations - unexpected values for 'callback' function***\n"; @@ -30,7 +30,7 @@ class MyClass // resource variable $fp = fopen(__FILE__, 'r'); -// different scalar/non-scalar values inplace of 'callback' +// different scalar and nonscalar values in place of callback function $values = array( // int data @@ -98,87 +98,87 @@ echo "Done" --EXPECTF-- *** Testing array_filter() : usage variations - unexpected values for 'callback' function*** -- Iteration 1 -- -Warning: array_filter(): The second argument, '0', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, integer given in %s on line %d NULL -- Iteration 2 -- -Warning: array_filter(): The second argument, '1', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, integer given in %s on line %d NULL -- Iteration 3 -- -Warning: array_filter(): The second argument, '12345', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, integer given in %s on line %d NULL -- Iteration 4 -- -Warning: array_filter(): The second argument, '-2345', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, integer given in %s on line %d NULL -- Iteration 5 -- -Warning: array_filter(): The second argument, '10.5', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, double given in %s on line %d NULL -- Iteration 6 -- -Warning: array_filter(): The second argument, '-10.5', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, double given in %s on line %d NULL -- Iteration 7 -- -Warning: array_filter(): The second argument, '123456789000', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, double given in %s on line %d NULL -- Iteration 8 -- -Warning: array_filter(): The second argument, '1.23456789E-9', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, double given in %s on line %d NULL -- Iteration 9 -- -Warning: array_filter(): The second argument, '0.5', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, double given in %s on line %d NULL -- Iteration 10 -- -Warning: array_filter(): The second argument, 'Array', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, array given in %s on line %d NULL -- Iteration 11 -- -Warning: array_filter(): The second argument, 'Array', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, array given in %s on line %d NULL -- Iteration 12 -- -Warning: array_filter(): The second argument, 'Array', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, array given in %s on line %d NULL -- Iteration 13 -- -Warning: array_filter(): The second argument, 'Array', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, array given in %s on line %d NULL -- Iteration 14 -- -Warning: array_filter(): The second argument, 'Array', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, array given in %s on line %d NULL -- Iteration 15 -- -Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, null given in %s on line %d NULL -- Iteration 16 -- -Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, null given in %s on line %d NULL -- Iteration 17 -- -Warning: array_filter(): The second argument, '1', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, boolean given in %s on line %d NULL -- Iteration 18 -- -Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, boolean given in %s on line %d NULL -- Iteration 19 -- -Warning: array_filter(): The second argument, '1', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, boolean given in %s on line %d NULL -- Iteration 20 -- -Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, boolean given in %s on line %d NULL -- Iteration 21 -- -Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d NULL -- Iteration 22 -- -Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d NULL -- Iteration 23 -- -Warning: array_filter(): The second argument, 'string', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d NULL -- Iteration 24 -- -Warning: array_filter(): The second argument, 'string', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d NULL -- Iteration 25 -- -Warning: array_filter(): The second argument, 'object', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, object given in %s on line %d NULL -- Iteration 26 -- -Warning: array_filter(): The second argument, %s, should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, resource given in %s on line %d NULL -- Iteration 27 -- -Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, null given in %s on line %d NULL -- Iteration 28 -- -Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, null given in %s on line %d NULL Done diff --git a/ext/standard/tests/array/array_filter_variation4.phpt b/ext/standard/tests/array/array_filter_variation4.phpt index 61f40b6e85..7f028b1552 100644 --- a/ext/standard/tests/array/array_filter_variation4.phpt +++ b/ext/standard/tests/array/array_filter_variation4.phpt @@ -9,9 +9,9 @@ Test array_filter() function : usage variations - Different types of 'callback' /* * Passing different types of callback functions to array_filter() -* with parameter and return -* with paramter and without return +* with parameters and return * without parameter and with return +* with parameter and without return * without parameter and without return */ diff --git a/ext/standard/tests/array/array_filter_variation7.phpt b/ext/standard/tests/array/array_filter_variation7.phpt index e34d9133e3..cb856f713d 100644 --- a/ext/standard/tests/array/array_filter_variation7.phpt +++ b/ext/standard/tests/array/array_filter_variation7.phpt @@ -8,7 +8,7 @@ Test array_filter() function : usage variations - anonymous callback functions */ /* -* Passing different anonymous callback functions with passed by value and reference arguments, +* Passing different anonymous callback functions with passed by value and reference arguments */ echo "*** Testing array_filter() : usage variations - Anonymous callback functions ***\n"; diff --git a/ext/standard/tests/array/array_filter_variation9.phpt b/ext/standard/tests/array/array_filter_variation9.phpt index c6db57c36d..cb7d8ed9c2 100644 --- a/ext/standard/tests/array/array_filter_variation9.phpt +++ b/ext/standard/tests/array/array_filter_variation9.phpt @@ -64,9 +64,9 @@ array(8) { NULL } -Warning: array_filter(): The second argument, 'echo', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d NULL -Warning: array_filter(): The second argument, 'exit', should be a valid callback in %s on line %d +Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d NULL Done diff --git a/ext/standard/tests/array/array_flip.phpt b/ext/standard/tests/array/array_flip.phpt index 8d8622cd11..c268f5aaf6 100644 --- a/ext/standard/tests/array/array_flip.phpt +++ b/ext/standard/tests/array/array_flip.phpt @@ -14,13 +14,6 @@ $trans = array("a" => 1, 2 => "i"); $trans = array_flip($trans); var_dump($trans); - -var_dump(array_flip()); -var_dump(array_flip(array())); -var_dump(array_flip(array(1))); -var_dump(array_flip(array(array()))); - -echo "Done\n"; ?> --EXPECTF-- Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d @@ -42,17 +35,3 @@ array(6) { ["i"]=> int(2) } - -Warning: Wrong parameter count for array_flip() in %s on line %d -NULL -array(0) { -} -array(1) { - [1]=> - int(0) -} - -Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d -array(0) { -} -Done diff --git a/ext/standard/tests/array/array_flip_error.phpt b/ext/standard/tests/array/array_flip_error.phpt index 64339d76d8..3aa0f98271 100644 --- a/ext/standard/tests/array/array_flip_error.phpt +++ b/ext/standard/tests/array/array_flip_error.phpt @@ -25,10 +25,10 @@ echo "Done" *** Testing array_flip() : error conditions *** -- Testing array_flip() function with Zero arguments -- -Warning: Wrong parameter count for array_flip() in %s on line %d +Warning: array_flip() expects exactly 1 parameter, 0 given in %s on line %d NULL -- Testing array_flip() function with more than expected no. of arguments -- -Warning: Wrong parameter count for array_flip() in %s on line %d +Warning: array_flip() expects exactly 1 parameter, 2 given in %s on line %d NULL Done diff --git a/ext/standard/tests/array/array_flip_variation1.phpt b/ext/standard/tests/array/array_flip_variation1.phpt index 8042803600..6ba558f223 100644 --- a/ext/standard/tests/array/array_flip_variation1.phpt +++ b/ext/standard/tests/array/array_flip_variation1.phpt @@ -86,93 +86,94 @@ echo "Done" *** Testing array_flip() : usage variations - unexpected values for 'input' *** -- Iteration 1 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, integer given in %s on line %d +NULL -- Iteration 2 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, integer given in %s on line %d +NULL -- Iteration 3 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, integer given in %s on line %d +NULL -- Iteration 4 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, integer given in %s on line %d +NULL -- Iteration 5 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d +NULL -- Iteration 6 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d +NULL -- Iteration 7 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d +NULL -- Iteration 8 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d +NULL -- Iteration 9 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d +NULL -- Iteration 10 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d +NULL -- Iteration 11 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d +NULL -- Iteration 12 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, boolean given in %s on line %d +NULL -- Iteration 13 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, boolean given in %s on line %d +NULL -- Iteration 14 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, boolean given in %s on line %d +NULL -- Iteration 15 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, boolean given in %s on line %d +NULL -- Iteration 16 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d +NULL -- Iteration 17 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d +NULL -- Iteration 18 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d +NULL -- Iteration 19 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d +NULL -- Iteration 20 -- -array(0) { -} + +Warning: array_flip() expects parameter 1 to be array, object given in %s on line %d +NULL -- Iteration 21 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d +NULL -- Iteration 22 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d +NULL -- Iteration 23 -- -Warning: array_flip(): The argument should be an array in %s on line %d -bool(false) +Warning: array_flip() expects parameter 1 to be array, resource given in %s on line %d +NULL Done diff --git a/ext/standard/tests/array/array_flip_variation2.phpt b/ext/standard/tests/array/array_flip_variation2.phpt Binary files differindex bd8233054f..1474a6955b 100644 --- a/ext/standard/tests/array/array_flip_variation2.phpt +++ b/ext/standard/tests/array/array_flip_variation2.phpt diff --git a/ext/standard/tests/array/array_flip_variation3.phpt b/ext/standard/tests/array/array_flip_variation3.phpt Binary files differindex 376bdebb42..1d56dfa6e0 100644 --- a/ext/standard/tests/array/array_flip_variation3.phpt +++ b/ext/standard/tests/array/array_flip_variation3.phpt diff --git a/ext/standard/tests/array/array_flip_variation4.phpt b/ext/standard/tests/array/array_flip_variation4.phpt index 44d670f7fe..2420c7e00f 100644 --- a/ext/standard/tests/array/array_flip_variation4.phpt +++ b/ext/standard/tests/array/array_flip_variation4.phpt @@ -30,8 +30,8 @@ $input = array( // float values 'float_value1' => 1.2, 'float_value2' => 0.5, - 'float_value3' => 3.4E3, - 'float_value4' => 5.6E-6, + 'flaot_value3' => 3.4E3, + 'flaot_value4' => 5.6E-6, // bool values 'bool_value1' => true, diff --git a/ext/standard/tests/array/array_intersect_1.phpt b/ext/standard/tests/array/array_intersect_1.phpt index 39df5cd1b8..41f20330fd 100644 --- a/ext/standard/tests/array/array_intersect_1.phpt +++ b/ext/standard/tests/array/array_intersect_1.phpt @@ -2,7 +2,7 @@ Test of the *intersect* bunch of functions (both assoc and non-assoc) --FILE-- <?php -error_reporting(E_ALL|E_STRICT); +error_reporting(E_ALL); class cr { private $priv_member; public $public_member; @@ -14,10 +14,6 @@ class cr { if ($a->priv_member === $b->priv_member) return 0; return ($a->priv_member > $b->priv_member)? 1:-1; } - - function __toString() { - return "Object"; - } } function comp_func($a, $b) { @@ -34,14 +30,6 @@ function comp_func_cr($a, $b) { $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"; @@ -50,14 +38,6 @@ 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"; @@ -66,14 +46,6 @@ 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"; @@ -91,100 +63,6 @@ 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' => - cr::__set_state(array( - 'priv_member' => 9, - 'public_member' => 9, - )), - '0.5' => - cr::__set_state(array( - 'priv_member' => 12, - 'public_member' => 12, - )), - 0 => - cr::__set_state(array( - 'priv_member' => 23, - 'public_member' => 23, - )), - 1 => - cr::__set_state(array( - 'priv_member' => 4, - 'public_member' => 4, - )), - 2 => - cr::__set_state(array( - 'priv_member' => -15, - 'public_member' => -15, - )), -); -$b=array ( - '0.2' => - cr::__set_state(array( - 'priv_member' => 9, - 'public_member' => 9, - )), - '0.5' => - cr::__set_state(array( - 'priv_member' => 22, - 'public_member' => 22, - )), - 0 => - cr::__set_state(array( - 'priv_member' => 3, - 'public_member' => 3, - )), - 1 => - cr::__set_state(array( - 'priv_member' => 4, - 'public_member' => 4, - )), - 2 => - cr::__set_state(array( - 'priv_member' => -15, - 'public_member' => -15, - )), -); -var_dump(array_intersect($a, $b); -array(5) { - ["0.1"]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(9) - ["public_member"]=> - int(9) - } - ["0.5"]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(12) - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(23) - ["public_member"]=> - int(23) - } - [1]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(4) - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(-15) - ["public_member"]=> - int(-15) - } -} -end ------------ array_intersect() ---------------------------- begin ------------ array_uintersect() --------------------------- $a=array ( '0.1' => @@ -244,114 +122,27 @@ var_dump(array_uintersect($a, $b, "comp_func_cr")); array(3) { ["0.1"]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(9) ["public_member"]=> int(9) } [1]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(4) ["public_member"]=> int(4) } [2]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(-15) ["public_member"]=> int(-15) } } end ------------ array_uintersect() --------------------------- -begin ------------ array_intersect_assoc() ---------------------- -$a=array ( - '0.1' => - cr::__set_state(array( - 'priv_member' => 9, - 'public_member' => 9, - )), - '0.5' => - cr::__set_state(array( - 'priv_member' => 12, - 'public_member' => 12, - )), - 0 => - cr::__set_state(array( - 'priv_member' => 23, - 'public_member' => 23, - )), - 1 => - cr::__set_state(array( - 'priv_member' => 4, - 'public_member' => 4, - )), - 2 => - cr::__set_state(array( - 'priv_member' => -15, - 'public_member' => -15, - )), -); -$b=array ( - '0.2' => - cr::__set_state(array( - 'priv_member' => 9, - 'public_member' => 9, - )), - '0.5' => - cr::__set_state(array( - 'priv_member' => 22, - 'public_member' => 22, - )), - 0 => - cr::__set_state(array( - 'priv_member' => 3, - 'public_member' => 3, - )), - 1 => - cr::__set_state(array( - 'priv_member' => 4, - 'public_member' => 4, - )), - 2 => - cr::__set_state(array( - 'priv_member' => -15, - 'public_member' => -15, - )), -); -var_dump(array_intersect_assoc($a, $b)); -array(4) { - ["0.5"]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(12) - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(23) - ["public_member"]=> - int(23) - } - [1]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(4) - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(-15) - ["public_member"]=> - int(-15) - } -} -end ------------ array_intersect_assoc() ---------------------- begin ------------ array_uintersect_assoc() --------------------- $a=array ( '0.1' => @@ -411,107 +202,20 @@ var_dump(array_uintersect_assoc($a, $b, "comp_func_cr")); array(2) { [1]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(4) ["public_member"]=> int(4) } [2]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(-15) ["public_member"]=> int(-15) } } end ------------ array_uintersect_assoc() --------------------- -begin ------------ array_intersect_uassoc() --------------------- -$a=array ( - '0.1' => - cr::__set_state(array( - 'priv_member' => 9, - 'public_member' => 9, - )), - '0.5' => - cr::__set_state(array( - 'priv_member' => 12, - 'public_member' => 12, - )), - 0 => - cr::__set_state(array( - 'priv_member' => 23, - 'public_member' => 23, - )), - 1 => - cr::__set_state(array( - 'priv_member' => 4, - 'public_member' => 4, - )), - 2 => - cr::__set_state(array( - 'priv_member' => -15, - 'public_member' => -15, - )), -); -$b=array ( - '0.2' => - cr::__set_state(array( - 'priv_member' => 9, - 'public_member' => 9, - )), - '0.5' => - cr::__set_state(array( - 'priv_member' => 22, - 'public_member' => 22, - )), - 0 => - cr::__set_state(array( - 'priv_member' => 3, - 'public_member' => 3, - )), - 1 => - cr::__set_state(array( - 'priv_member' => 4, - 'public_member' => 4, - )), - 2 => - cr::__set_state(array( - 'priv_member' => -15, - 'public_member' => -15, - )), -); -var_dump(array_intersect_uassoc($a, $b, "comp_func")); -array(4) { - ["0.5"]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(12) - ["public_member"]=> - int(12) - } - [0]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(23) - ["public_member"]=> - int(23) - } - [1]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(4) - ["public_member"]=> - int(4) - } - [2]=> - object(cr)#%d (2) { - ["priv_member:private"]=> - int(-15) - ["public_member"]=> - int(-15) - } -} -end ------------ array_intersect_uassoc() --------------------- begin ------------ array_uintersect_uassoc() with ordinary func - $a=array ( '0.1' => @@ -571,14 +275,14 @@ var_dump(array_uintersect_uassoc($a, $b, "comp_func_cr", "comp_func")); array(2) { [1]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(4) ["public_member"]=> int(4) } [2]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(-15) ["public_member"]=> int(-15) @@ -644,14 +348,14 @@ var_dump(array_uintersect_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func array(2) { [1]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(4) ["public_member"]=> int(4) } [2]=> object(cr)#%d (2) { - ["priv_member:private"]=> + ["priv_member":"cr":private]=> int(-15) ["public_member"]=> int(-15) diff --git a/ext/standard/tests/array/array_intersect_error.phpt b/ext/standard/tests/array/array_intersect_error.phpt index 5161a1c7e4..46f77ac9bd 100644 --- a/ext/standard/tests/array/array_intersect_error.phpt +++ b/ext/standard/tests/array/array_intersect_error.phpt @@ -25,11 +25,11 @@ echo "Done"; -- Testing array_intersect() function with Zero arguments -- -Warning: Wrong parameter count for array_intersect() in %s on line %d +Warning: array_intersect(): at least 2 parameters are required, 0 given in %s on line %d NULL -- Testing array_intersect() function with less than expected no. of arguments -- -Warning: Wrong parameter count for array_intersect() in %s on line %d +Warning: array_intersect(): at least 2 parameters are required, 1 given in %s on line %d NULL Done diff --git a/ext/standard/tests/array/array_intersect_variation9.phpt b/ext/standard/tests/array/array_intersect_variation9.phpt index ac3c887f38..d3525dcd06 100644 --- a/ext/standard/tests/array/array_intersect_variation9.phpt +++ b/ext/standard/tests/array/array_intersect_variation9.phpt @@ -1,5 +1,5 @@ --TEST-- -Test array_intersect() function : usage variations - two dimensional arrays for $arr1 and $arr2 arguments +Test array_intersect() function : usage variations - two dimensional arrays for $arr1 and $arr2 arguments(Bug#43109) --FILE-- <?php /* Prototype : array array_intersect(array $arr1, array $arr2 [, array $...]) diff --git a/ext/standard/tests/array/array_key_exists.phpt b/ext/standard/tests/array/array_key_exists.phpt index 0d0b663010..66f8a5ab9c 100644 --- a/ext/standard/tests/array/array_key_exists.phpt +++ b/ext/standard/tests/array/array_key_exists.phpt @@ -249,7 +249,7 @@ bool(true) *** Testing error conditions *** -Warning: Wrong parameter count for array_key_exists() in %s on line %d +Warning: array_key_exists() expects exactly 2 parameters, 0 given in %s on line %d NULL Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d @@ -273,7 +273,7 @@ bool(false) Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d bool(false) -Warning: Wrong parameter count for array_key_exists() in %s on line %d +Warning: array_key_exists() expects exactly 2 parameters, 3 given in %s on line %d NULL Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d diff --git a/ext/standard/tests/array/array_keys_basic.phpt b/ext/standard/tests/array/array_keys_basic.phpt new file mode 100644 index 0000000000..80b624bb20 --- /dev/null +++ b/ext/standard/tests/array/array_keys_basic.phpt @@ -0,0 +1,27 @@ +--TEST-- +Test array_keys() function (basic) +--FILE-- +<?php + +echo "*** Testing array_keys() on basic array operation ***\n"; +$basic_arr = array("a" => 1, "b" => 2, 2.0 => 2.0, -23.45 => "asdasd", + array(1,2,3)); +var_dump(array_keys($basic_arr)); + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing array_keys() on basic array operation *** +array(5) { + [0]=> + string(1) "a" + [1]=> + string(1) "b" + [2]=> + int(2) + [3]=> + int(-23) + [4]=> + int(3) +} +Done diff --git a/ext/standard/tests/array/array_keys_error.phpt b/ext/standard/tests/array/array_keys_error.phpt index e575b09314..316e91d7e6 100644 --- a/ext/standard/tests/array/array_keys_error.phpt +++ b/ext/standard/tests/array/array_keys_error.phpt @@ -15,19 +15,19 @@ echo "Done\n"; ?> --EXPECTF-- *** Testing error conditions *** -Warning: array_keys(): The first argument should be an array in %s on line %d +Warning: array_keys() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_keys(): The first argument should be an array in %s on line %d +Warning: array_keys() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_keys(): The first argument should be an array in %s on line %d +Warning: array_keys() expects parameter 1 to be array, object given in %s on line %d NULL -Warning: Wrong parameter count for array_keys() in %s on line %d +Warning: array_keys() expects at least 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for array_keys() in %s on line %d +Warning: array_keys() expects at most 3 parameters, 4 given in %s on line %d NULL Warning: Illegal offset type in %s on line %d diff --git a/ext/standard/tests/array/array_keys_variation_003.phpt b/ext/standard/tests/array/array_keys_variation_003.phpt index 2c881bca0b..5ccf542b69 100644 --- a/ext/standard/tests/array/array_keys_variation_003.phpt +++ b/ext/standard/tests/array/array_keys_variation_003.phpt @@ -20,13 +20,15 @@ $types_arr = array( ); $values = array(TRUE, FALSE, 1, 0, -1, "1", "0", "-1", NULL, array(), "php", ""); foreach ($values as $value){ - var_dump(array_keys($types_arr, $value)); + var_dump($value); + var_dump(array_keys($types_arr, $value)); } echo "Done\n"; ?> --EXPECTF-- *** Testing array_keys() on all the types other than arrays *** +bool(true) array(3) { [0]=> int(1) @@ -35,6 +37,7 @@ array(3) { [2]=> string(3) "php" } +bool(false) array(4) { [0]=> int(0) @@ -45,10 +48,12 @@ array(4) { [3]=> string(0) "" } +int(1) array(1) { [0]=> int(1) } +int(0) array(4) { [0]=> int(0) @@ -59,22 +64,27 @@ array(4) { [3]=> string(0) "" } +int(-1) array(1) { [0]=> int(-1) } +string(1) "1" array(1) { [0]=> int(1) } +string(1) "0" array(1) { [0]=> int(0) } +string(2) "-1" array(1) { [0]=> int(-1) } +NULL array(3) { [0]=> int(2) @@ -83,16 +93,20 @@ array(3) { [2]=> string(0) "" } +array(0) { +} array(2) { [0]=> int(2) [1]=> int(3) } +string(3) "php" array(1) { [0]=> string(3) "php" } +string(0) "" array(2) { [0]=> int(2) diff --git a/ext/standard/tests/array/array_map.phpt b/ext/standard/tests/array/array_map.phpt index 78815e0833..740e05265a 100644 --- a/ext/standard/tests/array/array_map.phpt +++ b/ext/standard/tests/array/array_map.phpt @@ -106,7 +106,7 @@ class check_array_map { /* call static member function */ var_dump( array_map( array('check_array_map', 'Square'), array(1,2,3)) ); -/* call non static member function - notice should be issues*/ +/* call non static member function - warning should be issues*/ var_dump( array_map( array('check_array_map', 'Message'), array(1)) ); /* call function using object */ @@ -369,31 +369,31 @@ NULL Warning: array_map(): Argument #2 should be an array in %s on line %d NULL -Warning: Wrong parameter count for array_map() %s on line %d +Warning: array_map() expects at least 2 parameters, 0 given in %s on line %d NULL -Warning: array_map(): The first argument, 'echo', should be either NULL or a valid callback in %s on line %d +Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d NULL -Warning: array_map(): The first argument, 'array', should be either NULL or a valid callback in %s on line %d +Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d NULL -Warning: array_map(): The first argument, 'empty', should be either NULL or a valid callback in %s on line %d +Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d NULL -Warning: array_map(): The first argument, 'eval', should be either NULL or a valid callback in %s on line %d +Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d NULL -Warning: array_map(): The first argument, 'exit', should be either NULL or a valid callback in %s on line %d +Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d NULL -Warning: array_map(): The first argument, 'isset', should be either NULL or a valid callback in %s on line %d +Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d NULL -Warning: array_map(): The first argument, 'list', should be either NULL or a valid callback in %s on line %d +Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d NULL -Warning: array_map(): The first argument, 'print', should be either NULL or a valid callback in %s on line %d +Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d NULL *** Testing operation on objects *** @@ -406,15 +406,10 @@ array(3) { int(9) } -Strict Standards: Non-static method check_array_map::Message() cannot be called statically in %s on line %d - -Strict Standards: Non-static method check_array_map::Message() cannot be called statically in %s on line %d -array(1) { - [0]=> - int(1) -} +Warning: array_map() expects parameter 1 to be valid callback, array given in %s on line %d +NULL -Warning: Wrong parameter count for array_map() in %s on line %d +Warning: array_map() expects at least 2 parameters, 1 given in %s on line %d NULL array(1) { [0]=> diff --git a/ext/standard/tests/array/array_merge.phpt b/ext/standard/tests/array/array_merge.phpt new file mode 100644 index 0000000000..903b8ab76e --- /dev/null +++ b/ext/standard/tests/array/array_merge.phpt @@ -0,0 +1,764 @@ +--TEST-- +Test array_merge() function +--INI-- +precision=14 +--FILE-- +<?php +/* Prototype: array array_merge(array $array1 [, array $array2 [, array $...]]); + Description: Merge one or more arrays +*/ + +echo "\n*** Testing array_merge() basic functionality ***"; +$begin_array = array( + array(), + array( 1 => "string"), + array( "" => "string"), + array( -2.44444 => 12), + array( "a" => 1, "b" => -2.344, "b" => "string", "c" => NULL, "d" => -2.344), + array( 4 => 1, 3 => -2.344, "3" => "string", "2" => NULL,1 => -2.344), + array( NULL, 1.23 => "Hi", "string" => "hello", + array("" => "World", "-2.34" => "a", "0" => "b")) +); + +$end_array = array( + array(), + array( 1 => "string"), + array( "" => "string"), + array( -2.44444 => 12), + array( "a" => 1, "b" => -2.344, "b" => "string", "c" => NULL, "d" => -2.344), + array( 4 => 1, 3 => -2.344, "3" => "string", "2" => NULL, 1=> -2.344), + array( NULL, 1.23 => "Hi", "string" => "hello", + array("" => "World", "-2.34" => "a", "0" => "b")) +); + +/* loop through to merge two arrays */ +$count_outer = 0; +foreach($begin_array as $first) { + echo "\n\n--- Iteration $count_outer ---"; + $count_inner = 0; + foreach($end_array as $second) { + echo "\n-- Inner iteration $count_inner of Iteration $count_outer --\n"; + $result = array_merge($first, $second); + print_r($result); + $count_inner++; + } + $count_outer++; +} + + +echo "\n*** Testing array_merge() with three or more arrays ***\n"; +var_dump( array_merge( $end_array[0], + $end_array[5], + $end_array[4], + $end_array[6] + ) + ); + +var_dump( array_merge( $end_array[0], + $end_array[5], + array("array on fly"), + array("nullarray" => array()) + ) + ); + + +echo "\n*** Testing single array argument ***\n"; +/* Empty array */ +var_dump(array_merge(array())); + +/* associative array with string keys, which will not be re-indexed */ +var_dump(array_merge($begin_array[4])); + +/* associative array with numeric keys, which will be re-indexed */ +var_dump(array_merge($begin_array[5])); + +/* associative array with mixed keys and sub-array as element */ +var_dump(array_merge($begin_array[6])); + +echo "\n*** Testing array_merge() with typecasting non-array to array ***\n"; +var_dump(array_merge($begin_array[4], (array)"type1", (array)10, (array)12.34)); + +echo "\n*** Testing error conditions ***"; +/* Invalid argumens */ +var_dump(array_merge()); +var_dump(array_merge(100, 200)); +var_dump(array_merge($begin_array[0], $begin_array[1], 100)); +var_dump(array_merge($begin_array[0], $begin_array[1], $arr4)); + +echo "Done\n"; +?> +--EXPECTF-- +*** Testing array_merge() basic functionality *** + +--- Iteration 0 --- +-- Inner iteration 0 of Iteration 0 -- +Array +( +) + +-- Inner iteration 1 of Iteration 0 -- +Array +( + [0] => string +) + +-- Inner iteration 2 of Iteration 0 -- +Array +( + [] => string +) + +-- Inner iteration 3 of Iteration 0 -- +Array +( + [0] => 12 +) + +-- Inner iteration 4 of Iteration 0 -- +Array +( + [a] => 1 + [b] => string + [c] => + [d] => -2.344 +) + +-- Inner iteration 5 of Iteration 0 -- +Array +( + [0] => 1 + [1] => string + [2] => + [3] => -2.344 +) + +-- Inner iteration 6 of Iteration 0 -- +Array +( + [0] => + [1] => Hi + [string] => hello + [2] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + +) + + +--- Iteration 1 --- +-- Inner iteration 0 of Iteration 1 -- +Array +( + [0] => string +) + +-- Inner iteration 1 of Iteration 1 -- +Array +( + [0] => string + [1] => string +) + +-- Inner iteration 2 of Iteration 1 -- +Array +( + [0] => string + [] => string +) + +-- Inner iteration 3 of Iteration 1 -- +Array +( + [0] => string + [1] => 12 +) + +-- Inner iteration 4 of Iteration 1 -- +Array +( + [0] => string + [a] => 1 + [b] => string + [c] => + [d] => -2.344 +) + +-- Inner iteration 5 of Iteration 1 -- +Array +( + [0] => string + [1] => 1 + [2] => string + [3] => + [4] => -2.344 +) + +-- Inner iteration 6 of Iteration 1 -- +Array +( + [0] => string + [1] => + [2] => Hi + [string] => hello + [3] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + +) + + +--- Iteration 2 --- +-- Inner iteration 0 of Iteration 2 -- +Array +( + [] => string +) + +-- Inner iteration 1 of Iteration 2 -- +Array +( + [] => string + [0] => string +) + +-- Inner iteration 2 of Iteration 2 -- +Array +( + [] => string +) + +-- Inner iteration 3 of Iteration 2 -- +Array +( + [] => string + [0] => 12 +) + +-- Inner iteration 4 of Iteration 2 -- +Array +( + [] => string + [a] => 1 + [b] => string + [c] => + [d] => -2.344 +) + +-- Inner iteration 5 of Iteration 2 -- +Array +( + [] => string + [0] => 1 + [1] => string + [2] => + [3] => -2.344 +) + +-- Inner iteration 6 of Iteration 2 -- +Array +( + [] => string + [0] => + [1] => Hi + [string] => hello + [2] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + +) + + +--- Iteration 3 --- +-- Inner iteration 0 of Iteration 3 -- +Array +( + [0] => 12 +) + +-- Inner iteration 1 of Iteration 3 -- +Array +( + [0] => 12 + [1] => string +) + +-- Inner iteration 2 of Iteration 3 -- +Array +( + [0] => 12 + [] => string +) + +-- Inner iteration 3 of Iteration 3 -- +Array +( + [0] => 12 + [1] => 12 +) + +-- Inner iteration 4 of Iteration 3 -- +Array +( + [0] => 12 + [a] => 1 + [b] => string + [c] => + [d] => -2.344 +) + +-- Inner iteration 5 of Iteration 3 -- +Array +( + [0] => 12 + [1] => 1 + [2] => string + [3] => + [4] => -2.344 +) + +-- Inner iteration 6 of Iteration 3 -- +Array +( + [0] => 12 + [1] => + [2] => Hi + [string] => hello + [3] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + +) + + +--- Iteration 4 --- +-- Inner iteration 0 of Iteration 4 -- +Array +( + [a] => 1 + [b] => string + [c] => + [d] => -2.344 +) + +-- Inner iteration 1 of Iteration 4 -- +Array +( + [a] => 1 + [b] => string + [c] => + [d] => -2.344 + [0] => string +) + +-- Inner iteration 2 of Iteration 4 -- +Array +( + [a] => 1 + [b] => string + [c] => + [d] => -2.344 + [] => string +) + +-- Inner iteration 3 of Iteration 4 -- +Array +( + [a] => 1 + [b] => string + [c] => + [d] => -2.344 + [0] => 12 +) + +-- Inner iteration 4 of Iteration 4 -- +Array +( + [a] => 1 + [b] => string + [c] => + [d] => -2.344 +) + +-- Inner iteration 5 of Iteration 4 -- +Array +( + [a] => 1 + [b] => string + [c] => + [d] => -2.344 + [0] => 1 + [1] => string + [2] => + [3] => -2.344 +) + +-- Inner iteration 6 of Iteration 4 -- +Array +( + [a] => 1 + [b] => string + [c] => + [d] => -2.344 + [0] => + [1] => Hi + [string] => hello + [2] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + +) + + +--- Iteration 5 --- +-- Inner iteration 0 of Iteration 5 -- +Array +( + [0] => 1 + [1] => string + [2] => + [3] => -2.344 +) + +-- Inner iteration 1 of Iteration 5 -- +Array +( + [0] => 1 + [1] => string + [2] => + [3] => -2.344 + [4] => string +) + +-- Inner iteration 2 of Iteration 5 -- +Array +( + [0] => 1 + [1] => string + [2] => + [3] => -2.344 + [] => string +) + +-- Inner iteration 3 of Iteration 5 -- +Array +( + [0] => 1 + [1] => string + [2] => + [3] => -2.344 + [4] => 12 +) + +-- Inner iteration 4 of Iteration 5 -- +Array +( + [0] => 1 + [1] => string + [2] => + [3] => -2.344 + [a] => 1 + [b] => string + [c] => + [d] => -2.344 +) + +-- Inner iteration 5 of Iteration 5 -- +Array +( + [0] => 1 + [1] => string + [2] => + [3] => -2.344 + [4] => 1 + [5] => string + [6] => + [7] => -2.344 +) + +-- Inner iteration 6 of Iteration 5 -- +Array +( + [0] => 1 + [1] => string + [2] => + [3] => -2.344 + [4] => + [5] => Hi + [string] => hello + [6] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + +) + + +--- Iteration 6 --- +-- Inner iteration 0 of Iteration 6 -- +Array +( + [0] => + [1] => Hi + [string] => hello + [2] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + +) + +-- Inner iteration 1 of Iteration 6 -- +Array +( + [0] => + [1] => Hi + [string] => hello + [2] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + + [3] => string +) + +-- Inner iteration 2 of Iteration 6 -- +Array +( + [0] => + [1] => Hi + [string] => hello + [2] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + + [] => string +) + +-- Inner iteration 3 of Iteration 6 -- +Array +( + [0] => + [1] => Hi + [string] => hello + [2] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + + [3] => 12 +) + +-- Inner iteration 4 of Iteration 6 -- +Array +( + [0] => + [1] => Hi + [string] => hello + [2] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + + [a] => 1 + [b] => string + [c] => + [d] => -2.344 +) + +-- Inner iteration 5 of Iteration 6 -- +Array +( + [0] => + [1] => Hi + [string] => hello + [2] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + + [3] => 1 + [4] => string + [5] => + [6] => -2.344 +) + +-- Inner iteration 6 of Iteration 6 -- +Array +( + [0] => + [1] => Hi + [string] => hello + [2] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + + [3] => + [4] => Hi + [5] => Array + ( + [] => World + [-2.34] => a + [0] => b + ) + +) + +*** Testing array_merge() with three or more arrays *** +array(12) { + [0]=> + int(1) + [1]=> + string(6) "string" + [2]=> + NULL + [3]=> + float(-2.344) + ["a"]=> + int(1) + ["b"]=> + string(6) "string" + ["c"]=> + NULL + ["d"]=> + float(-2.344) + [4]=> + NULL + [5]=> + string(2) "Hi" + ["string"]=> + string(5) "hello" + [6]=> + array(3) { + [""]=> + string(5) "World" + ["-2.34"]=> + string(1) "a" + [0]=> + string(1) "b" + } +} +array(6) { + [0]=> + int(1) + [1]=> + string(6) "string" + [2]=> + NULL + [3]=> + float(-2.344) + [4]=> + string(12) "array on fly" + ["nullarray"]=> + array(0) { + } +} + +*** Testing single array argument *** +array(0) { +} +array(4) { + ["a"]=> + int(1) + ["b"]=> + string(6) "string" + ["c"]=> + NULL + ["d"]=> + float(-2.344) +} +array(4) { + [0]=> + int(1) + [1]=> + string(6) "string" + [2]=> + NULL + [3]=> + float(-2.344) +} +array(4) { + [0]=> + NULL + [1]=> + string(2) "Hi" + ["string"]=> + string(5) "hello" + [2]=> + array(3) { + [""]=> + string(5) "World" + ["-2.34"]=> + string(1) "a" + [0]=> + string(1) "b" + } +} + +*** Testing array_merge() with typecasting non-array to array *** +array(7) { + ["a"]=> + int(1) + ["b"]=> + string(6) "string" + ["c"]=> + NULL + ["d"]=> + float(-2.344) + [0]=> + string(5) "type1" + [1]=> + int(10) + [2]=> + float(12.34) +} + +*** Testing error conditions *** +Warning: Wrong parameter count for array_merge() in %s on line %d +NULL + +Warning: array_merge(): Argument #1 is not an array in %s on line %d + +Warning: array_merge(): Argument #2 is not an array in %s on line %d +NULL + +Warning: array_merge(): Argument #3 is not an array in %s on line %d +NULL + +Notice: Undefined variable: arr4 in %s on line %d + +Warning: array_merge(): Argument #3 is not an array in %s on line %d +NULL +Done diff --git a/ext/standard/tests/array/array_pad.phpt b/ext/standard/tests/array/array_pad.phpt index e6c4590c16..add9b3c8e5 100644 --- a/ext/standard/tests/array/array_pad.phpt +++ b/ext/standard/tests/array/array_pad.phpt @@ -21,13 +21,13 @@ var_dump(array_pad("", 2000000, 0)); echo "Done\n"; ?> --EXPECTF-- -Warning: Wrong parameter count for array_pad() in %s on line %d +Warning: array_pad() expects exactly 3 parameters, 0 given in %s on line %d NULL -Warning: Wrong parameter count for array_pad() in %s on line %d +Warning: array_pad() expects exactly 3 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for array_pad() in %s on line %d +Warning: array_pad() expects exactly 3 parameters, 2 given in %s on line %d NULL array(1) { [0]=> @@ -96,6 +96,6 @@ array(4) { Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d bool(false) -Warning: array_pad(): The argument should be an array in %s on line %d +Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d NULL Done diff --git a/ext/standard/tests/array/array_pop_errors.phpt b/ext/standard/tests/array/array_pop_errors.phpt index 6c289936b5..d6c86c3794 100644 --- a/ext/standard/tests/array/array_pop_errors.phpt +++ b/ext/standard/tests/array/array_pop_errors.phpt @@ -48,16 +48,16 @@ echo"\nDone"; --EXPECTF-- *** Testing Error Conditions *** -Warning: Wrong parameter count for array_pop() in %s on line %d +Warning: array_pop() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: array_pop(): The argument should be an array in %s on line %d +Warning: array_pop() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_pop(): The argument should be an array in %s on line %d +Warning: array_pop() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: Wrong parameter count for array_pop() in %s on line %d +Warning: array_pop() expects exactly 1 parameter, 2 given in %s on line %d NULL NULL diff --git a/ext/standard/tests/array/array_push.phpt b/ext/standard/tests/array/array_push.phpt new file mode 100644 index 0000000000..b06ee6d3d3 --- /dev/null +++ b/ext/standard/tests/array/array_push.phpt @@ -0,0 +1,282 @@ +--TEST-- +Test array_push() function +--FILE-- +<?php + +/* Prototype: int array_push( array &array ); + * Description: Push one or more elements onto the end of array + and returns the new number of elements in the array. + */ + +$empty_array = array(); +$number = 5; +$str = "abc"; + + +/* Various combinations of arrays to be used for the test */ +$mixed_array = array( + array(), + array( 1,2,3,4,5,6,7,8,9 ), + array( "One", "_Two", "Three", "Four", "Five" ), + array( 6, "six", 7, "seven", 8, "eight", 9, "nine" ), + array( "a" => "aaa", "A" => "AAA", "c" => "ccc", "d" => "ddd", "e" => "eee" ), + array( "1" => "one", "2" => "two", "3" => "three", "4" => "four", "5" => "five" ), + array( 1 => "one", 2 => "two", 3 => 7, 4 => "four", 5 => "five" ), + array( "f" => "fff", "1" => "one", 4 => 6, "" => "blank", 2.4 => "float", "F" => "FFF", + "blank" => "", 3.7 => 3.7, 5.4 => 7, 6 => 8.6, '5' => "Five", "4name" => "jonny", "a" => NULL, NULL => 3 ), + array( 12, "name", 'age', '45' ), + array( array("oNe", "tWo", 4), array(10, 20, 30, 40, 50), array() ), + array( "one" => 1, "one" => 2, "three" => 3, 3, 4, 3 => 33, 4 => 44, 5, 6, + 5.4 => 54, 5.7 => 57, "5.4" => 554, "5.7" => 557 ) +); + +/* Error Conditions */ +echo "\n*** Testing Error Conditions ***\n"; + +/* Zero argument */ +var_dump( array_push() ); + +/* Scalar argument */ +var_dump( array_push($number, 22) ); + +/* String argument */ +var_dump( array_push($str, 22) ); + +/* Invalid Number of arguments */ +var_dump( array_push($mixed_array[1],1,2) ); + +/* Empty Array as argument */ +var_dump( array_push($empty_array, 2) ); + + +/* Loop to test normal functionality with different arrays inputs */ +echo "\n*** Testing with various array inputs ***\n"; + +$counter = 1; +foreach( $mixed_array as $sub_array ) +{ + echo "\n-- Input Array for Iteration $counter is --\n"; + print_r( $sub_array ); + echo "\nOutput after push is :\n"; + var_dump( array_push($sub_array, 22, "abc") ); + $counter++; +} + +/* Checking for return value and the new array formed from push operation */ +echo "\n*** Checking for return value and the new array formed from push operation ***\n"; +var_dump( array_push($mixed_array[2], 22, 33, "44") ); +var_dump( $mixed_array[2] ); + +echo"\nDone"; +?> +--EXPECTF-- +*** Testing Error Conditions *** + +Warning: Wrong parameter count for array_push() in %s on line %d +NULL + +Warning: array_push(): First argument should be an array in %s on line %d +bool(false) + +Warning: array_push(): First argument should be an array in %s on line %d +bool(false) +int(11) +int(1) + +*** Testing with various array inputs *** + +-- Input Array for Iteration 1 is -- +Array +( +) + +Output after push is : +int(2) + +-- Input Array for Iteration 2 is -- +Array +( + [0] => 1 + [1] => 2 + [2] => 3 + [3] => 4 + [4] => 5 + [5] => 6 + [6] => 7 + [7] => 8 + [8] => 9 + [9] => 1 + [10] => 2 +) + +Output after push is : +int(13) + +-- Input Array for Iteration 3 is -- +Array +( + [0] => One + [1] => _Two + [2] => Three + [3] => Four + [4] => Five +) + +Output after push is : +int(7) + +-- Input Array for Iteration 4 is -- +Array +( + [0] => 6 + [1] => six + [2] => 7 + [3] => seven + [4] => 8 + [5] => eight + [6] => 9 + [7] => nine +) + +Output after push is : +int(10) + +-- Input Array for Iteration 5 is -- +Array +( + [a] => aaa + [A] => AAA + [c] => ccc + [d] => ddd + [e] => eee +) + +Output after push is : +int(7) + +-- Input Array for Iteration 6 is -- +Array +( + [1] => one + [2] => two + [3] => three + [4] => four + [5] => five +) + +Output after push is : +int(7) + +-- Input Array for Iteration 7 is -- +Array +( + [1] => one + [2] => two + [3] => 7 + [4] => four + [5] => five +) + +Output after push is : +int(7) + +-- Input Array for Iteration 8 is -- +Array +( + [f] => fff + [1] => one + [4] => 6 + [] => 3 + [2] => float + [F] => FFF + [blank] => + [3] => 3.7 + [5] => Five + [6] => 8.6 + [4name] => jonny + [a] => +) + +Output after push is : +int(14) + +-- Input Array for Iteration 9 is -- +Array +( + [0] => 12 + [1] => name + [2] => age + [3] => 45 +) + +Output after push is : +int(6) + +-- Input Array for Iteration 10 is -- +Array +( + [0] => Array + ( + [0] => oNe + [1] => tWo + [2] => 4 + ) + + [1] => Array + ( + [0] => 10 + [1] => 20 + [2] => 30 + [3] => 40 + [4] => 50 + ) + + [2] => Array + ( + ) + +) + +Output after push is : +int(5) + +-- Input Array for Iteration 11 is -- +Array +( + [one] => 2 + [three] => 3 + [0] => 3 + [1] => 4 + [3] => 33 + [4] => 44 + [5] => 57 + [6] => 6 + [5.4] => 554 + [5.7] => 557 +) + +Output after push is : +int(12) + +*** Checking for return value and the new array formed from push operation *** +int(8) +array(8) { + [0]=> + string(3) "One" + [1]=> + string(4) "_Two" + [2]=> + string(5) "Three" + [3]=> + string(4) "Four" + [4]=> + string(4) "Five" + [5]=> + int(22) + [6]=> + int(33) + [7]=> + string(2) "44" +} + +Done diff --git a/ext/standard/tests/array/array_rand.phpt b/ext/standard/tests/array/array_rand.phpt index 22424465a6..1f495f4b12 100644 --- a/ext/standard/tests/array/array_rand.phpt +++ b/ext/standard/tests/array/array_rand.phpt @@ -16,14 +16,14 @@ var_dump(array_rand(array(1,2,3), 2)); echo "Done\n"; ?> --EXPECTF-- -Warning: Wrong parameter count for array_rand() in %s on line %d +Warning: array_rand() expects at least 1 parameter, 0 given in %s on line %d NULL NULL Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d NULL -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d NULL Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d diff --git a/ext/standard/tests/array/array_rand_basic1.phpt b/ext/standard/tests/array/array_rand_basic1.phpt index 0a8c2d88fe..30b5b5ce9a 100644 --- a/ext/standard/tests/array/array_rand_basic1.phpt +++ b/ext/standard/tests/array/array_rand_basic1.phpt @@ -50,3 +50,4 @@ array(%d) { -- with default argument -- int(%d) Done + diff --git a/ext/standard/tests/array/array_rand_basic2.phpt b/ext/standard/tests/array/array_rand_basic2.phpt index 154fcb55a4..e18fede4bd 100644 --- a/ext/standard/tests/array/array_rand_basic2.phpt +++ b/ext/standard/tests/array/array_rand_basic2.phpt @@ -55,3 +55,4 @@ array(6) { -- with default argument -- string(%d) "%s" Done + diff --git a/ext/standard/tests/array/array_rand_error.phpt b/ext/standard/tests/array/array_rand_error.phpt index bdbbfdb016..30cc85ae6c 100644 --- a/ext/standard/tests/array/array_rand_error.phpt +++ b/ext/standard/tests/array/array_rand_error.phpt @@ -27,11 +27,12 @@ echo "Done"; -- Testing array_rand() function with Zero arguments -- -Warning: Wrong parameter count for array_rand() in %s on line %d +Warning: array_rand() expects at least 1 parameter, 0 given in %s on line %d NULL -- Testing array_rand() function with more than expected no. of arguments -- -Warning: Wrong parameter count for array_rand() in %s on line %d +Warning: array_rand() expects at most 2 parameters, 3 given in %s on line %d NULL Done + diff --git a/ext/standard/tests/array/array_rand_variation1.phpt b/ext/standard/tests/array/array_rand_variation1.phpt index 3b15610760..e215829f7e 100644 --- a/ext/standard/tests/array/array_rand_variation1.phpt +++ b/ext/standard/tests/array/array_rand_variation1.phpt @@ -1,5 +1,5 @@ --TEST-- -Test array_rand() function : usage variations - unexpected values for 'input' parameter +Test array_rand() function : usage variations - unexpected values for 'input' parameter --FILE-- <?php /* Prototype : mixed array_rand(array input [, int num_req]) @@ -101,116 +101,117 @@ echo "Done"; -- Iteration 1 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 2 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 3 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 4 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 5 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 6 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 7 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 8 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 9 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 10 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d NULL -- Iteration 11 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d NULL -- Iteration 12 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 13 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 14 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 15 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 16 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 17 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 18 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 19 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 20 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, object given in %s on line %d NULL -- Iteration 21 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, resource given in %s on line %d NULL -- Iteration 22 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d NULL -- Iteration 23 -- -Warning: array_rand(): First argument has to be an array in %s on line %d +Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d NULL Done + diff --git a/ext/standard/tests/array/array_rand_variation2.phpt b/ext/standard/tests/array/array_rand_variation2.phpt index e97a7186fd..3340a12b51 100644 --- a/ext/standard/tests/array/array_rand_variation2.phpt +++ b/ext/standard/tests/array/array_rand_variation2.phpt @@ -1,5 +1,5 @@ --TEST-- -Test array_rand() function : usage variations - unexpected values for 'num_req' parameter +Test array_rand() function : usage variations - unexpected values for 'num_req' parameter --FILE-- <?php /* Prototype : mixed array_rand(array input [, int num_req]) @@ -179,28 +179,28 @@ NULL -- Iteration 16 -- -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d +Warning: array_rand() expects parameter 2 to be long, string given in %s on line %d NULL -- Iteration 17 -- -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d +Warning: array_rand() expects parameter 2 to be long, string given in %s on line %d NULL -- Iteration 18 -- -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d +Warning: array_rand() expects parameter 2 to be long, string given in %s on line %d NULL -- Iteration 19 -- -Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d +Warning: array_rand() expects parameter 2 to be long, string given in %s on line %d NULL -- Iteration 20 -- -Notice: Object of class test could not be converted to int in %s on line %d -int(%d) +Warning: array_rand() expects parameter 2 to be long, object given in %s on line %d +NULL -- Iteration 21 -- @@ -212,3 +212,4 @@ NULL Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d NULL Done + diff --git a/ext/standard/tests/array/array_rand_variation3.phpt b/ext/standard/tests/array/array_rand_variation3.phpt index 62ab6b8dbd..81194a135d 100644 --- a/ext/standard/tests/array/array_rand_variation3.phpt +++ b/ext/standard/tests/array/array_rand_variation3.phpt @@ -147,3 +147,4 @@ array(3) { int(%d) } Done + diff --git a/ext/standard/tests/array/array_rand_variation4.phpt b/ext/standard/tests/array/array_rand_variation4.phpt index 9eb7edcd59..72b6c55cf3 100644 --- a/ext/standard/tests/array/array_rand_variation4.phpt +++ b/ext/standard/tests/array/array_rand_variation4.phpt @@ -165,3 +165,4 @@ array\(2\) { string\([0-9]*\) "[#&!N <\n\t'"\0]*[U#$>]*[rL]*[L]*" } Done + diff --git a/ext/standard/tests/array/array_rand_variation5.phpt b/ext/standard/tests/array/array_rand_variation5.phpt index e578d81252..69dded96d9 100644 --- a/ext/standard/tests/array/array_rand_variation5.phpt +++ b/ext/standard/tests/array/array_rand_variation5.phpt @@ -72,3 +72,4 @@ NULL Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d NULL Done + diff --git a/ext/standard/tests/array/array_rand_variation6.phpt b/ext/standard/tests/array/array_rand_variation6.phpt index 887a18d4a4..3f1fea28cd 100644 --- a/ext/standard/tests/array/array_rand_variation6.phpt +++ b/ext/standard/tests/array/array_rand_variation6.phpt @@ -101,3 +101,4 @@ array\(6\) { string\([0-9]*\) "[a-z \n \t \0 0-9 ]*" } Done + diff --git a/ext/standard/tests/array/array_reverse_error.phpt b/ext/standard/tests/array/array_reverse_error.phpt index 8ec42bfa8b..faf7e8243f 100644 --- a/ext/standard/tests/array/array_reverse_error.phpt +++ b/ext/standard/tests/array/array_reverse_error.phpt @@ -27,14 +27,14 @@ echo "Done"; -- Testing array_reverse() function with Zero arguments -- -Warning: Wrong parameter count for array_reverse() in %s on line %d +Warning: array_reverse() expects at least 1 parameter, 0 given in %s on line %d NULL -- Testing array_diff() function with more than expected no. of arguments -- -Warning: Wrong parameter count for array_reverse() in %s on line %d +Warning: array_reverse() expects at most 2 parameters, 3 given in %s on line %d NULL -Warning: Wrong parameter count for array_reverse() in %s on line %d +Warning: array_reverse() expects at most 2 parameters, 3 given in %s on line %d NULL Done diff --git a/ext/standard/tests/array/array_reverse_variation1.phpt b/ext/standard/tests/array/array_reverse_variation1.phpt index ea0c222228..35a73bb1e4 100644 --- a/ext/standard/tests/array/array_reverse_variation1.phpt +++ b/ext/standard/tests/array/array_reverse_variation1.phpt @@ -99,242 +99,242 @@ echo "Done"; *** Testing array_reverse() : usage variations - unexpected values for 'array' argument *** -- Iteration 1 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 2 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 3 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 4 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d NULL -- Iteration 5 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 6 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 7 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 8 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 9 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d NULL -- Iteration 10 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d NULL -- Iteration 11 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d NULL -- Iteration 12 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 13 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 14 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 15 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d NULL -- Iteration 16 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 17 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 18 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 19 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 20 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d NULL -- Iteration 21 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d NULL -- Iteration 22 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d NULL -- Iteration 23 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d NULL -- Iteration 24 -- -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d NULL -Warning: array_reverse(): The argument should be an array in %s on line %d +Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d NULL Done diff --git a/ext/standard/tests/array/array_reverse_variation2.phpt b/ext/standard/tests/array/array_reverse_variation2.phpt index 1f036a3e8c..69e7a9f112 100644 --- a/ext/standard/tests/array/array_reverse_variation2.phpt +++ b/ext/standard/tests/array/array_reverse_variation2.phpt @@ -234,80 +234,25 @@ array(6) { string(5) "green" } -- Iteration 10 -- -array(6) { - [0]=> - string(4) "pink" - [1]=> - string(6) "orange" - [2]=> - string(3) "red" - [3]=> - string(4) "blue" - [4]=> - string(3) "red" - ["a"]=> - string(5) "green" -} + +Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d +NULL -- Iteration 11 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} + +Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d +NULL -- Iteration 12 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} + +Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d +NULL -- Iteration 13 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} + +Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d +NULL -- Iteration 14 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} + +Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d +NULL -- Iteration 15 -- array(6) { [0]=> @@ -429,20 +374,9 @@ array(6) { string(5) "green" } -- Iteration 23 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} + +Warning: array_reverse() expects parameter 2 to be boolean, object given in %s on line %d +NULL -- Iteration 24 -- array(6) { [0]=> @@ -474,18 +408,7 @@ array(6) { string(5) "green" } -- Iteration 26 -- -array(6) { - [4]=> - string(4) "pink" - [3]=> - string(6) "orange" - [2]=> - string(3) "red" - [1]=> - string(4) "blue" - [0]=> - string(3) "red" - ["a"]=> - string(5) "green" -} + +Warning: array_reverse() expects parameter 2 to be boolean, resource given in %s on line %d +NULL Done diff --git a/ext/standard/tests/array/array_search1.phpt b/ext/standard/tests/array/array_search1.phpt index 961c771eb7..26377d218f 100644 --- a/ext/standard/tests/array/array_search1.phpt +++ b/ext/standard/tests/array/array_search1.phpt @@ -19,11 +19,11 @@ var_dump(array_search(-1,$a, true)); echo "Done\n"; ?> --EXPECTF-- -Warning: Wrong parameter count for array_search() in %s on line %d +Warning: array_search() expects at least 2 parameters, 1 given in %s on line %d NULL -Warning: array_search(): Wrong datatype for second argument in %s on line %d -bool(false) +Warning: array_search() expects parameter 2 to be array, integer given in %s on line %d +NULL int(1) bool(false) int(1) diff --git a/ext/standard/tests/array/array_search_errors.phpt b/ext/standard/tests/array/array_search_errors.phpt index 8f13497bb8..0127f62cbc 100644 --- a/ext/standard/tests/array/array_search_errors.phpt +++ b/ext/standard/tests/array/array_search_errors.phpt @@ -27,18 +27,18 @@ echo "Done\n"; --EXPECTF-- *** Testing error conditions of array_search() *** -Warning: Wrong parameter count for array_search() in %s on line %d +Warning: array_search() expects at least 2 parameters, 0 given in %s on line %d NULL -Warning: Wrong parameter count for array_search() in %s on line %d +Warning: array_search() expects at most 3 parameters, 4 given in %s on line %d NULL -Warning: Wrong parameter count for array_search() in %s on line %d +Warning: array_search() expects at least 2 parameters, 1 given in %s on line %d NULL -Warning: array_search(): Wrong datatype for second argument in %s on line %d -bool(false) +Warning: array_search() expects parameter 2 to be array, string given in %s on line %d +NULL -Warning: array_search(): Wrong datatype for second argument in %s on line %d -bool(false) +Warning: array_search() expects parameter 2 to be array, integer given in %s on line %d +NULL Done diff --git a/ext/standard/tests/array/array_search_variation1.phpt b/ext/standard/tests/array/array_search_variation1.phpt index 4674d19941..96395013bb 100644 --- a/ext/standard/tests/array/array_search_variation1.phpt +++ b/ext/standard/tests/array/array_search_variation1.phpt @@ -638,4 +638,4 @@ int(0) bool(false) bool(false) bool(false) -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/array_search_variation3.phpt b/ext/standard/tests/array/array_search_variation3.phpt index 6213fb75fd..8af089a72c 100644 --- a/ext/standard/tests/array/array_search_variation3.phpt +++ b/ext/standard/tests/array/array_search_variation3.phpt @@ -49,10 +49,10 @@ int(5) *** Testing objects with array_search() *** -Warning: array_search(): Wrong datatype for second argument in %s on line %d -bool(false) +Warning: array_search() expects parameter 2 to be array, object given in %s on line %d +NULL -Warning: array_search(): Wrong datatype for second argument in %s on line %d -bool(false) +Warning: array_search() expects parameter 2 to be array, object given in %s on line %d +NULL int(1) Done diff --git a/ext/standard/tests/array/array_search_variation4.phpt b/ext/standard/tests/array/array_search_variation4.phpt index 6dbe3fa34a..04f3b91388 100644 --- a/ext/standard/tests/array/array_search_variation4.phpt +++ b/ext/standard/tests/array/array_search_variation4.phpt @@ -71,4 +71,4 @@ bool(false) bool(false) int(0) bool(false) -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/array_slice.phpt b/ext/standard/tests/array/array_slice.phpt new file mode 100644 index 0000000000..c8b9c9351b --- /dev/null +++ b/ext/standard/tests/array/array_slice.phpt @@ -0,0 +1,1461 @@ +--TEST-- +Testing array_slice() function +--FILE-- + +<?php + +$var_array = array( + array(), + array(1,2,3,4,5,6,7,8,9), + array("One", "Two", "Three", "Four", "Five"), + array(6, "six", 7, "seven", 8, "eight", 9, "nine"), + array( "a" => "aaa", "A" => "AAA", "c" => "ccc", "d" => "ddd", "e" => "eee"), + array("1" => "one", "2" => "two", "3" => "three", "4" => "four", "5" => "five"), + array(1 => "one", 2 => "two", 3 => 7, 4 => "four", 5 => "five"), + array("f" => "fff", "1" => "one", 4 => 6, "" => "blank", 2.4 => "float", "F" => "FFF", + "blank" => "", 3.7 => 3.7, 5.4 => 7, 6 => 8.6, '5' => "Five"), + array(12, "name", 'age', '45'), + array( array("oNe", "tWo", 4), array(10, 20, 30, 40, 50), array()) + ); + +$num = 4; +$str = "john"; + +/* Zero args */ +echo"\n*** Output for Zero Argument ***\n"; +array_slice(); + +/* Single args */ +echo"\n*** Output for Single array Argument ***\n"; +array_slice($var_array); + +/* More than valid no. of args (ie. >4 ) */ +echo"\n*** Output for invalid number of Arguments ***\n"; +array_slice($var_array, 2, 4, true, 3); + +/* Scalar arg */ +echo"\n*** Output for scalar Argument ***\n"; +array_slice($num, 2); + +/* String arg */ +echo"\n*** Output for string Argument ***\n"; +array_slice($str, 2); + +$counter = 1; +foreach ($var_array as $sub_array) +{ + /* variations with two arguments */ + /* offset values >, < and = 0 */ + + echo"\n*** Iteration ".$counter." ***\n"; + echo"\n*** Variation with first two Arguments ***\n"; + var_dump ( array_slice($sub_array, 1) ); + var_dump ( array_slice($sub_array, 0) ); + var_dump ( array_slice($sub_array, -2) ); + + /* variations with three arguments */ + /* offset value variations with length values */ + echo"\n*** Variation with first three Arguments ***\n"; + var_dump ( array_slice($sub_array, 1, 3) ); + var_dump ( array_slice($sub_array, 1, 0) ); + var_dump ( array_slice($sub_array, 1, -3) ); + var_dump ( array_slice($sub_array, 0, 3) ); + var_dump ( array_slice($sub_array, 0, 0) ); + var_dump ( array_slice($sub_array, 0, -3) ); + var_dump ( array_slice($sub_array, -2, 3) ); + var_dump ( array_slice($sub_array, -2, 0 ) ); + var_dump ( array_slice($sub_array, -2, -3) ); + + /* variations with four arguments */ + /* offset value, length value and preserve_key values variation */ + echo"\n*** Variation with first two arguments with preserve_key value TRUE ***\n"; + var_dump ( array_slice($sub_array, 1, 3, true) ); + var_dump ( array_slice($sub_array, 1, 0, true) ); + var_dump ( array_slice($sub_array, 1, -3, true) ); + var_dump ( array_slice($sub_array, 0, 3, true) ); + var_dump ( array_slice($sub_array, 0, 0, true) ); + var_dump ( array_slice($sub_array, 0, -3, true) ); + var_dump ( array_slice($sub_array, -2, 3, true) ); + var_dump ( array_slice($sub_array, -2, 0, true) ); + var_dump ( array_slice($sub_array, -2, -3, true) ); + $counter++; +} + + /* variation of offset and length to point to same element */ + echo"\n*** Typical Variation of offset and length Arguments ***\n"; + var_dump (array_slice($var_array[2], 1, -3, true) ); + var_dump (array_slice($var_array[2], 1, -3, false) ); + var_dump (array_slice($var_array[2], -3, -2, true) ); + var_dump (array_slice($var_array[2], -3, -2, false) ); + +?> + +--EXPECTF-- +*** Output for Zero Argument *** + +Warning: array_slice() expects at least %d parameters, %d given in %s on line %d + +*** Output for Single array Argument *** + +Warning: array_slice() expects at least %d parameters, %d given in %s on line %d + +*** Output for invalid number of Arguments *** + +Warning: array_slice() expects at most %d parameters, %d given in %s on line %d + +*** Output for scalar Argument *** + +Warning: array_slice() expects parameter %d to be array, integer given in %s on line %d + +*** Output for string Argument *** + +Warning: array_slice() expects parameter %d to be array, string given in %s on line %d%d + +*** Iteration 1 *** + +*** Variation with first two Arguments *** +array(0) { +} +array(0) { +} +array(0) { +} + +*** Variation with first three Arguments *** +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} + +*** Variation with first two arguments with preserve_key value TRUE *** +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} + +*** Iteration 2 *** + +*** Variation with first two Arguments *** +array(8) { + [0]=> + int(2) + [1]=> + int(3) + [2]=> + int(4) + [3]=> + int(5) + [4]=> + int(6) + [5]=> + int(7) + [6]=> + int(8) + [7]=> + int(9) +} +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) +} +array(2) { + [0]=> + int(8) + [1]=> + int(9) +} + +*** Variation with first three Arguments *** +array(3) { + [0]=> + int(2) + [1]=> + int(3) + [2]=> + int(4) +} +array(0) { +} +array(5) { + [0]=> + int(2) + [1]=> + int(3) + [2]=> + int(4) + [3]=> + int(5) + [4]=> + int(6) +} +array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) +} +array(0) { +} +array(6) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(4) + [4]=> + int(5) + [5]=> + int(6) +} +array(2) { + [0]=> + int(8) + [1]=> + int(9) +} +array(0) { +} +array(0) { +} + +*** Variation with first two arguments with preserve_key value TRUE *** +array(3) { + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(4) +} +array(0) { +} +array(5) { + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(4) + [4]=> + int(5) + [5]=> + int(6) +} +array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) +} +array(0) { +} +array(6) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) + [3]=> + int(4) + [4]=> + int(5) + [5]=> + int(6) +} +array(2) { + [7]=> + int(8) + [8]=> + int(9) +} +array(0) { +} +array(0) { +} + +*** Iteration 3 *** + +*** Variation with first two Arguments *** +array(4) { + [0]=> + string(3) "Two" + [1]=> + string(5) "Three" + [2]=> + string(4) "Four" + [3]=> + string(4) "Five" +} +array(5) { + [0]=> + string(3) "One" + [1]=> + string(3) "Two" + [2]=> + string(5) "Three" + [3]=> + string(4) "Four" + [4]=> + string(4) "Five" +} +array(2) { + [0]=> + string(4) "Four" + [1]=> + string(4) "Five" +} + +*** Variation with first three Arguments *** +array(3) { + [0]=> + string(3) "Two" + [1]=> + string(5) "Three" + [2]=> + string(4) "Four" +} +array(0) { +} +array(1) { + [0]=> + string(3) "Two" +} +array(3) { + [0]=> + string(3) "One" + [1]=> + string(3) "Two" + [2]=> + string(5) "Three" +} +array(0) { +} +array(2) { + [0]=> + string(3) "One" + [1]=> + string(3) "Two" +} +array(2) { + [0]=> + string(4) "Four" + [1]=> + string(4) "Five" +} +array(0) { +} +array(0) { +} + +*** Variation with first two arguments with preserve_key value TRUE *** +array(3) { + [1]=> + string(3) "Two" + [2]=> + string(5) "Three" + [3]=> + string(4) "Four" +} +array(0) { +} +array(1) { + [1]=> + string(3) "Two" +} +array(3) { + [0]=> + string(3) "One" + [1]=> + string(3) "Two" + [2]=> + string(5) "Three" +} +array(0) { +} +array(2) { + [0]=> + string(3) "One" + [1]=> + string(3) "Two" +} +array(2) { + [3]=> + string(4) "Four" + [4]=> + string(4) "Five" +} +array(0) { +} +array(0) { +} + +*** Iteration 4 *** + +*** Variation with first two Arguments *** +array(7) { + [0]=> + string(3) "six" + [1]=> + int(7) + [2]=> + string(5) "seven" + [3]=> + int(8) + [4]=> + string(5) "eight" + [5]=> + int(9) + [6]=> + string(4) "nine" +} +array(8) { + [0]=> + int(6) + [1]=> + string(3) "six" + [2]=> + int(7) + [3]=> + string(5) "seven" + [4]=> + int(8) + [5]=> + string(5) "eight" + [6]=> + int(9) + [7]=> + string(4) "nine" +} +array(2) { + [0]=> + int(9) + [1]=> + string(4) "nine" +} + +*** Variation with first three Arguments *** +array(3) { + [0]=> + string(3) "six" + [1]=> + int(7) + [2]=> + string(5) "seven" +} +array(0) { +} +array(4) { + [0]=> + string(3) "six" + [1]=> + int(7) + [2]=> + string(5) "seven" + [3]=> + int(8) +} +array(3) { + [0]=> + int(6) + [1]=> + string(3) "six" + [2]=> + int(7) +} +array(0) { +} +array(5) { + [0]=> + int(6) + [1]=> + string(3) "six" + [2]=> + int(7) + [3]=> + string(5) "seven" + [4]=> + int(8) +} +array(2) { + [0]=> + int(9) + [1]=> + string(4) "nine" +} +array(0) { +} +array(0) { +} + +*** Variation with first two arguments with preserve_key value TRUE *** +array(3) { + [1]=> + string(3) "six" + [2]=> + int(7) + [3]=> + string(5) "seven" +} +array(0) { +} +array(4) { + [1]=> + string(3) "six" + [2]=> + int(7) + [3]=> + string(5) "seven" + [4]=> + int(8) +} +array(3) { + [0]=> + int(6) + [1]=> + string(3) "six" + [2]=> + int(7) +} +array(0) { +} +array(5) { + [0]=> + int(6) + [1]=> + string(3) "six" + [2]=> + int(7) + [3]=> + string(5) "seven" + [4]=> + int(8) +} +array(2) { + [6]=> + int(9) + [7]=> + string(4) "nine" +} +array(0) { +} +array(0) { +} + +*** Iteration 5 *** + +*** Variation with first two Arguments *** +array(4) { + ["A"]=> + string(3) "AAA" + ["c"]=> + string(3) "ccc" + ["d"]=> + string(3) "ddd" + ["e"]=> + string(3) "eee" +} +array(5) { + ["a"]=> + string(3) "aaa" + ["A"]=> + string(3) "AAA" + ["c"]=> + string(3) "ccc" + ["d"]=> + string(3) "ddd" + ["e"]=> + string(3) "eee" +} +array(2) { + ["d"]=> + string(3) "ddd" + ["e"]=> + string(3) "eee" +} + +*** Variation with first three Arguments *** +array(3) { + ["A"]=> + string(3) "AAA" + ["c"]=> + string(3) "ccc" + ["d"]=> + string(3) "ddd" +} +array(0) { +} +array(1) { + ["A"]=> + string(3) "AAA" +} +array(3) { + ["a"]=> + string(3) "aaa" + ["A"]=> + string(3) "AAA" + ["c"]=> + string(3) "ccc" +} +array(0) { +} +array(2) { + ["a"]=> + string(3) "aaa" + ["A"]=> + string(3) "AAA" +} +array(2) { + ["d"]=> + string(3) "ddd" + ["e"]=> + string(3) "eee" +} +array(0) { +} +array(0) { +} + +*** Variation with first two arguments with preserve_key value TRUE *** +array(3) { + ["A"]=> + string(3) "AAA" + ["c"]=> + string(3) "ccc" + ["d"]=> + string(3) "ddd" +} +array(0) { +} +array(1) { + ["A"]=> + string(3) "AAA" +} +array(3) { + ["a"]=> + string(3) "aaa" + ["A"]=> + string(3) "AAA" + ["c"]=> + string(3) "ccc" +} +array(0) { +} +array(2) { + ["a"]=> + string(3) "aaa" + ["A"]=> + string(3) "AAA" +} +array(2) { + ["d"]=> + string(3) "ddd" + ["e"]=> + string(3) "eee" +} +array(0) { +} +array(0) { +} + +*** Iteration 6 *** + +*** Variation with first two Arguments *** +array(4) { + [0]=> + string(3) "two" + [1]=> + string(5) "three" + [2]=> + string(4) "four" + [3]=> + string(4) "five" +} +array(5) { + [0]=> + string(3) "one" + [1]=> + string(3) "two" + [2]=> + string(5) "three" + [3]=> + string(4) "four" + [4]=> + string(4) "five" +} +array(2) { + [0]=> + string(4) "four" + [1]=> + string(4) "five" +} + +*** Variation with first three Arguments *** +array(3) { + [0]=> + string(3) "two" + [1]=> + string(5) "three" + [2]=> + string(4) "four" +} +array(0) { +} +array(1) { + [0]=> + string(3) "two" +} +array(3) { + [0]=> + string(3) "one" + [1]=> + string(3) "two" + [2]=> + string(5) "three" +} +array(0) { +} +array(2) { + [0]=> + string(3) "one" + [1]=> + string(3) "two" +} +array(2) { + [0]=> + string(4) "four" + [1]=> + string(4) "five" +} +array(0) { +} +array(0) { +} + +*** Variation with first two arguments with preserve_key value TRUE *** +array(3) { + [2]=> + string(3) "two" + [3]=> + string(5) "three" + [4]=> + string(4) "four" +} +array(0) { +} +array(1) { + [2]=> + string(3) "two" +} +array(3) { + [1]=> + string(3) "one" + [2]=> + string(3) "two" + [3]=> + string(5) "three" +} +array(0) { +} +array(2) { + [1]=> + string(3) "one" + [2]=> + string(3) "two" +} +array(2) { + [4]=> + string(4) "four" + [5]=> + string(4) "five" +} +array(0) { +} +array(0) { +} + +*** Iteration 7 *** + +*** Variation with first two Arguments *** +array(4) { + [0]=> + string(3) "two" + [1]=> + int(7) + [2]=> + string(4) "four" + [3]=> + string(4) "five" +} +array(5) { + [0]=> + string(3) "one" + [1]=> + string(3) "two" + [2]=> + int(7) + [3]=> + string(4) "four" + [4]=> + string(4) "five" +} +array(2) { + [0]=> + string(4) "four" + [1]=> + string(4) "five" +} + +*** Variation with first three Arguments *** +array(3) { + [0]=> + string(3) "two" + [1]=> + int(7) + [2]=> + string(4) "four" +} +array(0) { +} +array(1) { + [0]=> + string(3) "two" +} +array(3) { + [0]=> + string(3) "one" + [1]=> + string(3) "two" + [2]=> + int(7) +} +array(0) { +} +array(2) { + [0]=> + string(3) "one" + [1]=> + string(3) "two" +} +array(2) { + [0]=> + string(4) "four" + [1]=> + string(4) "five" +} +array(0) { +} +array(0) { +} + +*** Variation with first two arguments with preserve_key value TRUE *** +array(3) { + [2]=> + string(3) "two" + [3]=> + int(7) + [4]=> + string(4) "four" +} +array(0) { +} +array(1) { + [2]=> + string(3) "two" +} +array(3) { + [1]=> + string(3) "one" + [2]=> + string(3) "two" + [3]=> + int(7) +} +array(0) { +} +array(2) { + [1]=> + string(3) "one" + [2]=> + string(3) "two" +} +array(2) { + [4]=> + string(4) "four" + [5]=> + string(4) "five" +} +array(0) { +} +array(0) { +} + +*** Iteration 8 *** + +*** Variation with first two Arguments *** +array(9) { + [0]=> + string(3) "one" + [1]=> + int(6) + [""]=> + string(5) "blank" + [2]=> + string(5) "float" + ["F"]=> + string(3) "FFF" + ["blank"]=> + string(0) "" + [3]=> + float(3.7) + [4]=> + string(4) "Five" + [5]=> + float(8.6) +} +array(10) { + ["f"]=> + string(3) "fff" + [0]=> + string(3) "one" + [1]=> + int(6) + [""]=> + string(5) "blank" + [2]=> + string(5) "float" + ["F"]=> + string(3) "FFF" + ["blank"]=> + string(0) "" + [3]=> + float(3.7) + [4]=> + string(4) "Five" + [5]=> + float(8.6) +} +array(2) { + [0]=> + string(4) "Five" + [1]=> + float(8.6) +} + +*** Variation with first three Arguments *** +array(3) { + [0]=> + string(3) "one" + [1]=> + int(6) + [""]=> + string(5) "blank" +} +array(0) { +} +array(6) { + [0]=> + string(3) "one" + [1]=> + int(6) + [""]=> + string(5) "blank" + [2]=> + string(5) "float" + ["F"]=> + string(3) "FFF" + ["blank"]=> + string(0) "" +} +array(3) { + ["f"]=> + string(3) "fff" + [0]=> + string(3) "one" + [1]=> + int(6) +} +array(0) { +} +array(7) { + ["f"]=> + string(3) "fff" + [0]=> + string(3) "one" + [1]=> + int(6) + [""]=> + string(5) "blank" + [2]=> + string(5) "float" + ["F"]=> + string(3) "FFF" + ["blank"]=> + string(0) "" +} +array(2) { + [0]=> + string(4) "Five" + [1]=> + float(8.6) +} +array(0) { +} +array(0) { +} + +*** Variation with first two arguments with preserve_key value TRUE *** +array(3) { + [1]=> + string(3) "one" + [4]=> + int(6) + [""]=> + string(5) "blank" +} +array(0) { +} +array(6) { + [1]=> + string(3) "one" + [4]=> + int(6) + [""]=> + string(5) "blank" + [2]=> + string(5) "float" + ["F"]=> + string(3) "FFF" + ["blank"]=> + string(0) "" +} +array(3) { + ["f"]=> + string(3) "fff" + [1]=> + string(3) "one" + [4]=> + int(6) +} +array(0) { +} +array(7) { + ["f"]=> + string(3) "fff" + [1]=> + string(3) "one" + [4]=> + int(6) + [""]=> + string(5) "blank" + [2]=> + string(5) "float" + ["F"]=> + string(3) "FFF" + ["blank"]=> + string(0) "" +} +array(2) { + [5]=> + string(4) "Five" + [6]=> + float(8.6) +} +array(0) { +} +array(0) { +} + +*** Iteration 9 *** + +*** Variation with first two Arguments *** +array(3) { + [0]=> + string(4) "name" + [1]=> + string(3) "age" + [2]=> + string(2) "45" +} +array(4) { + [0]=> + int(12) + [1]=> + string(4) "name" + [2]=> + string(3) "age" + [3]=> + string(2) "45" +} +array(2) { + [0]=> + string(3) "age" + [1]=> + string(2) "45" +} + +*** Variation with first three Arguments *** +array(3) { + [0]=> + string(4) "name" + [1]=> + string(3) "age" + [2]=> + string(2) "45" +} +array(0) { +} +array(0) { +} +array(3) { + [0]=> + int(12) + [1]=> + string(4) "name" + [2]=> + string(3) "age" +} +array(0) { +} +array(1) { + [0]=> + int(12) +} +array(2) { + [0]=> + string(3) "age" + [1]=> + string(2) "45" +} +array(0) { +} +array(0) { +} + +*** Variation with first two arguments with preserve_key value TRUE *** +array(3) { + [1]=> + string(4) "name" + [2]=> + string(3) "age" + [3]=> + string(2) "45" +} +array(0) { +} +array(0) { +} +array(3) { + [0]=> + int(12) + [1]=> + string(4) "name" + [2]=> + string(3) "age" +} +array(0) { +} +array(1) { + [0]=> + int(12) +} +array(2) { + [2]=> + string(3) "age" + [3]=> + string(2) "45" +} +array(0) { +} +array(0) { +} + +*** Iteration 10 *** + +*** Variation with first two Arguments *** +array(2) { + [0]=> + array(5) { + [0]=> + int(10) + [1]=> + int(20) + [2]=> + int(30) + [3]=> + int(40) + [4]=> + int(50) + } + [1]=> + array(0) { + } +} +array(3) { + [0]=> + array(3) { + [0]=> + string(3) "oNe" + [1]=> + string(3) "tWo" + [2]=> + int(4) + } + [1]=> + array(5) { + [0]=> + int(10) + [1]=> + int(20) + [2]=> + int(30) + [3]=> + int(40) + [4]=> + int(50) + } + [2]=> + array(0) { + } +} +array(2) { + [0]=> + array(5) { + [0]=> + int(10) + [1]=> + int(20) + [2]=> + int(30) + [3]=> + int(40) + [4]=> + int(50) + } + [1]=> + array(0) { + } +} + +*** Variation with first three Arguments *** +array(2) { + [0]=> + array(5) { + [0]=> + int(10) + [1]=> + int(20) + [2]=> + int(30) + [3]=> + int(40) + [4]=> + int(50) + } + [1]=> + array(0) { + } +} +array(0) { +} +array(0) { +} +array(3) { + [0]=> + array(3) { + [0]=> + string(3) "oNe" + [1]=> + string(3) "tWo" + [2]=> + int(4) + } + [1]=> + array(5) { + [0]=> + int(10) + [1]=> + int(20) + [2]=> + int(30) + [3]=> + int(40) + [4]=> + int(50) + } + [2]=> + array(0) { + } +} +array(0) { +} +array(0) { +} +array(2) { + [0]=> + array(5) { + [0]=> + int(10) + [1]=> + int(20) + [2]=> + int(30) + [3]=> + int(40) + [4]=> + int(50) + } + [1]=> + array(0) { + } +} +array(0) { +} +array(0) { +} + +*** Variation with first two arguments with preserve_key value TRUE *** +array(2) { + [1]=> + array(5) { + [0]=> + int(10) + [1]=> + int(20) + [2]=> + int(30) + [3]=> + int(40) + [4]=> + int(50) + } + [2]=> + array(0) { + } +} +array(0) { +} +array(0) { +} +array(3) { + [0]=> + array(3) { + [0]=> + string(3) "oNe" + [1]=> + string(3) "tWo" + [2]=> + int(4) + } + [1]=> + array(5) { + [0]=> + int(10) + [1]=> + int(20) + [2]=> + int(30) + [3]=> + int(40) + [4]=> + int(50) + } + [2]=> + array(0) { + } +} +array(0) { +} +array(0) { +} +array(2) { + [1]=> + array(5) { + [0]=> + int(10) + [1]=> + int(20) + [2]=> + int(30) + [3]=> + int(40) + [4]=> + int(50) + } + [2]=> + array(0) { + } +} +array(0) { +} +array(0) { +} + +*** Typical Variation of offset and length Arguments *** +array(1) { + [1]=> + string(3) "Two" +} +array(1) { + [0]=> + string(3) "Two" +} +array(1) { + [2]=> + string(5) "Three" +} +array(1) { + [0]=> + string(5) "Three" +} diff --git a/ext/standard/tests/array/array_splice_errors.phpt b/ext/standard/tests/array/array_splice_errors.phpt index 4f3223900d..0b92e4bc23 100644 --- a/ext/standard/tests/array/array_splice_errors.phpt +++ b/ext/standard/tests/array/array_splice_errors.phpt @@ -24,18 +24,18 @@ echo "Done\n"; *** Testing error conditions of array_splice() *** -Warning: Wrong parameter count for array_splice() in %s on line %d +Warning: array_splice() expects at least 2 parameters, 0 given in %s on line %d NULL -Warning: Wrong parameter count for array_splice() in %s on line %d +Warning: array_splice() expects at least 2 parameters, 1 given in %s on line %d NULL -Warning: Wrong parameter count for array_splice() in %s on line %d +Warning: array_splice() expects at least 2 parameters, 1 given in %s on line %d NULL -Warning: array_splice(): The first argument should be an array in %s on line %d +Warning: array_splice() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_splice(): The first argument should be an array in %s on line %d +Warning: array_splice() expects parameter 1 to be array, object given in %s on line %d NULL -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/array_splice_variation1.phpt b/ext/standard/tests/array/array_splice_variation1.phpt index 45cb6f607f..9ba94f6633 100644 --- a/ext/standard/tests/array/array_splice_variation1.phpt +++ b/ext/standard/tests/array/array_splice_variation1.phpt @@ -106,4 +106,4 @@ array(2) { [1]=> int(3) } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/array_splice_variation2.phpt b/ext/standard/tests/array/array_splice_variation2.phpt index a7409040c0..516339c7e8 100644 --- a/ext/standard/tests/array/array_splice_variation2.phpt +++ b/ext/standard/tests/array/array_splice_variation2.phpt @@ -14,7 +14,7 @@ echo "Done\n"; ?> --EXPECTF-- -Warning: Wrong parameter count for array_splice() in %s on line %d +Warning: array_splice() expects at most 4 parameters, 10 given in %s on line %d NULL array(3) { [0]=> @@ -24,4 +24,4 @@ array(3) { [2]=> int(2) } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/array_splice_variation3.phpt b/ext/standard/tests/array/array_splice_variation3.phpt index 821e06c980..33ec80e5a8 100644 --- a/ext/standard/tests/array/array_splice_variation3.phpt +++ b/ext/standard/tests/array/array_splice_variation3.phpt @@ -853,4 +853,4 @@ array(9) { [8]=> int(5) } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/array_splice_variation4.phpt b/ext/standard/tests/array/array_splice_variation4.phpt index 12a4acfbd6..d1cc501c6b 100644 --- a/ext/standard/tests/array/array_splice_variation4.phpt +++ b/ext/standard/tests/array/array_splice_variation4.phpt @@ -66,4 +66,4 @@ array(3) { [2]=> resource(%d) of type (stream) } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/array_unshift_basic1.phpt b/ext/standard/tests/array/array_unshift_basic1.phpt index 6bba48b9d6..97ea895547 100644 --- a/ext/standard/tests/array/array_unshift_basic1.phpt +++ b/ext/standard/tests/array/array_unshift_basic1.phpt @@ -60,4 +60,4 @@ array(5) { [4]=> int(2) } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/array_unshift_object.phpt b/ext/standard/tests/array/array_unshift_object.phpt index 793db83fe8..e6155373dd 100644 --- a/ext/standard/tests/array/array_unshift_object.phpt +++ b/ext/standard/tests/array/array_unshift_object.phpt @@ -28,14 +28,6 @@ class EmptyClass { } -// class with only one method and no variable -class FuncClass -{ - function fun() { - echo "No variables here"; - } -} - // abstract class abstract class AbstractClass { @@ -77,7 +69,6 @@ $array = array('f' => "first", "s" => 'second', 1, 2.222); $vars = array( new SimpleClass(), new EmptyClass(), - new FuncClass(), new ChildClass(), new FinalClass(), new StaticClass() @@ -89,15 +80,19 @@ foreach($vars as $var) { echo "-- Iteration $iterator --\n"; /* with default argument */ + // returns element count in the resulting array after arguments are pushed to + // beginning of the given array $temp_array = $array; - var_dump( array_unshift($temp_array, $var) ); // pushes $var to $temp_array, return sizeof($temp_array) + var_dump( array_unshift($temp_array, $var) ); // dump the resulting array var_dump($temp_array); - /* with more data values to be pushed */ + /* with optional arguments */ + // returns element count in the resulting array after arguments are pushed to + // beginning of the given array $temp_array = $array; - var_dump( array_unshift($temp_array, $var, "hello", 'world') ); // pushes 3 more data to $temp_array, return sizeof($temp_array) + var_dump( array_unshift($temp_array, $var, "hello", 'world') ); // dump the resulting array var_dump($temp_array); @@ -182,43 +177,10 @@ array(7) { int(5) array(5) { [0]=> - object(FuncClass)#%d (0) { - } - ["f"]=> - string(5) "first" - ["s"]=> - string(6) "second" - [1]=> - int(1) - [2]=> - float(2.222) -} -int(7) -array(7) { - [0]=> - object(FuncClass)#%d (0) { - } - [1]=> - string(5) "hello" - [2]=> - string(5) "world" - ["f"]=> - string(5) "first" - ["s"]=> - string(6) "second" - [3]=> - int(1) - [4]=> - float(2.222) -} --- Iteration 4 -- -int(5) -array(5) { - [0]=> object(ChildClass)#%d (2) { - ["var3:private"]=> + ["var3":"ChildClass":private]=> NULL - ["var2:protected"]=> + ["var2":protected]=> int(5) } ["f"]=> @@ -234,9 +196,9 @@ int(7) array(7) { [0]=> object(ChildClass)#%d (2) { - ["var3:private"]=> + ["var3":"ChildClass":private]=> NULL - ["var2:protected"]=> + ["var2":protected]=> int(5) } [1]=> @@ -252,12 +214,12 @@ array(7) { [4]=> float(2.222) } --- Iteration 5 -- +-- Iteration 4 -- int(5) array(5) { [0]=> object(FinalClass)#%d (1) { - ["var4:private"]=> + ["var4":"FinalClass":private]=> NULL } ["f"]=> @@ -273,7 +235,7 @@ int(7) array(7) { [0]=> object(FinalClass)#%d (1) { - ["var4:private"]=> + ["var4":"FinalClass":private]=> NULL } [1]=> @@ -289,7 +251,7 @@ array(7) { [4]=> float(2.222) } --- Iteration 6 -- +-- Iteration 5 -- int(5) array(5) { [0]=> diff --git a/ext/standard/tests/array/array_unshift_variation7.phpt b/ext/standard/tests/array/array_unshift_variation7.phpt index a255e47410..f5aa7456a7 100644 --- a/ext/standard/tests/array/array_unshift_variation7.phpt +++ b/ext/standard/tests/array/array_unshift_variation7.phpt @@ -217,4 +217,4 @@ array(7) { [4]=> float(2.222) } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/array_unshift_variation8.phpt b/ext/standard/tests/array/array_unshift_variation8.phpt index b9c25d3cac..a64349c866 100644 --- a/ext/standard/tests/array/array_unshift_variation8.phpt +++ b/ext/standard/tests/array/array_unshift_variation8.phpt @@ -211,4 +211,4 @@ array(7) { [4]=> float(2.222) } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/array_values_errors.phpt b/ext/standard/tests/array/array_values_errors.phpt index 0bef5a4569..c8133dde35 100644 --- a/ext/standard/tests/array/array_values_errors.phpt +++ b/ext/standard/tests/array/array_values_errors.phpt @@ -19,18 +19,18 @@ echo "Done\n"; --EXPECTF-- *** Testing error conditions *** -Warning: Wrong parameter count for array_values() in %s on line %d +Warning: array_values() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for array_values() in %s on line %d +Warning: array_values() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: array_values(): The argument should be an array in %s on line %d +Warning: array_values() expects parameter 1 to be array, string given in %s on line %d NULL -Warning: array_values(): The argument should be an array in %s on line %d +Warning: array_values() expects parameter 1 to be array, integer given in %s on line %d NULL -Warning: array_values(): The argument should be an array in %s on line %d +Warning: array_values() expects parameter 1 to be array, object given in %s on line %d NULL Done diff --git a/ext/standard/tests/array/array_walk.phpt b/ext/standard/tests/array/array_walk.phpt index a0e2098311..4a693ac435 100644 --- a/ext/standard/tests/array/array_walk.phpt +++ b/ext/standard/tests/array/array_walk.phpt @@ -34,9 +34,11 @@ echo "Done\n"; Warning: array_walk() expects at least 2 parameters, 0 given in %s on line %d NULL -Warning: array_walk(): The argument should be an array in %s on line %d -bool(false) -bool(true) +Warning: array_walk() expects parameter 2 to be valid callback, integer given in %s on line %d +NULL + +Warning: array_walk() expects parameter 2 to be valid callback, string given in %s on line %d +NULL int(1) int(0) string(4) "data" diff --git a/ext/standard/tests/array/array_walk_recursive1.phpt b/ext/standard/tests/array/array_walk_recursive1.phpt index 8505b70e98..e5dfea06ab 100644 --- a/ext/standard/tests/array/array_walk_recursive1.phpt +++ b/ext/standard/tests/array/array_walk_recursive1.phpt @@ -34,9 +34,11 @@ echo "Done\n"; Warning: array_walk_recursive() expects at least 2 parameters, 0 given in %s on line %d NULL -Warning: array_walk_recursive(): The argument should be an array in %s on line %d -bool(false) -bool(true) +Warning: array_walk_recursive() expects parameter 2 to be valid callback, integer given in %s on line %d +NULL + +Warning: array_walk_recursive() expects parameter 2 to be valid callback, string given in %s on line %d +NULL int(1) int(0) string(4) "data" diff --git a/ext/standard/tests/array/bug14580.phpt b/ext/standard/tests/array/bug14580.phpt index 8a80bddcb4..bf0121ad69 100644 --- a/ext/standard/tests/array/bug14580.phpt +++ b/ext/standard/tests/array/bug14580.phpt @@ -2,7 +2,7 @@ Bug #14580 (key() not binary safe) --FILE-- <?php - $arr = array ("foo\0bar" => "foo\0bar"); + $arr = array (b"foo\0bar" => b"foo\0bar"); $key = key($arr); echo strlen($key), ': '; echo urlencode($key), "\n"; diff --git a/ext/standard/tests/array/bug28739.phpt b/ext/standard/tests/array/bug28739.phpt index af888918c5..f7530973ea 100644 --- a/ext/standard/tests/array/bug28739.phpt +++ b/ext/standard/tests/array/bug28739.phpt @@ -55,4 +55,4 @@ Array [x] => 1 ) -)
\ No newline at end of file +) diff --git a/ext/standard/tests/array/bug29253.phpt b/ext/standard/tests/array/bug29253.phpt index 749b0aa9f6..378489f926 100755 --- a/ext/standard/tests/array/bug29253.phpt +++ b/ext/standard/tests/array/bug29253.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #29253 (array_diff with $GLOBALS argument fails) +Bug #29253 (array_diff with $GLOBALS argument fails) --FILE-- <?php $zz = $GLOBALS; @@ -7,8 +7,7 @@ $gg = 'afad'; var_dump(array_diff_assoc($GLOBALS, $zz)); var_dump($gg); ?> ---EXPECT-- +--EXPECTF-- array(0) { } string(4) "afad" - diff --git a/ext/standard/tests/array/bug33940.phpt b/ext/standard/tests/array/bug33940.phpt index 3dd45f39b9..06aa6380ab 100755 --- a/ext/standard/tests/array/bug33940.phpt +++ b/ext/standard/tests/array/bug33940.phpt @@ -2,7 +2,6 @@ Bug #33940 (array_map() fails to pass by reference when called recursively) --INI-- error_reporting=4095 -allow_call_time_pass_reference=1 --FILE-- <?php function ref_map(&$item) { @@ -24,7 +23,7 @@ $ret = array_map('ref_map', &$a); echo 'Array: '; print_r($a); echo 'Return: '; print_r($ret); ?> ---EXPECT-- +--EXPECTF-- Array: Array ( [0] => Array diff --git a/ext/standard/tests/array/bug34982.phpt b/ext/standard/tests/array/bug34982.phpt index 7a80d78864..7499667aaf 100755 --- a/ext/standard/tests/array/bug34982.phpt +++ b/ext/standard/tests/array/bug34982.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #34982 (array_walk_recursive() modifies elements outside function scope) +Bug #34982 (array_walk_recursive() modifies elements outside function scope) --FILE-- <?php $ar = array( diff --git a/ext/standard/tests/array/bug35014.phpt b/ext/standard/tests/array/bug35014.phpt index 99ef0f7eba..3a6cf216ab 100644 --- a/ext/standard/tests/array/bug35014.phpt +++ b/ext/standard/tests/array/bug35014.phpt @@ -23,8 +23,7 @@ foreach ($tests as $v) { } ?> --EXPECTF-- - -Warning: array_product(): The argument should be an array in %s on line %d +Warning: array_product() expects parameter 1 to be array, string given in %s on line %d NULL int(0) int(0) diff --git a/ext/standard/tests/array/bug35014_64bit.phpt b/ext/standard/tests/array/bug35014_64bit.phpt index ae9dc3160e..1c325b3fb0 100644 --- a/ext/standard/tests/array/bug35014_64bit.phpt +++ b/ext/standard/tests/array/bug35014_64bit.phpt @@ -23,8 +23,7 @@ foreach ($tests as $v) { } ?> --EXPECTF-- - -Warning: array_product(): The argument should be an array in %s on line %d +Warning: array_product() expects parameter 1 to be array, string given in %s on line %d NULL int(0) int(0) diff --git a/ext/standard/tests/array/bug35821.phpt b/ext/standard/tests/array/bug35821.phpt index 095323ebcd..05140d0d37 100644 --- a/ext/standard/tests/array/bug35821.phpt +++ b/ext/standard/tests/array/bug35821.phpt @@ -22,6 +22,7 @@ array_map(array('Element', 'CallBack'), $arr); echo "Done\n"; ?> --EXPECTF-- + Warning: array_map(): An error occurred while invoking the map callback in %s on line %d Fatal error: Uncaught exception 'Exception' in %s:%d diff --git a/ext/standard/tests/array/compact.phpt b/ext/standard/tests/array/compact.phpt index b70e558460..4b4bfbb732 100644 --- a/ext/standard/tests/array/compact.phpt +++ b/ext/standard/tests/array/compact.phpt @@ -1,60 +1,24 @@ --TEST-- -compact() tests +compact() +--INI-- +unicode.script_encoding=UTF-8 +unicode.output_encoding=UTF-8 --FILE-- <?php -$var1 = "test"; -$var2 = "one more"; -$var3 = "and the last one"; -$_ = "a"; +$çity = "San Francisco"; +$state = "CA"; +$event = "SIGGRAPH"; -var_dump(compact("var1", "var2", "var3")); -var_dump(compact("")); -var_dump(compact("-1")); -var_dump(compact(".")); -var_dump(compact("_")); -var_dump(compact("var3", "var4")); -var_dump(compact(array("var2", "var3"))); -var_dump(compact(array(array("var1"), array("var1")))); +$location_vars = array("c\u0327ity", "state"); -$a = array(2.0, -5); -var_dump(compact($a)); - -echo "Done\n"; +$result = compact("event", $location_vars); +var_dump($result); ?> ---EXPECTF-- -array(3) { - ["var1"]=> - string(4) "test" - ["var2"]=> - string(8) "one more" - ["var3"]=> - string(16) "and the last one" -} -array(0) { -} -array(0) { -} -array(0) { -} -array(1) { - ["_"]=> - string(1) "a" -} -array(1) { - ["var3"]=> - string(16) "and the last one" -} +--EXPECT-- array(2) { - ["var2"]=> - string(8) "one more" - ["var3"]=> - string(16) "and the last one" -} -array(1) { - ["var1"]=> - string(4) "test" -} -array(0) { + ["event"]=> + string(8) "SIGGRAPH" + ["state"]=> + string(2) "CA" } -Done diff --git a/ext/standard/tests/array/count_recursive.phpt b/ext/standard/tests/array/count_recursive.phpt index e6824ab0e5..846466cc05 100644 --- a/ext/standard/tests/array/count_recursive.phpt +++ b/ext/standard/tests/array/count_recursive.phpt @@ -1,52 +1,236 @@ --TEST-- -count +Test count() function +--SKIPIF-- +<?php if (!extension_loaded("spl")) die("skip no SPL extension"); ?> --FILE-- <?php -print "Testing NULL...\n"; +/* Prototype: int count ( mixed $var [, int $mode] ); + Discription: Count elements in an array, or properties in an object +*/ + +echo "*** Testing basic functionality of count() function ***\n"; +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"; +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"; +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 "-- 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 "-- 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 "-- 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"; + +echo "\n*** Testing possible variations of count() function on arrays ***"; +$count_array = array( + array(), + array( 1 => "string"), + array( "" => "string", 0 => "a", NULL => "b", -1.00 => "c", + array(array(array(NULL)))), + array( -2.44444 => 12, array(array(1, 2, array(array("0"))))), + array( "a" => 1, "b" => -2.344, "b" => "string", "c" => NULL, "d" => -2.344), + array( 4 => 1, 3 => -2.344, "3" => "string", "2" => NULL, + 1 => -2.344, array()), + array( TRUE => TRUE, FALSE => FALSE, "" => "", " " => " ", + NULL => NULL, "\x000" => "\x000", "\000" => "\000"), + array( NULL, 1.23 => "Hi", "string" => "hello", + array("" => "World", "-2.34" => "a", "0" => "b")) +); + +$i = 0; +foreach ($count_array as $count_value) { + echo "\n-- Iteration $i --\n"; + print "COUNT_NORMAL is ".count($count_value, COUNT_NORMAL)."\n"; + print "COUNT_RECURSIVE is ".count($count_value, COUNT_RECURSIVE)."\n"; + $i++; +} + + +/* Testing count() by passing constant with no second argument */ +print "\n-- Testing count() on constants with no second argument --\n"; +print "COUNT_NORMAL: should be 1, is ".count(100)."\n"; +print "COUNT_NORMAL: should be 1, is ".count(-23.45)."\n"; + +print "\n-- Testing count() on NULL and Unset variables --\n"; +print "COUNT_NORMAL: should be 0, is ".count(NULL)."\n"; +print "COUNT_NORMAL: should be 1, is ".count("")."\n"; +print "COUNT_NORMAL: should be 0, is ".@count($a)."\n"; + + +print "\n-- Testing count() on an empty sub-array --\n"; +$arr = array(1, array(3, 4, array())); +print "COUNT_NORMAL: should be 2, is ".count($arr, COUNT_NORMAL)."\n"; +print "COUNT_RECURSIVE: should be 5, is ".count($arr, COUNT_RECURSIVE)."\n"; + +echo "\n-- Testing count() on objects with Countable interface --\n"; +class count_class implements Countable { + private $var_private; + public $var_public; + protected $var_protected; + + public function count() { + return 3; + } +} + +$obj = new count_class(); +print "COUNT_NORMAL: should be 3, is ".count($obj)."\n"; + + +echo "\n-- Testing count() on resource type --\n"; +$resource1 = fopen( __FILE__, "r" ); // Creating file(stream type) resource +$resource2 = opendir( "." ); // Creating dir resource + +/* creating an array with resources as elements */ +$arr_resource = array("a" => $resource1, "b" => $resource2); +var_dump(count($arr_resource)); + +echo "\n-- Testing count() on arrays containing references --\n"; +$arr = array(1, array("a", "b", "c")); +$arr[2] = &$arr[1]; + +$mode_arr = array( COUNT_NORMAL, COUNT_RECURSIVE, 0, 1, -1, -1.45, 2, TRUE, + FALSE, NULL); +for( $i =0; $i < count( $mode_arr ); $i++) { + echo "For mode '$mode_arr[$i]' count is => "; + var_dump(count($arr, $mode_arr[$i])); +} + + +echo "\n-- Testing error conditions --"; +var_dump( count() ); // No. of args = 0 +var_dump( count(array(), COUNT_NORMAL, 100) ); // No. of args > expected + +/* Testing Invalid type arguments */ +var_dump( count("string", ABCD) ); +var_dump( count(100, "string") ); +var_dump( count(array(), "") ); + +echo "\nDone"; + +--CLEAN-- +/* closing the resource handles */ +fclose( $resource1 ); +closedir( $resource2 ); ?> ---EXPECT-- -Testing NULL... +--EXPECTF-- +*** Testing basic functionality of count() function *** +-- Testing NULL -- COUNT_NORMAL: should be 0, is 0 COUNT_RECURSIVE: should be 0, is 0 -Testing arrays... +-- Testing arrays -- COUNT_NORMAL: should be 2, is 2 COUNT_RECURSIVE: should be 8, is 8 -Testing hashes... +-- Testing hashes -- COUNT_NORMAL: should be 3, is 3 COUNT_RECURSIVE: should be 6, is 6 -Testing strings... +-- Testing strings -- COUNT_NORMAL: should be 1, is 1 COUNT_RECURSIVE: should be 1, is 1 -Testing various types with no second argument. +-- 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 ;) +-- Testing really cool arrays -- COUNT_NORMAL: should be 3, is 3 COUNT_RECURSIVE: should be 13, is 13 + +*** Testing possible variations of count() function on arrays *** +-- Iteration 0 -- +COUNT_NORMAL is 0 +COUNT_RECURSIVE is 0 + +-- Iteration 1 -- +COUNT_NORMAL is 1 +COUNT_RECURSIVE is 1 + +-- Iteration 2 -- +COUNT_NORMAL is 4 +COUNT_RECURSIVE is 7 + +-- Iteration 3 -- +COUNT_NORMAL is 2 +COUNT_RECURSIVE is 8 + +-- Iteration 4 -- +COUNT_NORMAL is 4 +COUNT_RECURSIVE is 4 + +-- Iteration 5 -- +COUNT_NORMAL is 5 +COUNT_RECURSIVE is 5 + +-- Iteration 6 -- +COUNT_NORMAL is 6 +COUNT_RECURSIVE is 6 + +-- Iteration 7 -- +COUNT_NORMAL is 4 +COUNT_RECURSIVE is 7 + +-- Testing count() on constants with no second argument -- +COUNT_NORMAL: should be 1, is 1 +COUNT_NORMAL: should be 1, is 1 + +-- Testing count() on NULL and Unset variables -- +COUNT_NORMAL: should be 0, is 0 +COUNT_NORMAL: should be 1, is 1 +COUNT_NORMAL: should be 0, is 0 + +-- Testing count() on an empty sub-array -- +COUNT_NORMAL: should be 2, is 2 +COUNT_RECURSIVE: should be 5, is 5 + +-- Testing count() on objects with Countable interface -- +COUNT_NORMAL: should be 3, is 3 + +-- Testing count() on resource type -- +int(2) + +-- Testing count() on arrays containing references -- +For mode '0' count is => int(3) +For mode '1' count is => int(9) +For mode '0' count is => int(3) +For mode '1' count is => int(9) +For mode '-1' count is => int(3) +For mode '-1.45' count is => int(3) +For mode '2' count is => int(3) +For mode '1' count is => int(9) +For mode '' count is => int(3) +For mode '' count is => int(3) + +-- Testing error conditions -- +Warning: count() expects at least 1 parameter, 0 given in %s on line %d +NULL + +Warning: count() expects at most 2 parameters, 3 given in %s on line %d +NULL + +Notice: Use of undefined constant ABCD - assumed 'ABCD' in %s on line %d + +Warning: count() expects parameter 2 to be long, %s given in %s on line %d +NULL + +Warning: count() expects parameter 2 to be long, %s given in %s on line %d +NULL + +Warning: count() expects parameter 2 to be long, %s given in %s on line %d +NULL + +Done diff --git a/ext/standard/tests/array/end.phpt b/ext/standard/tests/array/end.phpt index da9422395e..b0475de172 100644 --- a/ext/standard/tests/array/end.phpt +++ b/ext/standard/tests/array/end.phpt @@ -223,16 +223,16 @@ resource(%d) of type (stream) *** Testing error conditions *** -Warning: Wrong parameter count for end() in %s on line %d +Warning: end() expects exactly 1 parameter, 0 given in %s on line %d NULL -Warning: Wrong parameter count for end() in %s on line %d +Warning: end() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: end(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: end() expects parameter 1 to be array, integer given in %s on line %d +NULL -Warning: end(): Passed variable is not an array or object in %s on line %d -bool(false) +Warning: end() expects parameter 1 to be array, string given in %s on line %d +NULL bool(false) Done diff --git a/ext/standard/tests/array/extract_variation6.phpt b/ext/standard/tests/array/extract_variation6.phpt index e1e93e4c7d..7eac67e16e 100644 --- a/ext/standard/tests/array/extract_variation6.phpt +++ b/ext/standard/tests/array/extract_variation6.phpt @@ -16,7 +16,6 @@ var_dump($a); echo "Done\n"; ?> - --EXPECTF-- int(1) string(3) "aaa" diff --git a/ext/standard/tests/array/in_array_errors.phpt b/ext/standard/tests/array/in_array_errors.phpt index db0f98f2a2..13a6cdb4cc 100644 --- a/ext/standard/tests/array/in_array_errors.phpt +++ b/ext/standard/tests/array/in_array_errors.phpt @@ -28,18 +28,18 @@ echo "Done\n"; --EXPECTF-- *** Testing error conditions of in_array() *** -Warning: Wrong parameter count for in_array() in %s on line %d +Warning: in_array() expects at least 2 parameters, 0 given in %s on line %d NULL -Warning: Wrong parameter count for in_array() in %s on line %d +Warning: in_array() expects at most 3 parameters, 4 given in %s on line %d NULL -Warning: Wrong parameter count for in_array() in %s on line %d +Warning: in_array() expects at least 2 parameters, 1 given in %s on line %d NULL -Warning: in_array(): Wrong datatype for second argument in %s on line %d -bool(false) +Warning: in_array() expects parameter 2 to be array, string given in %s on line %d +NULL -Warning: in_array(): Wrong datatype for second argument in %s on line %d -bool(false) +Warning: in_array() expects parameter 2 to be array, integer given in %s on line %d +NULL Done diff --git a/ext/standard/tests/array/in_array_variation3.phpt b/ext/standard/tests/array/in_array_variation3.phpt index 47831e3bb7..c8b6445cd1 100644 --- a/ext/standard/tests/array/in_array_variation3.phpt +++ b/ext/standard/tests/array/in_array_variation3.phpt @@ -52,10 +52,10 @@ bool(true) *** Testing objects with in_array() *** -Warning: in_array(): Wrong datatype for second argument in %s on line %d -bool(false) +Warning: in_array() expects parameter 2 to be array, object given in %s on line %d +NULL -Warning: in_array(): Wrong datatype for second argument in %s on line %d -bool(false) +Warning: in_array() expects parameter 2 to be array, object given in %s on line %d +NULL bool(true) Done diff --git a/ext/standard/tests/array/locale_sort.phpt b/ext/standard/tests/array/locale_sort.phpt index 4b7068fa85..ed2b54959f 100644 --- a/ext/standard/tests/array/locale_sort.phpt +++ b/ext/standard/tests/array/locale_sort.phpt @@ -6,6 +6,9 @@ if (false == setlocale(LC_CTYPE, "fr_FR", "fr_FR.ISO8859-1")) { die("skip setlocale() failed\n"); } ?> +--INI-- +unicode.script_encoding=ISO8859-1 +unicode.output_encoding=ISO8859-1 --FILE-- <?php setlocale(LC_ALL, 'fr_FR', 'fr_FR.ISO8859-1'); diff --git a/ext/standard/tests/array/max_basic.phpt b/ext/standard/tests/array/max_basic.phpt index 62eb2271ac..f304212293 100644 --- a/ext/standard/tests/array/max_basic.phpt +++ b/ext/standard/tests/array/max_basic.phpt @@ -39,4 +39,4 @@ array(2) { int(3) } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/max_error.phpt b/ext/standard/tests/array/max_error.phpt index cbc36f4946..7e8b09bfcb 100644 --- a/ext/standard/tests/array/max_error.phpt +++ b/ext/standard/tests/array/max_error.phpt @@ -20,13 +20,13 @@ var_dump(max(new stdclass)); *** Testing Error Conditions *** -Warning: max(): At least one %s on line %d +Warning: max(): At%seast one %s on line %d NULL Warning: Wrong parameter count for max() in %s on line %d NULL -Warning: max(): Array must contain at least one element in %s on line %d +Warning: max(): Array must contain at%seast one element in %s on line %d bool(false) Warning: Wrong parameter count for max() in %s on line %d diff --git a/ext/standard/tests/array/max_variation1.phpt b/ext/standard/tests/array/max_variation1.phpt index 68609dbef4..03b72e1d42 100644 --- a/ext/standard/tests/array/max_variation1.phpt +++ b/ext/standard/tests/array/max_variation1.phpt @@ -34,4 +34,4 @@ int(-2147483647) *** Testing large number of arguments *** int(21) -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/max_variation2.phpt b/ext/standard/tests/array/max_variation2.phpt index 15132d0a9e..213edb2619 100644 --- a/ext/standard/tests/array/max_variation2.phpt +++ b/ext/standard/tests/array/max_variation2.phpt @@ -52,4 +52,4 @@ int(-2147483646) int(-2147483647) int(-2147483647) -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/min_basic.phpt b/ext/standard/tests/array/min_basic.phpt index 9fd4af616f..34f853fedb 100644 --- a/ext/standard/tests/array/min_basic.phpt +++ b/ext/standard/tests/array/min_basic.phpt @@ -34,4 +34,4 @@ bool(false) int(0) int(0) -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/min_error.phpt b/ext/standard/tests/array/min_error.phpt index f39516c686..4bd46552c9 100644 --- a/ext/standard/tests/array/min_error.phpt +++ b/ext/standard/tests/array/min_error.phpt @@ -20,13 +20,13 @@ var_dump(min(new stdclass)); *** Testing Error Conditions *** -Warning: min(): At least one %s on line %d +Warning: min(): At%seast one %s on line %d NULL Warning: Wrong parameter count for min() in %s on line %d NULL -Warning: min(): Array must contain at least one element in %s on line %d +Warning: min(): Array must contain at%seast one element in %s on line %d bool(false) Warning: Wrong parameter count for min() in %s on line %d diff --git a/ext/standard/tests/array/min_variation1.phpt b/ext/standard/tests/array/min_variation1.phpt index fe3361d498..6ae5495525 100644 --- a/ext/standard/tests/array/min_variation1.phpt +++ b/ext/standard/tests/array/min_variation1.phpt @@ -34,4 +34,4 @@ float(-2147483649) *** Testing large number of arguments *** int(0) -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/min_variation2.phpt b/ext/standard/tests/array/min_variation2.phpt index d3b3cb572b..0a665ed6e5 100644 --- a/ext/standard/tests/array/min_variation2.phpt +++ b/ext/standard/tests/array/min_variation2.phpt @@ -47,4 +47,4 @@ int(-2147483647) float(-2147483648) float(-2147483649) -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/shuffle_basic1.phpt b/ext/standard/tests/array/shuffle_basic1.phpt index 4bff667a37..d601f5433c 100644 --- a/ext/standard/tests/array/shuffle_basic1.phpt +++ b/ext/standard/tests/array/shuffle_basic1.phpt @@ -147,3 +147,4 @@ array(9) { string(%d) "%s" } Done + diff --git a/ext/standard/tests/array/shuffle_basic2.phpt b/ext/standard/tests/array/shuffle_basic2.phpt index 01fc1d4c7a..cb127d23ef 100644 --- a/ext/standard/tests/array/shuffle_basic2.phpt +++ b/ext/standard/tests/array/shuffle_basic2.phpt @@ -86,3 +86,4 @@ array(9) { int(%d) } Done + diff --git a/ext/standard/tests/array/shuffle_error.phpt b/ext/standard/tests/array/shuffle_error.phpt index 4df3467a0e..833b390363 100644 --- a/ext/standard/tests/array/shuffle_error.phpt +++ b/ext/standard/tests/array/shuffle_error.phpt @@ -51,3 +51,4 @@ array(2) { int(2) } Done + diff --git a/ext/standard/tests/array/shuffle_variation1.phpt b/ext/standard/tests/array/shuffle_variation1.phpt index 597c1e92ec..dff21828da 100644 --- a/ext/standard/tests/array/shuffle_variation1.phpt +++ b/ext/standard/tests/array/shuffle_variation1.phpt @@ -1,5 +1,5 @@ --TEST-- -Test shuffle() function : usage variations - unexpected values for 'array_arg' argument +Test shuffle() function : usage variations - unexpected values for 'array_arg' argument --FILE-- <?php /* Prototype : bool shuffle(array $array_arg) @@ -14,6 +14,7 @@ Test shuffle() function : usage variations - unexpected values for 'array_arg' a echo "*** Testing shuffle() : with unexpected values for 'array_arg' argument ***\n"; + //get an unset variable $unset_var = 10; unset ($unset_var); @@ -210,3 +211,4 @@ bool(false) Warning: shuffle() expects parameter 1 to be array, resource given in %s on line %d bool(false) Done + diff --git a/ext/standard/tests/array/shuffle_variation2.phpt b/ext/standard/tests/array/shuffle_variation2.phpt index f9fdccbd78..a0cb6b632e 100644 --- a/ext/standard/tests/array/shuffle_variation2.phpt +++ b/ext/standard/tests/array/shuffle_variation2.phpt @@ -209,3 +209,4 @@ array(3) { int(%d) } Done + diff --git a/ext/standard/tests/array/shuffle_variation3.phpt b/ext/standard/tests/array/shuffle_variation3.phpt index 3e20383aff..ad8e6685bc 100644 --- a/ext/standard/tests/array/shuffle_variation3.phpt +++ b/ext/standard/tests/array/shuffle_variation3.phpt @@ -1,5 +1,5 @@ --TEST-- -Test shuffle() function : usage variation - arrays with diff. types of values +Test shuffle() function : usage variation - arrays with diff types of values --FILE-- <?php /* Prototype : bool shuffle(array $array_arg) @@ -230,3 +230,4 @@ array(3) { int(-%d) } Done + diff --git a/ext/standard/tests/array/shuffle_variation4.phpt b/ext/standard/tests/array/shuffle_variation4.phpt index 34c1a06449..516e7c9503 100644 --- a/ext/standard/tests/array/shuffle_variation4.phpt +++ b/ext/standard/tests/array/shuffle_variation4.phpt @@ -1,5 +1,5 @@ --TEST-- -Test shuffle() function : usage variation - associative arrays with diff. types of values +Test shuffle() function : usage variation - associative arrays with diff types of values --FILE-- <?php /* Prototype : bool shuffle(array $array_arg) @@ -228,3 +228,4 @@ array(3) { NULL } Done + diff --git a/ext/standard/tests/array/shuffle_variation5.phpt b/ext/standard/tests/array/shuffle_variation5.phpt index 3428e5678a..ca2c1ac90e 100644 --- a/ext/standard/tests/array/shuffle_variation5.phpt +++ b/ext/standard/tests/array/shuffle_variation5.phpt @@ -117,3 +117,4 @@ array\(6\) { string\(8\) "[heredoc 1-5]*" } Done + diff --git a/ext/standard/tests/general_functions/bug40398.phpt b/ext/standard/tests/general_functions/bug40398.phpt index ab3cc2a2be..d64a9fdf20 100755 --- a/ext/standard/tests/general_functions/bug40398.phpt +++ b/ext/standard/tests/general_functions/bug40398.phpt @@ -78,13 +78,11 @@ new Derived_6('6'); Base::__construct(1) Base::__construct(2) -Warning: call_user_func_array(): First argument is expected to be a valid callback, 'Base::__construct' was given in %sbug40398.php on line %d +Warning: call_user_func_array() expects parameter 1 to be valid callback, string given in %sbug40398.php on line %d -Warning: call_user_func_array(): First argument is expected to be a valid callback, 'parent::__construct' was given in %sbug40398.php on line %d +Warning: call_user_func_array() expects parameter 1 to be valid callback, string given in %sbug40398.php on line %d -Strict Standards: Non-static method Base::__construct() cannot be called statically, assuming $this from compatible context Derived_5 in %sbug40398.php on line %d -Base::__construct(5) +Warning: call_user_func_array() expects parameter 1 to be valid callback, array given in %sbug40398.php on line %d -Strict Standards: Non-static method Base::__construct() cannot be called statically, assuming $this from compatible context Derived_6 in %sbug40398.php on line %d -Base::__construct(6) +Warning: call_user_func_array() expects parameter 1 to be valid callback, array given in %sbug40398.php on line %d ===DONE=== diff --git a/ext/standard/tests/general_functions/debug_zval_dump_b.phpt b/ext/standard/tests/general_functions/debug_zval_dump_b.phpt Binary files differindex 4cc403c4ee..cf7b359160 100644 --- a/ext/standard/tests/general_functions/debug_zval_dump_b.phpt +++ b/ext/standard/tests/general_functions/debug_zval_dump_b.phpt diff --git a/ext/standard/tests/general_functions/debug_zval_dump_b_64bit.phpt b/ext/standard/tests/general_functions/debug_zval_dump_b_64bit.phpt Binary files differindex 71211dd16c..700271e4c9 100644 --- a/ext/standard/tests/general_functions/debug_zval_dump_b_64bit.phpt +++ b/ext/standard/tests/general_functions/debug_zval_dump_b_64bit.phpt diff --git a/ext/standard/tests/general_functions/debug_zval_dump_o.phpt b/ext/standard/tests/general_functions/debug_zval_dump_o.phpt index 03cf752598..dd4b5142a1 100644 --- a/ext/standard/tests/general_functions/debug_zval_dump_o.phpt +++ b/ext/standard/tests/general_functions/debug_zval_dump_o.phpt @@ -119,9 +119,9 @@ echo "Done\n"; object(object_class)#%d (6) refcount(5){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -136,9 +136,9 @@ object(object_class)#%d (6) refcount(5){ object(object_class)#%d (6) refcount(5){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -160,17 +160,17 @@ object(no_member_class)#%d (0) refcount(4){ object(contains_object_class)#%d (9) refcount(4){ ["p"]=> long(30) refcount(2) - ["p1:protected"]=> + ["p1":protected]=> long(40) refcount(2) - ["p2:private"]=> + ["p2":"contains_object_class":private]=> long(50) refcount(2) ["class_object1"]=> object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -185,9 +185,9 @@ object(contains_object_class)#%d (9) refcount(4){ object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -206,9 +206,9 @@ object(contains_object_class)#%d (9) refcount(4){ object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -223,9 +223,9 @@ object(contains_object_class)#%d (9) refcount(4){ object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -240,13 +240,13 @@ object(contains_object_class)#%d (9) refcount(4){ *RECURSION* } } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -261,9 +261,9 @@ object(contains_object_class)#%d (9) refcount(4){ object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -278,13 +278,13 @@ object(contains_object_class)#%d (9) refcount(4){ *RECURSION* } } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -299,9 +299,9 @@ object(contains_object_class)#%d (9) refcount(4){ object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -323,17 +323,17 @@ object(contains_object_class)#%d (9) refcount(4){ object(contains_object_class)#%d (9) refcount(1){ ["p"]=> long(30) refcount(2) - ["p1:protected"]=> + ["p1":protected]=> long(40) refcount(2) - ["p2:private"]=> + ["p2":"contains_object_class":private]=> long(50) refcount(2) ["class_object1"]=> object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -348,9 +348,9 @@ object(contains_object_class)#%d (9) refcount(4){ object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -369,9 +369,9 @@ object(contains_object_class)#%d (9) refcount(4){ object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -386,9 +386,9 @@ object(contains_object_class)#%d (9) refcount(4){ object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -403,13 +403,13 @@ object(contains_object_class)#%d (9) refcount(4){ *RECURSION* } } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -424,9 +424,9 @@ object(contains_object_class)#%d (9) refcount(4){ object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -441,13 +441,13 @@ object(contains_object_class)#%d (9) refcount(4){ *RECURSION* } } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -462,9 +462,9 @@ object(contains_object_class)#%d (9) refcount(4){ object(object_class)#%d (6) refcount(7){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -490,9 +490,9 @@ object(contains_object_class)#%d (9) refcount(4){ object(object_class)#%d (6) refcount(9){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -507,9 +507,9 @@ object(object_class)#%d (6) refcount(9){ object(object_class)#%d (6) refcount(9){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -528,9 +528,9 @@ object(object_class)#%d (6) refcount(9){ object(object_class)#%d (6) refcount(9){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -545,9 +545,9 @@ object(object_class)#%d (6) refcount(9){ object(object_class)#%d (6) refcount(9){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -571,9 +571,9 @@ NULL refcount(1) object(object_class)#%d (6) refcount(9){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -588,9 +588,9 @@ object(object_class)#%d (6) refcount(9){ object(object_class)#%d (6) refcount(9){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -609,9 +609,9 @@ object(object_class)#%d (6) refcount(9){ object(object_class)#%d (6) refcount(9){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -626,9 +626,9 @@ object(object_class)#%d (6) refcount(9){ object(object_class)#%d (6) refcount(9){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(5) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(5) ["value4"]=> long(30) refcount(7) @@ -658,9 +658,9 @@ long(500) refcount(1) object(object_class)#%d (7) refcount(1){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(7) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(7) ["value4"]=> long(30) refcount(8) @@ -675,9 +675,9 @@ object(object_class)#%d (7) refcount(1){ object(object_class)#%d (7) refcount(1){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(7) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(7) ["value4"]=> long(30) refcount(8) @@ -694,9 +694,9 @@ object(object_class)#%d (7) refcount(1){ &object(object_class)#%d (7) refcount(2){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(7) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(7) ["value4"]=> long(30) refcount(8) @@ -711,9 +711,9 @@ object(object_class)#%d (7) refcount(1){ object(object_class)#%d (7) refcount(1){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(7) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(7) ["value4"]=> long(30) refcount(8) @@ -737,9 +737,9 @@ object(object_class)#%d (7) refcount(1){ &object(object_class)#%d (7) refcount(2){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(7) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(7) ["value4"]=> long(30) refcount(8) @@ -754,9 +754,9 @@ object(object_class)#%d (7) refcount(1){ object(object_class)#%d (7) refcount(1){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(7) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(7) ["value4"]=> long(30) refcount(8) @@ -773,9 +773,9 @@ object(object_class)#%d (7) refcount(1){ &object(object_class)#%d (7) refcount(2){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(7) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(7) ["value4"]=> long(30) refcount(8) @@ -796,9 +796,9 @@ object(object_class)#%d (7) refcount(1){ &object(object_class)#%d (7) refcount(2){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(7) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(7) ["value4"]=> long(30) refcount(8) @@ -815,9 +815,9 @@ object(object_class)#%d (7) refcount(1){ &object(object_class)#%d (7) refcount(2){ ["value1"]=> long(5) refcount(1) - ["value2:private"]=> + ["value2":"object_class":private]=> long(10) refcount(7) - ["value3:protected"]=> + ["value3":protected]=> long(20) refcount(7) ["value4"]=> long(30) refcount(8) diff --git a/ext/standard/tests/general_functions/print_r.phpt b/ext/standard/tests/general_functions/print_r.phpt index 86bc6e8943..8d506dc9ff 100644 --- a/ext/standard/tests/general_functions/print_r.phpt +++ b/ext/standard/tests/general_functions/print_r.phpt @@ -966,8 +966,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -977,8 +977,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -988,8 +988,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1016,8 +1016,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1027,19 +1027,19 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 ) - [class_object3:private] => object_class Object + [class_object3:contains_object_class:private] => object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1049,8 +1049,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1071,8 +1071,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1082,19 +1082,19 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 ) - [class_object3:private] => object_class Object + [class_object3:contains_object_class:private] => object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1104,8 +1104,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1126,8 +1126,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1137,19 +1137,19 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 ) - [class_object3:private] => object_class Object + [class_object3:contains_object_class:private] => object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1159,8 +1159,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1182,8 +1182,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1193,19 +1193,19 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 ) - [class_object3:private] => object_class Object + [class_object3:contains_object_class:private] => object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1215,8 +1215,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1237,8 +1237,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1248,19 +1248,19 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 ) - [class_object3:private] => object_class Object + [class_object3:contains_object_class:private] => object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1270,8 +1270,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1292,8 +1292,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1303,19 +1303,19 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 ) - [class_object3:private] => object_class Object + [class_object3:contains_object_class:private] => object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1325,8 +1325,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1345,8 +1345,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1356,8 +1356,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1367,8 +1367,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1379,8 +1379,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1390,8 +1390,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1401,8 +1401,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1426,8 +1426,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1437,8 +1437,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1448,8 +1448,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1464,8 +1464,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1473,8 +1473,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 diff --git a/ext/standard/tests/general_functions/print_r_64bit.phpt b/ext/standard/tests/general_functions/print_r_64bit.phpt index ba05924879..11aaf35c5d 100644 --- a/ext/standard/tests/general_functions/print_r_64bit.phpt +++ b/ext/standard/tests/general_functions/print_r_64bit.phpt @@ -967,8 +967,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -978,8 +978,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -989,8 +989,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1017,8 +1017,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1028,19 +1028,19 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 ) - [class_object3:private] => object_class Object + [class_object3:contains_object_class:private] => object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1050,8 +1050,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1072,8 +1072,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1083,19 +1083,19 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 ) - [class_object3:private] => object_class Object + [class_object3:contains_object_class:private] => object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1105,8 +1105,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1127,8 +1127,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1138,19 +1138,19 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 ) - [class_object3:private] => object_class Object + [class_object3:contains_object_class:private] => object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1160,8 +1160,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1183,8 +1183,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1194,19 +1194,19 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 ) - [class_object3:private] => object_class Object + [class_object3:contains_object_class:private] => object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1216,8 +1216,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1238,8 +1238,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1249,19 +1249,19 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 ) - [class_object3:private] => object_class Object + [class_object3:contains_object_class:private] => object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1271,8 +1271,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1293,8 +1293,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1304,19 +1304,19 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 ) - [class_object3:private] => object_class Object + [class_object3:contains_object_class:private] => object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1326,8 +1326,8 @@ contains_object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1346,8 +1346,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1357,8 +1357,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1368,8 +1368,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1380,8 +1380,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1391,8 +1391,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1402,8 +1402,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1427,8 +1427,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1438,8 +1438,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1449,8 +1449,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1465,8 +1465,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 @@ -1474,8 +1474,8 @@ object_class Object ( [value] => 50 [public_var1] => 10 - [private_var1:private] => 20 - [private_var2:private] => 21 + [private_var1:object_class:private] => 20 + [private_var2:object_class:private] => 21 [protected_var1:protected] => string_1 [protected_var2:protected] => string_2 [public_var2] => 11 diff --git a/ext/standard/tests/general_functions/var_dump.phpt b/ext/standard/tests/general_functions/var_dump.phpt index 6f5e46b295..36defa36b6 100644 --- a/ext/standard/tests/general_functions/var_dump.phpt +++ b/ext/standard/tests/general_functions/var_dump.phpt @@ -579,13 +579,13 @@ object(object_class)#%d (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -603,13 +603,13 @@ object(contains_object_class)#%d (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -620,47 +620,47 @@ object(contains_object_class)#%d (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -678,13 +678,13 @@ object(contains_object_class)#%d (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -695,47 +695,47 @@ object(contains_object_class)#%d (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -757,13 +757,13 @@ object(contains_object_class)#%d (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -774,47 +774,47 @@ object(contains_object_class)#%d (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -832,13 +832,13 @@ object(contains_object_class)#%d (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -849,47 +849,47 @@ object(contains_object_class)#%d (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -907,13 +907,13 @@ object(object_class)#%d (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -924,13 +924,13 @@ object(object_class)#%d (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -944,13 +944,13 @@ object(object_class)#%d (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -964,13 +964,13 @@ object(object_class)#%d (8) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -980,13 +980,13 @@ object(object_class)#%d (8) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -996,13 +996,13 @@ object(object_class)#%d (8) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1012,13 +1012,13 @@ object(object_class)#%d (8) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1426,13 +1426,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1450,13 +1450,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1467,47 +1467,47 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1525,13 +1525,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1542,47 +1542,47 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1604,13 +1604,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1621,47 +1621,47 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1679,13 +1679,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1696,47 +1696,47 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#%d (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1754,13 +1754,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1771,13 +1771,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1791,13 +1791,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) diff --git a/ext/standard/tests/general_functions/var_dump_64bit.phpt b/ext/standard/tests/general_functions/var_dump_64bit.phpt index 0a72d3129a..8c08a738ab 100644 --- a/ext/standard/tests/general_functions/var_dump_64bit.phpt +++ b/ext/standard/tests/general_functions/var_dump_64bit.phpt @@ -579,13 +579,13 @@ object(object_class)#6 (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -603,13 +603,13 @@ object(contains_object_class)#8 (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -620,47 +620,47 @@ object(contains_object_class)#8 (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#9 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#10 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -678,13 +678,13 @@ object(contains_object_class)#8 (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -695,47 +695,47 @@ object(contains_object_class)#8 (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#9 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#10 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -757,13 +757,13 @@ object(contains_object_class)#1 (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -774,47 +774,47 @@ object(contains_object_class)#1 (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#2 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#3 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -832,13 +832,13 @@ object(contains_object_class)#1 (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -849,47 +849,47 @@ object(contains_object_class)#1 (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#2 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#3 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -907,13 +907,13 @@ object(object_class)#2 (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -924,13 +924,13 @@ object(object_class)#3 (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -944,13 +944,13 @@ object(object_class)#5 (7) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -964,13 +964,13 @@ object(object_class)#13 (8) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -980,13 +980,13 @@ object(object_class)#13 (8) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -996,13 +996,13 @@ object(object_class)#13 (8) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1012,13 +1012,13 @@ object(object_class)#13 (8) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1426,13 +1426,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1450,13 +1450,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1467,47 +1467,47 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#9 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#10 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1525,13 +1525,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1542,47 +1542,47 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#9 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#10 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1604,13 +1604,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1621,47 +1621,47 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#2 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#3 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1679,13 +1679,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1696,47 +1696,47 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object3:private"]=> + ["class_object3":"contains_object_class":private]=> object(object_class)#2 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) } - ["class_object4:protected"]=> + ["class_object4":protected]=> object(object_class)#3 (7) { ["value"]=> int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1754,13 +1754,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1771,13 +1771,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) @@ -1791,13 +1791,13 @@ array(9) { int(50) ["public_var1"]=> int(10) - ["private_var1:private"]=> + ["private_var1":"object_class":private]=> int(20) - ["private_var2:private"]=> + ["private_var2":"object_class":private]=> int(21) - ["protected_var1:protected"]=> + ["protected_var1":protected]=> string(8) "string_1" - ["protected_var2:protected"]=> + ["protected_var2":protected]=> string(8) "string_2" ["public_var2"]=> int(11) |