mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
- killed off UEXPECT
This commit is contained in:
parent
6d8760677d
commit
10c04aca38
236 changed files with 420 additions and 2162 deletions
|
@ -9,11 +9,6 @@ a[]=1
|
|||
var_dump($_POST['a']);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(1) "1"
|
||||
}
|
||||
--UEXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
unicode(1) "1"
|
||||
|
|
|
@ -9,13 +9,6 @@ a[]=1&a[]=1
|
|||
var_dump($_POST['a']);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
[0]=>
|
||||
string(1) "1"
|
||||
[1]=>
|
||||
string(1) "1"
|
||||
}
|
||||
--UEXPECT--
|
||||
array(2) {
|
||||
[0]=>
|
||||
unicode(1) "1"
|
||||
|
|
|
@ -9,11 +9,6 @@ a[]=1&a[0]=5
|
|||
var_dump($_POST['a']);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(1) "5"
|
||||
}
|
||||
--UEXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
unicode(1) "5"
|
||||
|
|
|
@ -9,13 +9,6 @@ a[a]=1&a[b]=3
|
|||
var_dump($_POST['a']);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
["a"]=>
|
||||
string(1) "1"
|
||||
["b"]=>
|
||||
string(1) "3"
|
||||
}
|
||||
--UEXPECT--
|
||||
array(2) {
|
||||
[u"a"]=>
|
||||
unicode(1) "1"
|
||||
|
|
|
@ -9,15 +9,6 @@ a[]=1&a[a]=1&a[b]=3
|
|||
var_dump($_POST['a']);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
string(1) "1"
|
||||
["a"]=>
|
||||
string(1) "1"
|
||||
["b"]=>
|
||||
string(1) "3"
|
||||
}
|
||||
--UEXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
unicode(1) "1"
|
||||
|
|
|
@ -10,31 +10,6 @@ var_dump($_POST['a']);
|
|||
var_dump($_POST['b']);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(1) "1"
|
||||
}
|
||||
[1]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(1) "3"
|
||||
}
|
||||
}
|
||||
array(1) {
|
||||
["a"]=>
|
||||
array(1) {
|
||||
["b"]=>
|
||||
array(2) {
|
||||
["c"]=>
|
||||
string(1) "1"
|
||||
["d"]=>
|
||||
string(1) "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
--UEXPECT--
|
||||
array(2) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
|
|
|
@ -9,15 +9,6 @@ a[]=1&a[]]=3&a[[]=4
|
|||
var_dump($_POST['a']);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
string(1) "1"
|
||||
[1]=>
|
||||
string(1) "3"
|
||||
["["]=>
|
||||
string(1) "4"
|
||||
}
|
||||
--UEXPECT--
|
||||
array(3) {
|
||||
[0]=>
|
||||
unicode(1) "1"
|
||||
|
|
|
@ -9,13 +9,6 @@ a[a[]]=1&a[b[]]=3
|
|||
var_dump($_POST['a']);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(2) {
|
||||
["a["]=>
|
||||
string(1) "1"
|
||||
["b["]=>
|
||||
string(1) "3"
|
||||
}
|
||||
--UEXPECT--
|
||||
array(2) {
|
||||
[u"a["]=>
|
||||
unicode(1) "1"
|
||||
|
|
|
@ -1,35 +1,12 @@
|
|||
--TEST--
|
||||
Cookies test#1
|
||||
--COOKIE--
|
||||
cookie1=val1 ; cookie2=val2%20; cookie3=val 3.; cookie 4= value 4 %3B; cookie1=bogus; %20cookie1=ignore;+cookie1=ignore;cookie1;cookie 5=%20 value; cookie%206=þæö;cookie+7=;$cookie.8;cookie-9=1;;;- & % $cookie 10=10
|
||||
cookie1=val1 ; cookie2=val2%20; cookie3=val 3.; cookie 4= value 4 %3B; cookie1=bogus; %20cookie1=ignore;+cookie1=ignore;cookie1;cookie 5=%20 value; cookie%206=þæö;cookie+7=;$cookie.8;cookie-9=1;;;- & % $cookie 10=10
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump($_COOKIE);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(10) {
|
||||
["cookie1"]=>
|
||||
string(6) "val1 "
|
||||
["cookie2"]=>
|
||||
string(5) "val2 "
|
||||
["cookie3"]=>
|
||||
string(6) "val 3."
|
||||
["cookie_4"]=>
|
||||
string(10) " value 4 ;"
|
||||
["cookie__5"]=>
|
||||
string(7) " value"
|
||||
["cookie_6"]=>
|
||||
string(3) "þæö"
|
||||
["cookie_7"]=>
|
||||
string(0) ""
|
||||
["$cookie_8"]=>
|
||||
string(0) ""
|
||||
["cookie-9"]=>
|
||||
string(1) "1"
|
||||
["-_&_%_$cookie_10"]=>
|
||||
string(2) "10"
|
||||
}
|
||||
--UEXPECTF--
|
||||
array(10) {
|
||||
[u"cookie1"]=>
|
||||
unicode(0) ""
|
||||
|
|
|
@ -7,15 +7,6 @@ c o o k i e=value; c o o k i e= v a l u e ;;c%20o+o k+i%20e=v;name="value","valu
|
|||
var_dump($_COOKIE);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
["c_o_o_k_i_e"]=>
|
||||
string(5) "value"
|
||||
["name"]=>
|
||||
string(24) ""value","value",UEhQIQ=="
|
||||
["UEhQIQ"]=>
|
||||
string(4) "=foo"
|
||||
}
|
||||
--UEXPECT--
|
||||
array(3) {
|
||||
[u"c_o_o_k_i_e"]=>
|
||||
unicode(1) "v"
|
||||
|
|
|
@ -12,23 +12,6 @@ a=ABC&y=XYZ&c[]=1&c[]=2&c[a]=3
|
|||
var_dump($_POST, $HTTP_RAW_POST_DATA);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(3) {
|
||||
["a"]=>
|
||||
string(3) "ABC"
|
||||
["y"]=>
|
||||
string(3) "XYZ"
|
||||
["c"]=>
|
||||
array(3) {
|
||||
[0]=>
|
||||
string(1) "1"
|
||||
[1]=>
|
||||
string(1) "2"
|
||||
["a"]=>
|
||||
string(1) "3"
|
||||
}
|
||||
}
|
||||
string(30) "a=ABC&y=XYZ&c[]=1&c[]=2&c[a]=3"
|
||||
--UEXPECT--
|
||||
array(3) {
|
||||
[u"a"]=>
|
||||
unicode(3) "ABC"
|
||||
|
|
|
@ -15,8 +15,4 @@ var_dump($_POST, $HTTP_RAW_POST_DATA);
|
|||
--EXPECT--
|
||||
array(0) {
|
||||
}
|
||||
string(9) "a=1&b=ZYX"
|
||||
--UEXPECT--
|
||||
array(0) {
|
||||
}
|
||||
unicode(9) "a=1&b=ZYX"
|
||||
|
|
|
@ -16,24 +16,6 @@ a=1&b=ZYX&c[][][][][][][][][][][][][][][][][][][][][][]=123&d=123&e[][]][]=3
|
|||
var_dump($_POST, $php_errormsg);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(4) {
|
||||
["a"]=>
|
||||
string(1) "1"
|
||||
["b"]=>
|
||||
string(3) "ZYX"
|
||||
["d"]=>
|
||||
string(3) "123"
|
||||
["e"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(1) "3"
|
||||
}
|
||||
}
|
||||
}
|
||||
string(106) "Input variable nesting level exceeded 10. To increase the limit change max_input_nesting_level in php.ini."
|
||||
--UEXPECT--
|
||||
array(4) {
|
||||
[u"a"]=>
|
||||
unicode(1) "1"
|
||||
|
|
|
@ -13,10 +13,4 @@ array(0) {
|
|||
}
|
||||
array(0) {
|
||||
}
|
||||
string(3) "GPC"
|
||||
--UEXPECT--
|
||||
array(0) {
|
||||
}
|
||||
array(0) {
|
||||
}
|
||||
unicode(3) "GPC"
|
||||
|
|
|
@ -22,26 +22,6 @@ var_dump($a);
|
|||
?>
|
||||
--EXPECT--
|
||||
Method test called:
|
||||
array(4) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
string(1) "2"
|
||||
[2]=>
|
||||
float(3.4)
|
||||
[3]=>
|
||||
bool(true)
|
||||
}
|
||||
array(3) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
[2]=>
|
||||
int(3)
|
||||
}
|
||||
--UEXPECT--
|
||||
Method test called:
|
||||
array(4) {
|
||||
[0]=>
|
||||
int(1)
|
||||
|
|
|
@ -21,16 +21,7 @@ Force pass-by-reference to __call
|
|||
|
||||
var_dump($a, $b);
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(8) "original"
|
||||
}
|
||||
array(1) {
|
||||
[0]=>
|
||||
&string(7) "changed"
|
||||
}
|
||||
--UEXPECTF--
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
unicode(8) "original"
|
||||
|
|
|
@ -26,7 +26,7 @@ class B extends A {
|
|||
$b = new B();
|
||||
$b->test();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
In B::__call(test1, array(1,a))
|
||||
object(B)#1 (0) {
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ class B extends A {
|
|||
$b = new B();
|
||||
$b->test();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
In A::__call(test1, array(1,a))
|
||||
object(B)#1 (0) {
|
||||
}
|
||||
|
|
|
@ -57,30 +57,6 @@ Getting [z]
|
|||
Nothing!
|
||||
Setting [z] to 1
|
||||
Not OK!
|
||||
object(setter)#%d (2) {
|
||||
["n"]=>
|
||||
int(1)
|
||||
["x"]=>
|
||||
array(3) {
|
||||
["a"]=>
|
||||
int(101)
|
||||
["b"]=>
|
||||
int(2)
|
||||
["c"]=>
|
||||
int(3)
|
||||
}
|
||||
}
|
||||
--UEXPECTF--
|
||||
Setting [a] to 100
|
||||
OK!
|
||||
Getting [a]
|
||||
Returning: 100
|
||||
Setting [a] to 101
|
||||
OK!
|
||||
Getting [z]
|
||||
Nothing!
|
||||
Setting [z] to 1
|
||||
Not OK!
|
||||
object(setter)#%d (2) {
|
||||
[u"n"]=>
|
||||
int(1)
|
||||
|
|
|
@ -34,10 +34,6 @@ var_dump($foo->bar->baz);
|
|||
?>
|
||||
===DONE===
|
||||
--EXPECT--
|
||||
string(5) "Check"
|
||||
string(5) "Check"
|
||||
===DONE===
|
||||
--UEXPECT--
|
||||
unicode(5) "Check"
|
||||
unicode(5) "Check"
|
||||
===DONE===
|
||||
|
|
|
@ -55,21 +55,6 @@ var_dump($foo->bar->baz);
|
|||
AutoGen::__get
|
||||
Test::__set
|
||||
AutoGen::__get
|
||||
object(Test)#%d (1) {
|
||||
["x":protected]=>
|
||||
array(1) {
|
||||
["baz"]=>
|
||||
string(5) "Check"
|
||||
}
|
||||
}
|
||||
AutoGen::__get
|
||||
Test::__get
|
||||
string(5) "Check"
|
||||
===DONE===
|
||||
--UEXPECTF--
|
||||
AutoGen::__get
|
||||
Test::__set
|
||||
AutoGen::__get
|
||||
object(Test)#%d (1) {
|
||||
[u"x":protected]=>
|
||||
array(1) {
|
||||
|
|
|
@ -84,119 +84,6 @@ var_dump($obj->a);
|
|||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(3) "1st"
|
||||
[1]=>
|
||||
int(1)
|
||||
[2]=>
|
||||
string(3) "3rd"
|
||||
["4th"]=>
|
||||
int(4)
|
||||
}
|
||||
===EMPTY===
|
||||
object::offsetExists(0)
|
||||
object::offsetGet(0)
|
||||
bool(false)
|
||||
object::offsetExists(1)
|
||||
object::offsetGet(1)
|
||||
bool(false)
|
||||
object::offsetExists(2)
|
||||
object::offsetGet(2)
|
||||
bool(false)
|
||||
object::offsetExists(4th)
|
||||
object::offsetGet(4th)
|
||||
bool(false)
|
||||
object::offsetExists(5th)
|
||||
bool(true)
|
||||
object::offsetExists(6)
|
||||
bool(true)
|
||||
===isset===
|
||||
object::offsetExists(0)
|
||||
bool(true)
|
||||
object::offsetExists(1)
|
||||
bool(true)
|
||||
object::offsetExists(2)
|
||||
bool(true)
|
||||
object::offsetExists(4th)
|
||||
bool(true)
|
||||
object::offsetExists(5th)
|
||||
bool(false)
|
||||
object::offsetExists(6)
|
||||
bool(false)
|
||||
===offsetGet===
|
||||
object::offsetGet(0)
|
||||
string(3) "1st"
|
||||
object::offsetGet(1)
|
||||
int(1)
|
||||
object::offsetGet(2)
|
||||
string(3) "3rd"
|
||||
object::offsetGet(4th)
|
||||
int(4)
|
||||
object::offsetGet(5th)
|
||||
|
||||
Notice: Undefined index: 5th in %sarray_access_001.php on line %d
|
||||
NULL
|
||||
object::offsetGet(6)
|
||||
|
||||
Notice: Undefined offset: 6 in %sarray_access_001.php on line %d
|
||||
NULL
|
||||
===offsetSet===
|
||||
WRITE 1
|
||||
object::offsetSet(1,Changed 1)
|
||||
object::offsetGet(1)
|
||||
string(9) "Changed 1"
|
||||
WRITE 2
|
||||
object::offsetSet(4th,Changed 4th)
|
||||
object::offsetGet(4th)
|
||||
string(11) "Changed 4th"
|
||||
WRITE 3
|
||||
object::offsetSet(5th,Added 5th)
|
||||
object::offsetGet(5th)
|
||||
string(9) "Added 5th"
|
||||
WRITE 4
|
||||
object::offsetSet(6,Added 6)
|
||||
object::offsetGet(6)
|
||||
string(7) "Added 6"
|
||||
object::offsetGet(0)
|
||||
string(3) "1st"
|
||||
object::offsetGet(2)
|
||||
string(3) "3rd"
|
||||
object::offsetSet(6,changed 6)
|
||||
object::offsetGet(6)
|
||||
string(9) "changed 6"
|
||||
string(9) "changed 6"
|
||||
===unset===
|
||||
array(6) {
|
||||
[0]=>
|
||||
string(3) "1st"
|
||||
[1]=>
|
||||
string(9) "Changed 1"
|
||||
[2]=>
|
||||
string(3) "3rd"
|
||||
["4th"]=>
|
||||
string(11) "Changed 4th"
|
||||
["5th"]=>
|
||||
string(9) "Added 5th"
|
||||
[6]=>
|
||||
string(9) "changed 6"
|
||||
}
|
||||
object::offsetUnset(2)
|
||||
object::offsetUnset(4th)
|
||||
object::offsetUnset(7)
|
||||
object::offsetUnset(8th)
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(3) "1st"
|
||||
[1]=>
|
||||
string(9) "Changed 1"
|
||||
["5th"]=>
|
||||
string(9) "Added 5th"
|
||||
[6]=>
|
||||
string(9) "changed 6"
|
||||
}
|
||||
===DONE===
|
||||
--UEXPECTF--
|
||||
array(4) {
|
||||
[0]=>
|
||||
unicode(3) "1st"
|
||||
|
|
|
@ -84,119 +84,6 @@ var_dump($obj->a);
|
|||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(3) "1st"
|
||||
[1]=>
|
||||
int(1)
|
||||
[2]=>
|
||||
string(3) "3rd"
|
||||
["4th"]=>
|
||||
int(4)
|
||||
}
|
||||
===EMPTY===
|
||||
object::offsetExists(0)
|
||||
object::offsetGet(0)
|
||||
bool(false)
|
||||
object::offsetExists(1)
|
||||
object::offsetGet(1)
|
||||
bool(false)
|
||||
object::offsetExists(2)
|
||||
object::offsetGet(2)
|
||||
bool(false)
|
||||
object::offsetExists(4th)
|
||||
object::offsetGet(4th)
|
||||
bool(false)
|
||||
object::offsetExists(5th)
|
||||
bool(true)
|
||||
object::offsetExists(6)
|
||||
bool(true)
|
||||
===isset===
|
||||
object::offsetExists(0)
|
||||
bool(true)
|
||||
object::offsetExists(1)
|
||||
bool(true)
|
||||
object::offsetExists(2)
|
||||
bool(true)
|
||||
object::offsetExists(4th)
|
||||
bool(true)
|
||||
object::offsetExists(5th)
|
||||
bool(false)
|
||||
object::offsetExists(6)
|
||||
bool(false)
|
||||
===offsetGet===
|
||||
object::offsetGet(0)
|
||||
string(3) "1st"
|
||||
object::offsetGet(1)
|
||||
int(1)
|
||||
object::offsetGet(2)
|
||||
string(3) "3rd"
|
||||
object::offsetGet(4th)
|
||||
int(4)
|
||||
object::offsetGet(5th)
|
||||
|
||||
Notice: Undefined index: 5th in %sarray_access_002.php on line %d
|
||||
NULL
|
||||
object::offsetGet(6)
|
||||
|
||||
Notice: Undefined offset: 6 in %sarray_access_002.php on line %d
|
||||
NULL
|
||||
===offsetSet===
|
||||
WRITE 1
|
||||
object::offsetSet(1,Changed 1)
|
||||
object::offsetGet(1)
|
||||
string(9) "Changed 1"
|
||||
WRITE 2
|
||||
object::offsetSet(4th,Changed 4th)
|
||||
object::offsetGet(4th)
|
||||
string(11) "Changed 4th"
|
||||
WRITE 3
|
||||
object::offsetSet(5th,Added 5th)
|
||||
object::offsetGet(5th)
|
||||
string(9) "Added 5th"
|
||||
WRITE 4
|
||||
object::offsetSet(6,Added 6)
|
||||
object::offsetGet(6)
|
||||
string(7) "Added 6"
|
||||
object::offsetGet(0)
|
||||
string(3) "1st"
|
||||
object::offsetGet(2)
|
||||
string(3) "3rd"
|
||||
object::offsetSet(6,changed 6)
|
||||
object::offsetGet(6)
|
||||
string(9) "changed 6"
|
||||
string(9) "changed 6"
|
||||
===unset===
|
||||
array(6) {
|
||||
[0]=>
|
||||
string(3) "1st"
|
||||
[1]=>
|
||||
string(9) "Changed 1"
|
||||
[2]=>
|
||||
string(3) "3rd"
|
||||
["4th"]=>
|
||||
string(11) "Changed 4th"
|
||||
["5th"]=>
|
||||
string(9) "Added 5th"
|
||||
[6]=>
|
||||
string(9) "changed 6"
|
||||
}
|
||||
object::offsetUnset(2)
|
||||
object::offsetUnset(4th)
|
||||
object::offsetUnset(7)
|
||||
object::offsetUnset(8th)
|
||||
array(4) {
|
||||
[0]=>
|
||||
string(3) "1st"
|
||||
[1]=>
|
||||
string(9) "Changed 1"
|
||||
["5th"]=>
|
||||
string(9) "Added 5th"
|
||||
[6]=>
|
||||
string(9) "changed 6"
|
||||
}
|
||||
===DONE===
|
||||
--UEXPECTF--
|
||||
array(4) {
|
||||
[0]=>
|
||||
unicode(3) "1st"
|
||||
|
|
|
@ -48,17 +48,6 @@ var_dump($obj[2]);
|
|||
===DONE===
|
||||
--EXPECTF--
|
||||
object::offsetGet(1)
|
||||
string(6) "fooBar"
|
||||
object::offsetGet(2)
|
||||
int(1)
|
||||
object::offsetGet(2)
|
||||
|
||||
Notice: Indirect modification of overloaded element of object has no effect in %sarray_access_003.php on line 39
|
||||
object::offsetGet(2)
|
||||
int(1)
|
||||
===DONE===
|
||||
--UEXPECTF--
|
||||
object::offsetGet(1)
|
||||
unicode(6) "fooBar"
|
||||
object::offsetGet(2)
|
||||
int(1)
|
||||
|
|
|
@ -46,17 +46,6 @@ var_dump($obj[2]);
|
|||
===DONE===
|
||||
--EXPECTF--
|
||||
object::offsetGet(1)
|
||||
string(6) "fooBar"
|
||||
object::offsetGet(2)
|
||||
int(1)
|
||||
object::offsetGet(2)
|
||||
|
||||
Notice: Indirect modification of overloaded element of object has no effect in %sarray_access_004.php on line 39
|
||||
object::offsetGet(2)
|
||||
int(1)
|
||||
===DONE===
|
||||
--UEXPECTF--
|
||||
object::offsetGet(1)
|
||||
unicode(6) "fooBar"
|
||||
object::offsetGet(2)
|
||||
int(1)
|
||||
|
|
|
@ -54,28 +54,6 @@ var_dump($people[0]['name']);
|
|||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
string(3) "Joe"
|
||||
string(6) "JoeFoo"
|
||||
string(9) "JoeFooBar"
|
||||
---ArrayOverloading---
|
||||
array(1) {
|
||||
["name"]=>
|
||||
string(3) "Joe"
|
||||
}
|
||||
string(3) "Joe"
|
||||
string(6) "JoeFoo"
|
||||
array(1) {
|
||||
["name"]=>
|
||||
string(6) "JoeFoo"
|
||||
}
|
||||
|
||||
Notice: Indirect modification of overloaded element of Peoples has no effect in %sarray_access_005.php on line 46
|
||||
string(6) "JoeFoo"
|
||||
|
||||
Notice: Indirect modification of overloaded element of Peoples has no effect in %sarray_access_005.php on line 48
|
||||
string(6) "JoeFoo"
|
||||
===DONE===
|
||||
--UEXPECTF--
|
||||
unicode(3) "Joe"
|
||||
unicode(6) "JoeFoo"
|
||||
unicode(9) "JoeFooBar"
|
||||
|
|
|
@ -50,22 +50,6 @@ var_dump($people[0]['name']);
|
|||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
string(3) "Foo"
|
||||
string(6) "FooBar"
|
||||
string(9) "FooBarBaz"
|
||||
===ArrayOverloading===
|
||||
string(3) "Foo"
|
||||
|
||||
Notice: Indirect modification of overloaded element of Peoples has no effect in %sarray_access_008.php on line 40
|
||||
string(3) "Foo"
|
||||
|
||||
Notice: Indirect modification of overloaded element of Peoples has no effect in %sarray_access_008.php on line 42
|
||||
string(3) "Foo"
|
||||
|
||||
Notice: Indirect modification of overloaded element of Peoples has no effect in %sarray_access_008.php on line 44
|
||||
string(3) "Foo"
|
||||
===DONE===
|
||||
--UEXPECTF--
|
||||
unicode(3) "Foo"
|
||||
unicode(6) "FooBar"
|
||||
unicode(9) "FooBarBaz"
|
||||
|
|
|
@ -124,71 +124,6 @@ var_dump($people[0]['name']);
|
|||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
string(3) "Foo"
|
||||
string(6) "FooBar"
|
||||
string(9) "FooBarBaz"
|
||||
===ArrayOverloading===
|
||||
ArrayProxy::__construct(0)
|
||||
object(ArrayProxy)#%d (2) {
|
||||
["object":"ArrayProxy":private]=>
|
||||
object(Peoples)#%d (1) {
|
||||
["person"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
["name"]=>
|
||||
string(3) "Foo"
|
||||
}
|
||||
}
|
||||
}
|
||||
["element":"ArrayProxy":private]=>
|
||||
int(0)
|
||||
}
|
||||
ArrayProxy::__construct(0)
|
||||
ArrayProxy::offsetGet(0, name)
|
||||
string(3) "Foo"
|
||||
ArrayProxy::__construct(0)
|
||||
ArrayProxy::offsetSet(0, name, FooBar)
|
||||
ArrayProxy::__construct(0)
|
||||
ArrayProxy::offsetGet(0, name)
|
||||
string(6) "FooBar"
|
||||
ArrayProxy::__construct(0)
|
||||
ArrayProxy::offsetSet(0, name, FooBarBar)
|
||||
ArrayProxy::__construct(0)
|
||||
ArrayProxy::offsetGet(0, name)
|
||||
string(9) "FooBarBar"
|
||||
ArrayProxy::__construct(0)
|
||||
ArrayProxy::offsetGet(0, name)
|
||||
ArrayProxy::offsetSet(0, name, FooBarBarBaz)
|
||||
ArrayProxy::__construct(0)
|
||||
ArrayProxy::offsetGet(0, name)
|
||||
string(12) "FooBarBarBaz"
|
||||
ArrayProxy::__construct(0)
|
||||
ArrayProxy::offsetUnset(0, name)
|
||||
ArrayProxy::__construct(0)
|
||||
object(ArrayProxy)#%d (2) {
|
||||
["object":"ArrayProxy":private]=>
|
||||
object(Peoples)#%d (1) {
|
||||
["person"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
["element":"ArrayProxy":private]=>
|
||||
int(0)
|
||||
}
|
||||
ArrayProxy::__construct(0)
|
||||
ArrayProxy::offsetGet(0, name)
|
||||
NULL
|
||||
ArrayProxy::__construct(0)
|
||||
ArrayProxy::offsetSet(0, name, BlaBla)
|
||||
ArrayProxy::__construct(0)
|
||||
ArrayProxy::offsetGet(0, name)
|
||||
string(6) "BlaBla"
|
||||
===DONE===
|
||||
--UEXPECTF--
|
||||
unicode(3) "Foo"
|
||||
unicode(6) "FooBar"
|
||||
unicode(9) "FooBarBaz"
|
||||
|
|
|
@ -98,125 +98,6 @@ var_dump($people[0]['name']);
|
|||
===DONE===
|
||||
<?php exit(0); ?>
|
||||
--EXPECTF--
|
||||
string(3) "Foo"
|
||||
string(6) "FooBar"
|
||||
string(9) "FooBarBaz"
|
||||
===ArrayOverloading===
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
object(ArrayReferenceProxy)#%d (2) {
|
||||
["object":"ArrayReferenceProxy":private]=>
|
||||
object(Peoples)#%d (1) {
|
||||
["person"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
&array(1) {
|
||||
["name"]=>
|
||||
string(3) "Foo"
|
||||
}
|
||||
}
|
||||
}
|
||||
["element":"ArrayReferenceProxy":private]=>
|
||||
&array(1) {
|
||||
["name"]=>
|
||||
string(3) "Foo"
|
||||
}
|
||||
}
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::offsetGet(Array, name)
|
||||
string(3) "Foo"
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::offsetSet(Array, name, FooBar)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::offsetGet(Array, name)
|
||||
string(6) "FooBar"
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::offsetSet(Array, name, FooBarBar)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::offsetGet(Array, name)
|
||||
string(9) "FooBarBar"
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::offsetGet(Array, name)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::offsetSet(Array, name, FooBarBarBaz)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::offsetGet(Array, name)
|
||||
string(12) "FooBarBarBaz"
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::offsetUnset(Array, name)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
object(ArrayReferenceProxy)#%d (2) {
|
||||
["object":"ArrayReferenceProxy":private]=>
|
||||
object(Peoples)#%d (1) {
|
||||
["person"]=>
|
||||
array(1) {
|
||||
[0]=>
|
||||
&array(0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
["element":"ArrayReferenceProxy":private]=>
|
||||
&array(0) {
|
||||
}
|
||||
}
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::offsetGet(Array, name)
|
||||
NULL
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::offsetSet(Array, name, BlaBla)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::__construct(Array)
|
||||
|
||||
Notice: Array to string conversion in %s on line %d
|
||||
ArrayReferenceProxy::offsetGet(Array, name)
|
||||
string(6) "BlaBla"
|
||||
===DONE===
|
||||
--UEXPECTF--
|
||||
unicode(3) "Foo"
|
||||
unicode(6) "FooBar"
|
||||
unicode(9) "FooBarBaz"
|
||||
|
|
|
@ -107,85 +107,6 @@ var_dump($people[0]['name']);
|
|||
===DONE===
|
||||
<?php exit(0); ?>
|
||||
--EXPECTF--
|
||||
string(3) "Foo"
|
||||
string(6) "FooBar"
|
||||
string(9) "FooBarBaz"
|
||||
===ArrayOverloading===
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
object(ArrayAccessReferenceProxy)#%d (3) {
|
||||
["object":"ArrayAccessReferenceProxy":private]=>
|
||||
object(Peoples)#%d (1) {
|
||||
["person"]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
["name"]=>
|
||||
string(3) "Foo"
|
||||
}
|
||||
}
|
||||
}
|
||||
["oarray":"ArrayAccessReferenceProxy":private]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
array(1) {
|
||||
["name"]=>
|
||||
string(3) "Foo"
|
||||
}
|
||||
}
|
||||
["element":"ArrayAccessReferenceProxy":private]=>
|
||||
int(0)
|
||||
}
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
ArrayAccessReferenceProxy::offsetGet(0, name)
|
||||
string(3) "Foo"
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
ArrayAccessReferenceProxy::offsetSet(0, name, FooBar)
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
ArrayAccessReferenceProxy::offsetGet(0, name)
|
||||
string(6) "FooBar"
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
ArrayAccessReferenceProxy::offsetSet(0, name, FooBarBar)
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
ArrayAccessReferenceProxy::offsetGet(0, name)
|
||||
string(9) "FooBarBar"
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
ArrayAccessReferenceProxy::offsetGet(0, name)
|
||||
ArrayAccessReferenceProxy::offsetSet(0, name, FooBarBarBaz)
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
ArrayAccessReferenceProxy::offsetGet(0, name)
|
||||
string(12) "FooBarBarBaz"
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
ArrayAccessReferenceProxy::offsetUnset(0, name)
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
object(ArrayAccessReferenceProxy)#%d (3) {
|
||||
["object":"ArrayAccessReferenceProxy":private]=>
|
||||
object(Peoples)#%d (1) {
|
||||
["person"]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
["oarray":"ArrayAccessReferenceProxy":private]=>
|
||||
&array(1) {
|
||||
[0]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
||||
["element":"ArrayAccessReferenceProxy":private]=>
|
||||
int(0)
|
||||
}
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
ArrayAccessReferenceProxy::offsetGet(0, name)
|
||||
NULL
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
ArrayAccessReferenceProxy::offsetSet(0, name, BlaBla)
|
||||
ArrayAccessReferenceProxy::__construct(0)
|
||||
ArrayAccessReferenceProxy::offsetGet(0, name)
|
||||
string(6) "BlaBla"
|
||||
===DONE===
|
||||
--UEXPECTF--
|
||||
unicode(3) "Foo"
|
||||
unicode(6) "FooBar"
|
||||
unicode(9) "FooBarBaz"
|
||||
|
|
|
@ -20,13 +20,6 @@ var_dump(get_class_methods('autoload_root'));
|
|||
===DONE===
|
||||
--EXPECT--
|
||||
__autoload(autoload_root)
|
||||
array(1) {
|
||||
[0]=>
|
||||
string(12) "testFunction"
|
||||
}
|
||||
===DONE===
|
||||
--UEXPECT--
|
||||
__autoload(autoload_root)
|
||||
array(1) {
|
||||
[0]=>
|
||||
unicode(12) "testFunction"
|
||||
|
|
|
@ -11,5 +11,5 @@ Ensure instanceof does not trigger autoload.
|
|||
$a = new stdClass;
|
||||
var_dump($a instanceof UndefC);
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
|
|
|
@ -22,5 +22,5 @@ Ensure catch blocks for unknown exception types do not trigger autoload.
|
|||
echo "In Exception catch block. Autoload should not have been triggered.\n";
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
In Exception catch block. Autoload should not have been triggered.
|
||||
|
|
|
@ -16,5 +16,3 @@ Ensure type hints for unknown types do not trigger autoload.
|
|||
--EXPECTF--
|
||||
|
||||
Catchable fatal error: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s
|
||||
|
||||
|
||||
|
|
|
@ -13,11 +13,6 @@ Ensure implements does trigger autoload.
|
|||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
In autoload: string(6) "UndefI"
|
||||
|
||||
Fatal error: Interface 'UndefI' not found in %s on line %d
|
||||
|
||||
--UEXPECTF--
|
||||
In autoload: unicode(6) "UndefI"
|
||||
|
||||
Fatal error: Interface 'UndefI' not found in %s on line %d
|
||||
|
|
|
@ -13,11 +13,6 @@ Ensure extends does trigger autoload.
|
|||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
In autoload: string(9) "UndefBase"
|
||||
|
||||
Fatal error: Class 'UndefBase' not found in %s on line %d
|
||||
|
||||
--UEXPECTF--
|
||||
In autoload: unicode(9) "UndefBase"
|
||||
|
||||
Fatal error: Class 'UndefBase' not found in %s on line %d
|
||||
|
|
|
@ -10,11 +10,6 @@ Ensure callback methods in unknown classes trigger autoload.
|
|||
call_user_func("UndefC::test");
|
||||
?>
|
||||
--EXPECTF--
|
||||
In autoload: string(6) "UndefC"
|
||||
|
||||
Warning: call_user_func() expects parameter 1 to be a valid callback, class 'UndefC' not found in %s on line %d
|
||||
|
||||
--UEXPECTF--
|
||||
In autoload: unicode(6) "UndefC"
|
||||
|
||||
Warning: call_user_func() expects parameter 1 to be a valid callback, class 'UndefC' not found in %s on line %d
|
||||
|
|
|
@ -17,9 +17,6 @@ Ensure the ReflectionClass constructor triggers autoload.
|
|||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
In autoload: string(6) "UndefC"
|
||||
Class UndefC does not exist
|
||||
--UEXPECTF--
|
||||
--EXPECT--
|
||||
In autoload: unicode(6) "UndefC"
|
||||
Class UndefC does not exist
|
|
@ -17,9 +17,6 @@ Ensure the ReflectionMethod constructor triggers autoload.
|
|||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
In autoload: string(6) "UndefC"
|
||||
Class UndefC does not exist
|
||||
--UEXPECTF--
|
||||
--EXPECT--
|
||||
In autoload: unicode(6) "UndefC"
|
||||
Class UndefC does not exist
|
|
@ -17,9 +17,6 @@ Ensure the ReflectionProperty constructor triggers autoload.
|
|||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
In autoload: string(6) "UndefC"
|
||||
Class UndefC does not exist
|
||||
--UEXPECTF--
|
||||
--EXPECT--
|
||||
In autoload: unicode(6) "UndefC"
|
||||
Class UndefC does not exist
|
|
@ -18,9 +18,6 @@ Ensure ReflectionClass::getProperty() triggers autoload
|
|||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
In autoload: string(6) "undefc"
|
||||
Class undefc does not exist
|
||||
--UEXPECTF--
|
||||
--EXPECT--
|
||||
In autoload: unicode(6) "undefc"
|
||||
Class undefc does not exist
|
|
@ -18,9 +18,6 @@ Ensure ReflectionClass::implementsInterface triggers autoload.
|
|||
echo $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
In autoload: string(6) "UndefI"
|
||||
Interface UndefI does not exist
|
||||
--UEXPECTF--
|
||||
--EXPECT--
|
||||
In autoload: unicode(6) "UndefI"
|
||||
Interface UndefI does not exist
|
|
@ -19,7 +19,7 @@ Ensure __autoload() allows for recursive calls if the class name differs.
|
|||
|
||||
var_dump(class_exists('UndefinedClass0'));
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
IN: __autoload(UndefinedClass0)
|
||||
IN: __autoload(UndefinedClass1)
|
||||
IN: __autoload(UndefinedClass2)
|
||||
|
@ -45,4 +45,3 @@ OUT: __autoload(UndefinedClass2)
|
|||
OUT: __autoload(UndefinedClass1)
|
||||
OUT: __autoload(UndefinedClass0)
|
||||
bool(false)
|
||||
|
||||
|
|
|
@ -10,5 +10,5 @@ Ensure __autoload() recursion is guarded for multiple lookups of same class usin
|
|||
|
||||
class_exists("unDefinedClass");
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
__autoload unDefinedClass
|
||||
|
|
|
@ -11,12 +11,6 @@ Ensure __autoload() is triggered during unserialization.
|
|||
?>
|
||||
--EXPECTF--
|
||||
in autoload: C
|
||||
object(__PHP_Incomplete_Class)#%d (1) {
|
||||
["__PHP_Incomplete_Class_Name"]=>
|
||||
string(1) "C"
|
||||
}
|
||||
--UEXPECTF--
|
||||
in autoload: C
|
||||
object(__PHP_Incomplete_Class)#%d (1) {
|
||||
[u"__PHP_Incomplete_Class_Name"]=>
|
||||
unicode(1) "C"
|
||||
|
|
|
@ -19,7 +19,4 @@ var_dump(str_replace("\0", '\0', $data));
|
|||
?>
|
||||
--EXPECTF--
|
||||
Notice: serialize(): "no_such" returned as member variable from __sleep() but does not exist in %s on line %d
|
||||
string(130) "O:3:"foo":4:{S:12:"\0foo\0private";S:7:"private";S:12:"\0*\0protected";S:9:"protected";S:6:"public";S:6:"public";S:7:"no_such";N;}"
|
||||
--UEXPECTF--
|
||||
Notice: serialize(): "no_such" returned as member variable from __sleep() but does not exist in %s on line %d
|
||||
unicode(130) "O:3:"foo":4:{U:12:"\0foo\0private";U:7:"private";U:12:"\0*\0protected";U:9:"protected";U:6:"public";U:6:"public";U:7:"no_such";N;}"
|
||||
|
|
|
@ -9,6 +9,6 @@ echo get_class($obj)."\n";
|
|||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
stdClass
|
||||
Done
|
||||
|
|
|
@ -23,26 +23,6 @@ echo "Done\n";
|
|||
?>
|
||||
--EXPECT--
|
||||
Object
|
||||
object(test)#1 (3) {
|
||||
["p1"]=>
|
||||
int(1)
|
||||
["p2"]=>
|
||||
string(1) "A"
|
||||
["p3"]=>
|
||||
string(1) "B"
|
||||
}
|
||||
Clown
|
||||
object(test)#2 (3) {
|
||||
["p1"]=>
|
||||
int(1)
|
||||
["p2"]=>
|
||||
string(1) "A"
|
||||
["p3"]=>
|
||||
string(1) "C"
|
||||
}
|
||||
Done
|
||||
--UEXPECT--
|
||||
Object
|
||||
object(test)#1 (3) {
|
||||
[u"p1"]=>
|
||||
int(1)
|
||||
|
|
|
@ -25,26 +25,6 @@ echo "Done\n";
|
|||
?>
|
||||
--EXPECT--
|
||||
Object
|
||||
object(test)#1 (3) {
|
||||
["p1"]=>
|
||||
int(1)
|
||||
["p2"]=>
|
||||
string(1) "A"
|
||||
["p3"]=>
|
||||
string(1) "B"
|
||||
}
|
||||
Clown
|
||||
object(test)#2 (3) {
|
||||
["p1"]=>
|
||||
int(1)
|
||||
["p2"]=>
|
||||
string(1) "A"
|
||||
["p3"]=>
|
||||
string(1) "C"
|
||||
}
|
||||
Done
|
||||
--UEXPECT--
|
||||
Object
|
||||
object(test)#1 (3) {
|
||||
[u"p1"]=>
|
||||
int(1)
|
||||
|
|
|
@ -39,49 +39,6 @@ echo "Done\n";
|
|||
?>
|
||||
--EXPECT--
|
||||
Original
|
||||
object(test)#1 (2) {
|
||||
["b"]=>
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(3)
|
||||
[1]=>
|
||||
int(4)
|
||||
}
|
||||
["a"]=>
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
}
|
||||
}
|
||||
Clone
|
||||
object(test)#2 (2) {
|
||||
["b"]=>
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(3)
|
||||
[1]=>
|
||||
int(4)
|
||||
}
|
||||
["a"]=>
|
||||
array(2) {
|
||||
[0]=>
|
||||
int(1)
|
||||
[1]=>
|
||||
int(2)
|
||||
}
|
||||
}
|
||||
Modify
|
||||
object(test)#2 (2) {
|
||||
["b"]=>
|
||||
int(6)
|
||||
["a"]=>
|
||||
int(5)
|
||||
}
|
||||
Done
|
||||
--UEXPECT--
|
||||
Original
|
||||
object(test)#1 (2) {
|
||||
[u"b"]=>
|
||||
array(2) {
|
||||
|
|
|
@ -63,36 +63,6 @@ Notice: Undefined variable: undef in %s on line 5
|
|||
|
||||
Attempt to access various kinds of class constants:
|
||||
|
||||
Notice: Use of undefined constant UNDEFINED - assumed 'UNDEFINED' in %s on line %d
|
||||
string(9) "UNDEFINED"
|
||||
int(1)
|
||||
float(1.5)
|
||||
int(1)
|
||||
float(1.5)
|
||||
int(-1)
|
||||
float(-1.5)
|
||||
int(15)
|
||||
string(%d) "%s"
|
||||
string(1) "C"
|
||||
string(1) "C"
|
||||
string(0) ""
|
||||
int(1234)
|
||||
int(456)
|
||||
NULL
|
||||
string(6) "hello1"
|
||||
string(6) "hello2"
|
||||
string(6) "hello2"
|
||||
string(6) "hello2"
|
||||
|
||||
Expecting fatal error:
|
||||
|
||||
Fatal error: Undefined class constant 'c19' in %s on line 53
|
||||
--UEXPECTF--
|
||||
|
||||
Notice: Undefined variable: undef in %s on line 5
|
||||
|
||||
Attempt to access various kinds of class constants:
|
||||
|
||||
Notice: Use of undefined constant UNDEFINED - assumed 'UNDEFINED' in %s on line %d
|
||||
unicode(9) "UNDEFINED"
|
||||
int(1)
|
||||
|
|
|
@ -18,19 +18,6 @@ Basic class support - defining and reading a class constant.
|
|||
var_dump($myInstance)
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Read class constant.
|
||||
string(5) "hello"
|
||||
|
||||
Fail to read class constant from instance.
|
||||
|
||||
Notice: Undefined property: aclass::$myConst in %s on line 12
|
||||
NULL
|
||||
|
||||
Class constant not visible in object var_dump.
|
||||
object(aclass)#%d (0) {
|
||||
}
|
||||
--UEXPECTF--
|
||||
Read class constant.
|
||||
unicode(5) "hello"
|
||||
|
||||
|
|
|
@ -21,12 +21,7 @@ Ensure class properties and constants can be defined in terms of constants that
|
|||
var_dump(B::ca);
|
||||
var_dump(B::cc);
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(12) "hello from A"
|
||||
string(12) "hello from C"
|
||||
string(12) "hello from A"
|
||||
string(12) "hello from C"
|
||||
--UEXPECTF--
|
||||
--EXPECT--
|
||||
unicode(12) "hello from A"
|
||||
unicode(12) "hello from C"
|
||||
unicode(12) "hello from A"
|
||||
|
|
|
@ -43,61 +43,6 @@ Test properties with array default values using class constants as keys and valu
|
|||
?>
|
||||
--EXPECTF--
|
||||
|
||||
Static properties:
|
||||
array(1) {
|
||||
["key"]=>
|
||||
string(5) "value"
|
||||
}
|
||||
array(1) {
|
||||
["key"]=>
|
||||
string(5) "value"
|
||||
}
|
||||
array(1) {
|
||||
["key"]=>
|
||||
string(5) "value"
|
||||
}
|
||||
array(1) {
|
||||
["key"]=>
|
||||
string(5) "value"
|
||||
}
|
||||
array(1) {
|
||||
["key"]=>
|
||||
string(5) "value"
|
||||
}
|
||||
|
||||
Instance properties:
|
||||
object(X)#%d (1) {
|
||||
["a_x"]=>
|
||||
array(1) {
|
||||
["key"]=>
|
||||
string(5) "value"
|
||||
}
|
||||
}
|
||||
object(B)#%d (1) {
|
||||
["a_b"]=>
|
||||
array(1) {
|
||||
["key"]=>
|
||||
string(5) "value"
|
||||
}
|
||||
}
|
||||
object(C)#%d (3) {
|
||||
["a_c_parent"]=>
|
||||
array(1) {
|
||||
["key"]=>
|
||||
string(5) "value"
|
||||
}
|
||||
["a_c_self"]=>
|
||||
array(1) {
|
||||
["key"]=>
|
||||
string(5) "value"
|
||||
}
|
||||
["a_b"]=>
|
||||
array(1) {
|
||||
["key"]=>
|
||||
string(5) "value"
|
||||
}
|
||||
}
|
||||
--UEXPECTF--
|
||||
Static properties:
|
||||
array(1) {
|
||||
[u"key"]=>
|
||||
|
|
|
@ -10,9 +10,6 @@ Test constants with default values based on other constants.
|
|||
}
|
||||
var_dump(C::CONST_1, C::CONST_2);
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(5) "hello"
|
||||
string(5) "hello"
|
||||
--UEXPECTF--
|
||||
--EXPECT--
|
||||
unicode(5) "hello"
|
||||
unicode(5) "hello"
|
||||
|
|
|
@ -19,29 +19,7 @@ Ensure class constants are not evaluated when a class is looked up to resolve in
|
|||
|
||||
var_dump(C::X, C::$a, D::X, D::$a, E::X, E::$a);
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(5) "hello"
|
||||
array(2) {
|
||||
["nasty"]=>
|
||||
string(4) "test"
|
||||
["hello"]=>
|
||||
string(5) "nasty"
|
||||
}
|
||||
string(5) "hello"
|
||||
array(2) {
|
||||
["nasty"]=>
|
||||
string(4) "test"
|
||||
["hello"]=>
|
||||
string(5) "nasty"
|
||||
}
|
||||
string(5) "hello"
|
||||
array(2) {
|
||||
["nasty"]=>
|
||||
string(4) "test"
|
||||
["hello"]=>
|
||||
string(5) "nasty"
|
||||
}
|
||||
--UEXPECTF--
|
||||
--EXPECT--
|
||||
unicode(5) "hello"
|
||||
array(2) {
|
||||
[u"nasty"]=>
|
||||
|
|
|
@ -31,7 +31,7 @@ $t = new late();
|
|||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
early::early
|
||||
early::early
|
||||
early::__destruct
|
||||
|
|
|
@ -54,7 +54,7 @@ unset($t);
|
|||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Testing class base
|
||||
base::__construct
|
||||
base Object
|
||||
|
|
|
@ -17,6 +17,6 @@ class derived extends base {
|
|||
$obj = new derived();
|
||||
$obj->base();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
base::base
|
||||
derived::base
|
||||
|
|
|
@ -51,7 +51,7 @@ catch(FatalException $e)
|
|||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
FailClass::__destruct
|
||||
Caught: FailClass
|
||||
FatalException::__construct
|
||||
|
|
|
@ -23,6 +23,6 @@ unset($obj); // Derived::__destruct is being called not Base::__destruct
|
|||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Derived::__destruct
|
||||
===DONE===
|
||||
|
|
|
@ -17,4 +17,3 @@ echo "Done\n";
|
|||
?>
|
||||
--EXPECTF--
|
||||
Fatal error: Call to private test::__destruct() from context '' in %sfactory_and_singleton_006.php on line %d
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ $t2->show();
|
|||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Call to function first::show()
|
||||
Call to function second::show()
|
||||
Done
|
|
@ -58,19 +58,6 @@ $cm= new Child_mx2();
|
|||
?>
|
||||
--EXPECT--
|
||||
### PHP 4 style
|
||||
string(17) "Child constructor"
|
||||
string(16) "Base constructor"
|
||||
### PHP 5 style
|
||||
string(17) "Child constructor"
|
||||
string(16) "Base constructor"
|
||||
### Mixed style 1
|
||||
string(17) "Child constructor"
|
||||
string(16) "Base constructor"
|
||||
### Mixed style 2
|
||||
string(17) "Child constructor"
|
||||
string(16) "Base constructor"
|
||||
--UEXPECT--
|
||||
### PHP 4 style
|
||||
unicode(17) "Child constructor"
|
||||
unicode(16) "Base constructor"
|
||||
### PHP 5 style
|
||||
|
|
|
@ -40,7 +40,7 @@ Check for inherited old-style constructor.
|
|||
echo "Is C::C() callable?\n";
|
||||
var_dump(is_callable(array($c, "C")));
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
About to construct new B:
|
||||
In A::A
|
||||
Is B::B() callable?
|
||||
|
|
|
@ -14,5 +14,5 @@ class C implements IA, IB {
|
|||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Done
|
||||
|
|
|
@ -155,7 +155,7 @@ echo $t->test('if_e');
|
|||
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
class_a
|
||||
is_a(class_a, if_a) yes
|
||||
is_a(class_a, if_b) no
|
||||
|
|
|
@ -61,7 +61,7 @@ $t = new derived_d();
|
|||
$t->test();
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
is_a(base, base) = yes
|
||||
is_a(base, derived_a) = no
|
||||
is_a(base, derived_b) = no
|
||||
|
|
|
@ -24,4 +24,3 @@ $foo->bar();
|
|||
?>
|
||||
--EXPECT--
|
||||
foo
|
||||
|
||||
|
|
|
@ -23,4 +23,3 @@ echo $foo->getMessage() . "\n";
|
|||
?>
|
||||
--EXPECT--
|
||||
foo
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ foreach($obj as $v => $w) {
|
|||
|
||||
print "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
1st try
|
||||
2nd try
|
||||
object:max=>3
|
||||
|
|
|
@ -30,7 +30,7 @@ In $a->$b[Y](), $b[Y] represents a method name on $a. But in $a->X[Y](), $a->X[Y
|
|||
$c->functions[0](5, 6);
|
||||
$c->functions[1][2][3][4](7, 8);
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Called C::foo(1, 2)
|
||||
Called C::foo(3, 4)
|
||||
Called global foo(5, 6)
|
||||
|
|
|
@ -32,24 +32,6 @@ error_reporting=E_ALL | E_DEPRECATED
|
|||
Deprecated: Assigning the return value of new by reference is deprecated in %s on line 23
|
||||
Compile-time strict error message should precede this.
|
||||
$f initially points to the first object:
|
||||
object(Inc)#%d (1) {
|
||||
["id"]=>
|
||||
int(1)
|
||||
}
|
||||
Assigning new object directly to $k affects $f:
|
||||
object(Inc)#%d (1) {
|
||||
["id"]=>
|
||||
int(2)
|
||||
}
|
||||
Assigning new object by ref to $k removes it from $f's reference set, so $f is unchanged:
|
||||
object(Inc)#%d (1) {
|
||||
["id"]=>
|
||||
int(2)
|
||||
}
|
||||
--UEXPECTF--
|
||||
Deprecated: Assigning the return value of new by reference is deprecated in %s on line 23
|
||||
Compile-time strict error message should precede this.
|
||||
$f initially points to the first object:
|
||||
object(Inc)#%d (1) {
|
||||
[u"id"]=>
|
||||
int(1)
|
||||
|
|
|
@ -34,7 +34,7 @@ class fail extends third {
|
|||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Call show()
|
||||
Call show()
|
||||
Call show()
|
||||
|
|
|
@ -35,7 +35,7 @@ $t3->do_show();
|
|||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Call show()
|
||||
Call show()
|
||||
Done
|
|
@ -24,7 +24,7 @@ Foo::priv();
|
|||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Bar::priv()
|
||||
Foo::priv()
|
||||
Done
|
||||
|
|
|
@ -25,7 +25,7 @@ $obj->priv();
|
|||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Bar::priv()
|
||||
Foo::priv()
|
||||
Done
|
||||
|
|
|
@ -53,7 +53,7 @@ unset($t);
|
|||
echo "Done\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
derived::__construct(begin)
|
||||
base::__construct(begin)
|
||||
base::test
|
||||
|
|
|
@ -27,7 +27,7 @@ Redeclare inherited private static property as private.
|
|||
$b->showA();
|
||||
$b->showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p (static)
|
||||
A::p (static)
|
||||
B::p
|
||||
|
|
|
@ -26,7 +26,7 @@ Redeclare inherited private static property as private static.
|
|||
B::showA();
|
||||
B::showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p (static)
|
||||
A::p (static)
|
||||
B::p (static)
|
||||
|
|
|
@ -27,7 +27,7 @@ Redeclare inherited private static property as protected.
|
|||
$b->showA();
|
||||
$b->showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p (static)
|
||||
A::p (static)
|
||||
B::p
|
||||
|
|
|
@ -26,7 +26,7 @@ Redeclare inherited private static property as protected static.
|
|||
B::showA();
|
||||
B::showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p (static)
|
||||
A::p (static)
|
||||
B::p (static)
|
||||
|
|
|
@ -27,7 +27,7 @@ Redeclare inherited private static property as public.
|
|||
$b->showA();
|
||||
$b->showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p (static)
|
||||
A::p (static)
|
||||
B::p
|
||||
|
|
|
@ -26,7 +26,7 @@ Redeclare inherited private static property as public static.
|
|||
B::showA();
|
||||
B::showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p (static)
|
||||
A::p (static)
|
||||
B::p (static)
|
||||
|
|
|
@ -28,7 +28,7 @@ Redeclare inherited private property as private.
|
|||
$b->showA();
|
||||
$b->showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p
|
||||
A::p
|
||||
B::p
|
||||
|
|
|
@ -28,7 +28,7 @@ Redeclare inherited private property as private static.
|
|||
$b->showA();
|
||||
B::showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p
|
||||
A::p
|
||||
B::p (static)
|
||||
|
|
|
@ -28,7 +28,7 @@ Redeclare inherited private property as protected.
|
|||
$b->showA();
|
||||
$b->showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p
|
||||
A::p
|
||||
B::p
|
||||
|
|
|
@ -28,7 +28,7 @@ Redeclare inherited private property as protected static.
|
|||
$b->showA();
|
||||
B::showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p
|
||||
A::p
|
||||
B::p (static)
|
||||
|
|
|
@ -28,7 +28,7 @@ Redeclare inherited private property as public.
|
|||
$b->showA();
|
||||
$b->showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p
|
||||
A::p
|
||||
B::p
|
||||
|
|
|
@ -28,7 +28,7 @@ Redeclare inherited private property as public static.
|
|||
$b->showA();
|
||||
B::showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p
|
||||
A::p
|
||||
B::p (static)
|
||||
|
|
|
@ -30,4 +30,3 @@ Redeclare inherited protected static property as private.
|
|||
--EXPECTF--
|
||||
|
||||
Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
|
||||
|
||||
|
|
|
@ -29,4 +29,3 @@ Redeclare inherited protected static property as private static.
|
|||
--EXPECTF--
|
||||
|
||||
Fatal error: Access level to B::$p must be protected (as in class A) or weaker in %s on line 18
|
||||
|
||||
|
|
|
@ -30,4 +30,3 @@ Redeclare inherited protected static property as protected.
|
|||
--EXPECTF--
|
||||
|
||||
Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ Redeclare inherited protected static property as protected static.
|
|||
B::showA();
|
||||
B::showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p (static)
|
||||
A::p (static)
|
||||
B::p (static)
|
||||
|
|
|
@ -30,4 +30,3 @@ Redeclare inherited protected static property as public.
|
|||
--EXPECTF--
|
||||
|
||||
Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
|
||||
|
||||
|
|
|
@ -26,8 +26,7 @@ Redeclare inherited protected static property as public static.
|
|||
B::showA();
|
||||
B::showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p (static)
|
||||
A::p (static)
|
||||
B::p (static)
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Redeclare inherited protected property as protected.
|
|||
$b->showA();
|
||||
$b->showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p
|
||||
B::p
|
||||
B::p
|
||||
|
|
|
@ -28,7 +28,7 @@ Redeclare inherited protected property as public.
|
|||
$b->showA();
|
||||
$b->showB();
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
A::p
|
||||
B::p
|
||||
B::p
|
||||
|
|
|
@ -30,4 +30,3 @@ Redeclare inherited public static property as private.
|
|||
--EXPECTF--
|
||||
|
||||
Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
|
||||
|
||||
|
|
|
@ -29,4 +29,3 @@ Redeclare inherited public static property as private static.
|
|||
--EXPECTF--
|
||||
|
||||
Fatal error: Access level to B::$p must be public (as in class A) in %s on line 18
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue