var_dump($_POST['a']);
?>
--EXPECT--
-array(1) {
- [0]=>
- string(1) "1"
-}
---UEXPECT--
array(1) {
[0]=>
unicode(1) "1"
var_dump($_POST['a']);
?>
--EXPECT--
-array(2) {
- [0]=>
- string(1) "1"
- [1]=>
- string(1) "1"
-}
---UEXPECT--
array(2) {
[0]=>
unicode(1) "1"
var_dump($_POST['a']);
?>
--EXPECT--
-array(1) {
- [0]=>
- string(1) "5"
-}
---UEXPECT--
array(1) {
[0]=>
unicode(1) "5"
var_dump($_POST['a']);
?>
--EXPECT--
-array(2) {
- ["a"]=>
- string(1) "1"
- ["b"]=>
- string(1) "3"
-}
---UEXPECT--
array(2) {
[u"a"]=>
unicode(1) "1"
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"
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) {
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"
var_dump($_POST['a']);
?>
--EXPECT--
-array(2) {
- ["a["]=>
- string(1) "1"
- ["b["]=>
- string(1) "3"
-}
---UEXPECT--
array(2) {
[u"a["]=>
unicode(1) "1"
--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) ""
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"
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"
--EXPECT--
array(0) {
}
-string(9) "a=1&b=ZYX"
---UEXPECT--
-array(0) {
-}
unicode(9) "a=1&b=ZYX"
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"
}
array(0) {
}
-string(3) "GPC"
---UEXPECT--
-array(0) {
-}
-array(0) {
-}
unicode(3) "GPC"
?>
--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)
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"
array(1) {
[0]=>
&unicode(7) "changed"
-}
\ No newline at end of file
+}
$b = new B();
$b->test();
?>
---EXPECTF--
+--EXPECT--
In B::__call(test1, array(1,a))
object(B)#1 (0) {
}
}
In B::__call(test4, array(1,a))
object(B)#1 (0) {
-}
\ No newline at end of file
+}
$b = new B();
$b->test();
?>
---EXPECTF--
+--EXPECT--
In A::__call(test1, array(1,a))
object(B)#1 (0) {
}
}
In A::__call(test4, array(1,a))
object(B)#1 (0) {
-}
\ No newline at end of file
+}
function __set($nm, $val) {
echo "Setting [$nm] to $val\n";
-
+
if (isset($this->x[$nm])) {
$this->x[$nm] = $val;
echo "OK!\n";
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)
?>
===DONE===
--EXPECT--
-string(5) "Check"
-string(5) "Check"
-===DONE===
---UEXPECT--
unicode(5) "Check"
unicode(5) "Check"
===DONE===
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) {
?>
===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"
?>
===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"
===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)
===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)
?>
===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"
?>
===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"
?>
===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"
===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"
===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"
===DONE===
--EXPECT--
__autoload(autoload_root)
-array(1) {
- [0]=>
- string(12) "testFunction"
-}
-===DONE===
---UEXPECT--
-__autoload(autoload_root)
array(1) {
[0]=>
unicode(12) "testFunction"
$a = new stdClass;
var_dump($a instanceof UndefC);
?>
---EXPECTF--
+--EXPECT--
bool(false)
echo "In Exception catch block. Autoload should not have been triggered.\n";
}
?>
---EXPECTF--
+--EXPECT--
In Exception catch block. Autoload should not have been triggered.
--EXPECTF--
Catchable fatal error: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s
-
-
}
?>
--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
}
?>
--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
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
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
\ No newline at end of file
+Class UndefC does not exist
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
\ No newline at end of file
+Class UndefC does not exist
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
\ No newline at end of file
+Class UndefC does not exist
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
\ No newline at end of file
+Class undefc does not exist
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
\ No newline at end of file
+Interface UndefI does not exist
var_dump(class_exists('UndefinedClass0'));
?>
---EXPECTF--
+--EXPECT--
IN: __autoload(UndefinedClass0)
IN: __autoload(UndefinedClass1)
IN: __autoload(UndefinedClass2)
OUT: __autoload(UndefinedClass1)
OUT: __autoload(UndefinedClass0)
bool(false)
-
class_exists("unDefinedClass");
?>
---EXPECTF--
+--EXPECT--
__autoload unDefinedClass
?>
--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"
-}
\ No newline at end of file
+}
?>
--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;}"
?>
--EXPECTF--
-Fatal error: Cannot redefine class constant testClass::TEST_CONST in %s on line 5
\ No newline at end of file
+Fatal error: Cannot redefine class constant testClass::TEST_CONST in %s on line 5
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
stdClass
Done
?>
--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)
?>
--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)
?>
--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) {
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)
Expecting fatal error:
-Fatal error: Undefined class constant 'c19' in %s on line 53
\ No newline at end of file
+Fatal error: Undefined class constant 'c19' in %s on line 53
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"
Class constant not visible in object var_dump.
object(aclass)#%d (0) {
-}
\ No newline at end of file
+}
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"
-unicode(12) "hello from C"
\ No newline at end of file
+unicode(12) "hello from C"
?>
--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"]=>
[u"key"]=>
unicode(5) "value"
}
-}
\ No newline at end of file
+}
}
var_dump(C::CONST_1, C::CONST_2);
?>
---EXPECTF--
-string(5) "hello"
-string(5) "hello"
---UEXPECTF--
+--EXPECT--
unicode(5) "hello"
unicode(5) "hello"
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"]=>
unicode(4) "test"
[u"hello"]=>
unicode(5) "nasty"
-}
\ No newline at end of file
+}
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
early::early
early::early
early::__destruct
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
Testing class base
base::__construct
base Object
$obj = new derived();
$obj->base();
?>
---EXPECTF--
+--EXPECT--
base::base
derived::base
?>
===DONE===
---EXPECTF--
+--EXPECT--
FailClass::__destruct
Caught: FailClass
FatalException::__construct
--EXPECT--
base::__construct
base::__destruct
-Done
\ No newline at end of file
+Done
?>
===DONE===
---EXPECTF--
+--EXPECT--
Derived::__destruct
===DONE===
?>
--EXPECTF--
Fatal error: Call to private test::__destruct() from context '' in %sfactory_and_singleton_006.php on line %d
-
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
Call to function first::show()
Call to function second::show()
-Done
\ No newline at end of file
+Done
?>
--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
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?
?>
--EXPECTF--
-Fatal error: Cannot inherit previously-inherited constant FOO from interface I1 in %s on line 6
\ No newline at end of file
+Fatal error: Cannot inherit previously-inherited constant FOO from interface I1 in %s on line 6
?>
--EXPECTF--
-Fatal error: Cannot inherit previously-inherited constant FOO from interface I in %s on line 6
\ No newline at end of file
+Fatal error: Cannot inherit previously-inherited constant FOO from interface I in %s on line 6
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
Done
?>
===DONE===
---EXPECTF--
+--EXPECT--
class_a
is_a(class_a, if_a) yes
is_a(class_a, if_b) no
$t->test();
?>
---EXPECTF--
+--EXPECT--
is_a(base, base) = yes
is_a(base, derived_a) = no
is_a(base, derived_b) = no
?>
--EXPECT--
-int(2)
\ No newline at end of file
+int(2)
print "Done\n";
?>
---EXPECTF--
+--EXPECT--
1st try
2nd try
object:max=>3
0: foo
1: bar
2: baz
-===DONE===
\ No newline at end of file
+===DONE===
$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)
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)
--EXPECTF--
Call show()
-Fatal error: Call to private method pass::show() from context 'fail' in %s on line %d
\ No newline at end of file
+Fatal error: Call to private method pass::show() from context 'fail' in %s on line %d
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
Call show()
Call show()
Call show()
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
Call show()
Call show()
-Done
\ No newline at end of file
+Done
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
Bar::priv()
Foo::priv()
Done
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
Bar::priv()
Foo::priv()
Done
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
derived::__construct(begin)
base::__construct(begin)
base::test
$b->showA();
$b->showB();
?>
---EXPECTF--
+--EXPECT--
A::p (static)
A::p (static)
B::p
B::showA();
B::showB();
?>
---EXPECTF--
+--EXPECT--
A::p (static)
A::p (static)
B::p (static)
$b->showA();
$b->showB();
?>
---EXPECTF--
+--EXPECT--
A::p (static)
A::p (static)
B::p
B::showA();
B::showB();
?>
---EXPECTF--
+--EXPECT--
A::p (static)
A::p (static)
B::p (static)
$b->showA();
$b->showB();
?>
---EXPECTF--
+--EXPECT--
A::p (static)
A::p (static)
B::p
B::showA();
B::showB();
?>
---EXPECTF--
+--EXPECT--
A::p (static)
A::p (static)
B::p (static)
$b->showA();
$b->showB();
?>
---EXPECTF--
+--EXPECT--
A::p
A::p
B::p
$b->showA();
B::showB();
?>
---EXPECTF--
+--EXPECT--
A::p
A::p
B::p (static)
$b->showA();
$b->showB();
?>
---EXPECTF--
+--EXPECT--
A::p
A::p
B::p
$b->showA();
B::showB();
?>
---EXPECTF--
+--EXPECT--
A::p
A::p
B::p (static)
$b->showA();
$b->showB();
?>
---EXPECTF--
+--EXPECT--
A::p
A::p
B::p
$b->showA();
B::showB();
?>
---EXPECTF--
+--EXPECT--
A::p
A::p
B::p (static)
--EXPECTF--
Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
-
--EXPECTF--
Fatal error: Access level to B::$p must be protected (as in class A) or weaker in %s on line 18
-
--EXPECTF--
Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
-
B::showA();
B::showB();
?>
---EXPECTF--
+--EXPECT--
A::p (static)
A::p (static)
B::p (static)
--EXPECTF--
Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
-
B::showA();
B::showB();
?>
---EXPECTF--
+--EXPECT--
A::p (static)
A::p (static)
B::p (static)
-
$b->showA();
$b->showB();
?>
---EXPECTF--
+--EXPECT--
A::p
B::p
B::p
$b->showA();
$b->showB();
?>
---EXPECTF--
+--EXPECT--
A::p
B::p
B::p
--EXPECTF--
Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
-
--EXPECTF--
Fatal error: Access level to B::$p must be public (as in class A) in %s on line 18
-
--EXPECTF--
Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
-
--EXPECTF--
Fatal error: Access level to B::$p must be public (as in class A) in %s on line 18
-
--EXPECTF--
Fatal error: Cannot redeclare static A::$p as non static B::$p in %s on line 18
-
B::showA();
B::showB();
?>
---EXPECTF--
+--EXPECT--
A::p (static)
A::p (static)
B::p (static)
--EXPECTF--
Fatal error: Access level to B::$p must be public (as in class A) in %s on line 18
-
--EXPECTF--
Fatal error: Access level to B::$p must be public (as in class A) in %s on line 18
-
$b->showA();
$b->showB();
?>
---EXPECTF--
+--EXPECT--
A::p
B::p
B::p
<?php exit(0); ?>
--EXPECT--
==========
-string(6) "String"
-Test::__construct(String)
-Test::serialize(String)
-Test::unserialize(String)
-object(Test)#1 (1) {
- ["data"]=>
- string(6) "String"
-}
-object(Test)#1 (1) {
- ["data"]=>
- string(6) "String"
-}
-==========
-NULL
-Test::__construct()
-Test::serialize()
-NULL
-==========
-int(42)
-Test::__construct(42)
-Test::serialize(42)
-Exception: Test::serialize() must return a string or NULL
-==========
-bool(false)
-Test::__construct()
-Test::serialize()
-Exception: Test::serialize() must return a string or NULL
-===DONE===
---UEXPECT--
-==========
unicode(6) "String"
Test::__construct(String)
Test::serialize(String)
fail::show();
echo "Done\n"; // shouldn't be displayed
-?>
+?>
--EXPECTF--
-Fatal error: Cannot make static method pass::show() non static in class fail in %s on line %d
\ No newline at end of file
+Fatal error: Cannot make static method pass::show() non static in class fail in %s on line %d
echo "Done\n"; // shouldn't be displayed
?>
--EXPECTF--
-Fatal error: Cannot make non static method pass::show() static in class fail in %s on line %d
\ No newline at end of file
+Fatal error: Cannot make non static method pass::show() static in class fail in %s on line %d
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
array(0) {
}
array(1) {
test1 Object
(
)
-string(54) "Object of class test1 could not be converted to string"
-string(0) ""
-object(test1)#%d (0) {
-}
-====test2====
-test2 Object
-(
-)
-test2::__toString()
-Converted
-object(test2)#%d (0) {
-}
-====test3====
-test2::__toString()
-Converted
-====test4====
-test2::__toString()
-string:Converted
-====test5====
-test2::__toString()
-1Converted
-1test2::__toString()
-Converted
-====test6====
-test2::__toString()
-test2::__toString()
-Converted
-Converted
-test2::__toString()
-Converted
-test2::__toString()
-Converted
-====test7====
-test2::__toString()
-string(19) "Illegal offset type"
-====test8====
-test2::__toString()
-string(9) "Converted"
-test2::__toString()
-string(9) "Converted"
-====test9====
-test2::__toString()
-Converted
-====test10====
-object(test3)#%d (0) {
-}
-test3::__toString()
-string(53) "Method test3::__toString() must return a string value"
-====DONE====
---UEXPECTF--
-====test1====
-test1 Object
-(
-)
unicode(54) "Object of class test1 could not be converted to string"
unicode(0) ""
object(test1)#%d (0) {
?>
====DONE====
---EXPECTF--
+--EXPECT--
Hello
====DONE====
Hello
printf($obj . "\n");
?>
---EXPECTF--
-Object with no __toString():
-Try 1:
-Error: 4096 - Object of class stdClass could not be converted to string
-Error: 8 - Object of class stdClass to string conversion
-Object
-
-Try 2:
-Error: 4096 - Object of class stdClass could not be converted to string
-
-
-
-Object with bad __toString():
-Try 1:
-Error: 4096 - Method badToString::__toString() must return a string value
-
-
-Try 2:
-Error: 4096 - Method badToString::__toString() must return a string value
---UEXPECTF--
+--EXPECT--
Object with no __toString():
Try 1:
Error: 4096 - Object of class stdClass could not be converted to Unicode string
echo "Done\n"; // shouldn't be displayed
?>
---EXPECTF--
+--EXPECT--
Done
echo "Done\n"; // shouldn't be displayed
?>
---EXPECTF--
+--EXPECT--
Done
echo "Done\n"; // shouldn't be displayed
?>
---EXPECTF--
+--EXPECT--
Done
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
Done
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
Done
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
Done
echo "Done\n"; // shouldn't be displayed
?>
---EXPECTF--
+--EXPECT--
Done
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
Done
--EXPECT--
foo() will be called on shutdown...
foo
-
--EXPECT--
string(2) "2B"
string(2) "1A"
---UEXPECT--
-string(2) "2B"
-string(2) "1A"
$limit = $boundary+42;
-function test($a,$b)
+function test($a, $b)
{
var_dump($a === $b);
test2($a,$b);
} else {
echo "good";
}
-?>
+?>
--EXPECT--
good
} else {
echo "good";
}
-?>
+?>
--EXPECT--
good
echo "bad";
}
}
-?>
+?>
--EXPECT--
good
echo "$a $c ";
}
-Test();
+Test();
echo "$a $b $c ";
-Test();
+Test();
echo "$a $b $c ";
Test();
?>
*/
?>
-*** Testing assignments and variable aliasing: ***<br>
+*** Testing assignments and variable aliasing: ***<br />
<?php
/* This test tests assignments to variables using other variables as variable-names */
$a = "b";
$$$a = "blah";
${$$$a}["associative arrays work too"] = "this is nifty";
?>
-This should read "blah": <?php echo "$test<br>\n"; ?>
-This should read "this is nifty": <?php echo $blah[$test="associative arrays work too"]."<br>\n"; ?>
-*************************************************<br>
+This should read "blah": <?php echo "$test<br />\n"; ?>
+This should read "this is nifty": <?php echo $blah[$test="associative arrays work too"]."<br />\n"; ?>
+*************************************************<br />
-*** Testing integer operators ***<br>
+*** Testing integer operators ***<br />
<?php
/* test just about any operator possible on $i and $j (ints) */
$i = 5;
$j = 3;
?>
-Correct result - 8: <?php echo $i+$j; ?><br>
-Correct result - 8: <?php echo $i+$j; ?><br>
-Correct result - 2: <?php echo $i-$j; ?><br>
-Correct result - -2: <?php echo $j-$i; ?><br>
-Correct result - 15: <?php echo $i*$j; ?><br>
-Correct result - 15: <?php echo $j*$i; ?><br>
-Correct result - 2: <?php echo $i%$j; ?><br>
-Correct result - 3: <?php echo $j%$i; ?><br>
-*********************************<br>
+Correct result - 8: <?php echo $i+$j; ?><br />
+Correct result - 8: <?php echo $i+$j; ?><br />
+Correct result - 2: <?php echo $i-$j; ?><br />
+Correct result - -2: <?php echo $j-$i; ?><br />
+Correct result - 15: <?php echo $i*$j; ?><br />
+Correct result - 15: <?php echo $j*$i; ?><br />
+Correct result - 2: <?php echo $i%$j; ?><br />
+Correct result - 3: <?php echo $j%$i; ?><br />
+*********************************<br />
-*** Testing real operators ***<br>
+*** Testing real operators ***<br />
<?php
/* test just about any operator possible on $i and $j (floats) */
$i = 5.0;
$j = 3.0;
?>
-Correct result - 8: <?php echo $i+$j; ?><br>
-Correct result - 8: <?php echo $i+$j; ?><br>
-Correct result - 2: <?php echo $i-$j; ?><br>
-Correct result - -2: <?php echo $j-$i; ?><br>
-Correct result - 15: <?php echo $i*$j; ?><br>
-Correct result - 15: <?php echo $j*$i; ?><br>
-Correct result - 2: <?php echo $i%$j; ?><br>
-Correct result - 3: <?php echo $j%$i; ?><br>
-*********************************<br>
+Correct result - 8: <?php echo $i+$j; ?><br />
+Correct result - 8: <?php echo $i+$j; ?><br />
+Correct result - 2: <?php echo $i-$j; ?><br />
+Correct result - -2: <?php echo $j-$i; ?><br />
+Correct result - 15: <?php echo $i*$j; ?><br />
+Correct result - 15: <?php echo $j*$i; ?><br />
+Correct result - 2: <?php echo $i%$j; ?><br />
+Correct result - 3: <?php echo $j%$i; ?><br />
+*********************************<br />
-*** Testing if/elseif/else control ***<br>
+*** Testing if/elseif/else control ***<br />
<?php
/* sick if/elseif/else test by Andi :) */
$a = 5;
if ($a == "4") {
- echo "This "." does "." not "." work<br>\n";
+ echo "This "." does "." not "." work<br />\n";
} elseif ($a == "5") {
- echo "This "." works<br>\n";
+ echo "This "." works<br />\n";
$a = 6;
if ("andi" == ($test = "andi")) {
- echo "this_still_works<br>\n";
+ echo "this_still_works<br />\n";
} elseif (1) {
- echo "should_not_print<br>\n";
+ echo "should_not_print<br />\n";
} else {
- echo "should_not_print<br>\n";
+ echo "should_not_print<br />\n";
}
if (44 == 43) {
- echo "should_not_print<br>\n";
+ echo "should_not_print<br />\n";
} else {
- echo "should_print<br>\n";
+ echo "should_print<br />\n";
}
} elseif ($a == 6) {
- echo "this "."broken<br>\n";
+ echo "this "."broken<br />\n";
if (0) {
- echo "this_should_not_print<br>\n";
+ echo "this_should_not_print<br />\n";
} else {
- echo "TestingDanglingElse_This_Should_not_print<br>\n";
+ echo "TestingDanglingElse_This_Should_not_print<br />\n";
}
} else {
- echo "This "."does "." not"." work<br>\n";
+ echo "This "."does "." not"." work<br />\n";
}
?>
-*** Seriously nested if's test ***<br>
+*** Seriously nested if's test ***<br />
** spelling correction by kluzz **
<?php
/* yet another sick if/elseif/else test by Zeev */
$i=$j=0;
-echo "Only two lines of text should follow:<br>\n";
+echo "Only two lines of text should follow:<br />\n";
if (0) { /* this code is not supposed to be executed */
- echo "hmm, this shouldn't be displayed #1<br>\n";
+ echo "hmm, this shouldn't be displayed #1<br />\n";
$j++;
if (1) {
$i
$j = ++$i;
if (1) {
$j *= $i;
- echo "damn, this shouldn't be displayed<br>\n";
+ echo "damn, this shouldn't be displayed<br />\n";
} else {
$j /= $i;
++$j;
- echo "this shouldn't be displayed either<br>\n";
+ echo "this shouldn't be displayed either<br />\n";
}
} elseif (1) {
$i++; $j++;
- echo "this isn't supposed to be displayed<br>\n";
+ echo "this isn't supposed to be displayed<br />\n";
}
} elseif (0) {
$i++;
- echo "this definitely shouldn't be displayed<br>\n";
+ echo "this definitely shouldn't be displayed<br />\n";
} else {
--$j;
- echo "and this too shouldn't be displayed<br>\n";
+ echo "and this too shouldn't be displayed<br />\n";
while ($j>0) {
$j--;
}
}
} elseif (2-2) { /* as long as 2-2==0, this isn't supposed to be executed either */
$i = ++$j;
- echo "hmm, this shouldn't be displayed #2<br>\n";
+ echo "hmm, this shouldn't be displayed #2<br />\n";
if (1) {
$j = ++$i;
if (0) {
$j = $i*2+$j*($i++);
if (1) {
$i++;
- echo "damn, this shouldn't be displayed<br>\n";
+ echo "damn, this shouldn't be displayed<br />\n";
} else {
$j++;
- echo "this shouldn't be displayed either<br>\n";
+ echo "this shouldn't be displayed either<br />\n";
}
} else if (1) {
++$j;
- echo "this isn't supposed to be displayed<br>\n";
+ echo "this isn't supposed to be displayed<br />\n";
}
} elseif (0) {
$j++;
- echo "this definitely shouldn't be displayed<br>\n";
+ echo "this definitely shouldn't be displayed<br />\n";
} else {
$i++;
- echo "and this too shouldn't be displayed<br>\n";
+ echo "and this too shouldn't be displayed<br />\n";
}
} else {
$j=$i++; /* this should set $i to 1, but shouldn't change $j (it's assigned $i's previous values, zero) */
- echo "this should be displayed. should be: \$i=1, \$j=0. is: \$i=$i, \$j=$j<br>\n";
+ echo "this should be displayed. should be: \$i=1, \$j=0. is: \$i=$i, \$j=$j<br />\n";
if (1) {
$j += ++$i; /* ++$i --> $i==2, $j += 2 --> $j==2 */
if (0) {
$j += 40;
if (1) {
$i += 50;
- echo "damn, this shouldn't be displayed<br>\n";
+ echo "damn, this shouldn't be displayed<br />\n";
} else {
$j += 20;
- echo "this shouldn't be displayed either<br>\n";
+ echo "this shouldn't be displayed either<br />\n";
}
} else if (1) {
$j *= $i; /* $j *= 2 --> $j == 4 */
- echo "this is supposed to be displayed. should be: \$i=2, \$j=4. is: \$i=$i, \$j=$j<br>\n";
- echo "3 loop iterations should follow:<br>\n";
+ echo "this is supposed to be displayed. should be: \$i=2, \$j=4. is: \$i=$i, \$j=$j<br />\n";
+ echo "3 loop iterations should follow:<br />\n";
while ($i<=$j) {
- echo $i++." $j<br>\n";
+ echo $i++." $j<br />\n";
}
}
} elseif (0) {
- echo "this definitely shouldn't be displayed<br>\n";
+ echo "this definitely shouldn't be displayed<br />\n";
} else {
- echo "and this too shouldn't be displayed<br>\n";
+ echo "and this too shouldn't be displayed<br />\n";
}
- echo "**********************************<br>\n";
+ echo "**********************************<br />\n";
}
?>
-*** C-style else-if's ***<br>
+*** C-style else-if's ***<br />
<?php
/* looks like without we even tried, C-style else-if structure works fine! */
if ($a=0) {
- echo "This shouldn't be displayed<br>\n";
+ echo "This shouldn't be displayed<br />\n";
} else if ($a++) {
- echo "This shouldn't be displayed either<br>\n";
+ echo "This shouldn't be displayed either<br />\n";
} else if (--$a) {
- echo "No, this neither<br>\n";
+ echo "No, this neither<br />\n";
} else if (++$a) {
- echo "This should be displayed<br>\n";
+ echo "This should be displayed<br />\n";
} else {
- echo "This shouldn't be displayed at all<br>\n";
+ echo "This shouldn't be displayed at all<br />\n";
}
?>
-*************************<br>
+*************************<br />
-*** WHILE tests ***<br>
+*** WHILE tests ***<br />
<?php
$i=0;
$j=20;
while ($i<(2*$j)) {
if ($i>$j) {
- echo "$i is greater than $j<br>\n";
+ echo "$i is greater than $j<br />\n";
} else if ($i==$j) {
- echo "$i equals $j<br>\n";
+ echo "$i equals $j<br />\n";
} else {
- echo "$i is smaller than $j<br>\n";
+ echo "$i is smaller than $j<br />\n";
}
$i++;
}
?>
-*******************<br>
+*******************<br />
-*** Nested WHILEs ***<br>
+*** Nested WHILEs ***<br />
<?php
$arr_len=3;
$i++;
}
-echo "Each array variable should be equal to the sum of its indices:<br>\n";
+echo "Each array variable should be equal to the sum of its indices:<br />\n";
$i=0;
while ($i<$arr_len) {
while ($j<$arr_len) {
$k=0;
while ($k<$arr_len) {
- echo "\${test$i$j}[$k] = ".${"test$i$j"}[$k]."<br>\n";
+ echo "\${test$i$j}[$k] = ".${"test$i$j"}[$k]."<br />\n";
$k++;
}
$j++;
$i++;
}
?>
-*********************<br>
+*********************<br />
-*** hash test... ***<br>
+*** hash test... ***<br />
<?php
/*
$i=0;
$i=0;
while ($i<10000) {
- echo $arr[$i++]."<br>\n";
+ echo $arr[$i++]."<br />\n";
}
*/
echo "commented out...";
?>
-**************************<br>
+**************************<br />
-*** Hash resizing test ***<br>
+*** Hash resizing test ***<br />
<?php
$i = 10;
$a = 'b';
while ($i > 0) {
$a = $a . 'a';
- echo "$a<br>\n";
+ echo "$a<br />\n";
$resize[$a] = $i;
$i--;
}
$a = 'b';
while ($i > 0) {
$a = $a . 'a';
- echo "$a<br>\n";
- echo $resize[$a]."<br>\n";
+ echo "$a<br />\n";
+ echo $resize[$a]."<br />\n";
$i--;
}
?>
-**************************<br>
+**************************<br />
-*** break/continue test ***<br>
+*** break/continue test ***<br />
<?php
$i=0;
-echo "\$i should go from 0 to 2<br>\n";
+echo "\$i should go from 0 to 2<br />\n";
while ($i<5) {
if ($i>2) {
break;
}
$j=0;
- echo "\$j should go from 3 to 4, and \$q should go from 3 to 4<br>\n";
+ echo "\$j should go from 3 to 4, and \$q should go from 3 to 4<br />\n";
while ($j<5) {
if ($j<=2) {
$j++;
continue;
}
- echo " \$j=$j<br>\n";
+ echo " \$j=$j<br />\n";
for ($q=0; $q<=10; $q++) {
if ($q<3) {
continue;
if ($q>4) {
break;
}
- echo " \$q=$q<br>\n";
+ echo " \$q=$q<br />\n";
}
$j++;
}
$j=0;
- echo "\$j should go from 0 to 2<br>\n";
+ echo "\$j should go from 0 to 2<br />\n";
while ($j<5) {
if ($j>2) {
$k=0;
- echo "\$k should go from 0 to 2<br>\n";
+ echo "\$k should go from 0 to 2<br />\n";
while ($k<5) {
if ($k>2) {
break 2;
}
- echo " \$k=$k<br>\n";
+ echo " \$k=$k<br />\n";
$k++;
}
}
- echo " \$j=$j<br>\n";
+ echo " \$j=$j<br />\n";
$j++;
}
- echo "\$i=$i<br>\n";
+ echo "\$i=$i<br />\n";
$i++;
}
?>
-***********************<br>
+***********************<br />
-*** Nested file include test ***<br>
+*** Nested file include test ***<br />
<?php include("023-2.inc"); ?>
-********************************<br>
+********************************<br />
<?php
{
- echo "Tests completed.<br>\n"; # testing some PHP style comment...
+ echo "Tests completed.<br />\n"; # testing some PHP style comment...
}
?>
<html>
<head>
-*** Testing assignments and variable aliasing: ***<br>
-This should read "blah": blah<br>
-This should read "this is nifty": this is nifty<br>
-*************************************************<br>
+*** Testing assignments and variable aliasing: ***<br />
+This should read "blah": blah<br />
+This should read "this is nifty": this is nifty<br />
+*************************************************<br />
-*** Testing integer operators ***<br>
-Correct result - 8: 8<br>
-Correct result - 8: 8<br>
-Correct result - 2: 2<br>
-Correct result - -2: -2<br>
-Correct result - 15: 15<br>
-Correct result - 15: 15<br>
-Correct result - 2: 2<br>
-Correct result - 3: 3<br>
-*********************************<br>
+*** Testing integer operators ***<br />
+Correct result - 8: 8<br />
+Correct result - 8: 8<br />
+Correct result - 2: 2<br />
+Correct result - -2: -2<br />
+Correct result - 15: 15<br />
+Correct result - 15: 15<br />
+Correct result - 2: 2<br />
+Correct result - 3: 3<br />
+*********************************<br />
-*** Testing real operators ***<br>
-Correct result - 8: 8<br>
-Correct result - 8: 8<br>
-Correct result - 2: 2<br>
-Correct result - -2: -2<br>
-Correct result - 15: 15<br>
-Correct result - 15: 15<br>
-Correct result - 2: 2<br>
-Correct result - 3: 3<br>
-*********************************<br>
+*** Testing real operators ***<br />
+Correct result - 8: 8<br />
+Correct result - 8: 8<br />
+Correct result - 2: 2<br />
+Correct result - -2: -2<br />
+Correct result - 15: 15<br />
+Correct result - 15: 15<br />
+Correct result - 2: 2<br />
+Correct result - 3: 3<br />
+*********************************<br />
-*** Testing if/elseif/else control ***<br>
+*** Testing if/elseif/else control ***<br />
-This works<br>
-this_still_works<br>
-should_print<br>
+This works<br />
+this_still_works<br />
+should_print<br />
-*** Seriously nested if's test ***<br>
+*** Seriously nested if's test ***<br />
** spelling correction by kluzz **
-Only two lines of text should follow:<br>
-this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0<br>
-this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4<br>
-3 loop iterations should follow:<br>
-2 4<br>
-3 4<br>
-4 4<br>
-**********************************<br>
+Only two lines of text should follow:<br />
+this should be displayed. should be: $i=1, $j=0. is: $i=1, $j=0<br />
+this is supposed to be displayed. should be: $i=2, $j=4. is: $i=2, $j=4<br />
+3 loop iterations should follow:<br />
+2 4<br />
+3 4<br />
+4 4<br />
+**********************************<br />
-*** C-style else-if's ***<br>
-This should be displayed<br>
-*************************<br>
+*** C-style else-if's ***<br />
+This should be displayed<br />
+*************************<br />
-*** WHILE tests ***<br>
-0 is smaller than 20<br>
-1 is smaller than 20<br>
-2 is smaller than 20<br>
-3 is smaller than 20<br>
-4 is smaller than 20<br>
-5 is smaller than 20<br>
-6 is smaller than 20<br>
-7 is smaller than 20<br>
-8 is smaller than 20<br>
-9 is smaller than 20<br>
-10 is smaller than 20<br>
-11 is smaller than 20<br>
-12 is smaller than 20<br>
-13 is smaller than 20<br>
-14 is smaller than 20<br>
-15 is smaller than 20<br>
-16 is smaller than 20<br>
-17 is smaller than 20<br>
-18 is smaller than 20<br>
-19 is smaller than 20<br>
-20 equals 20<br>
-21 is greater than 20<br>
-22 is greater than 20<br>
-23 is greater than 20<br>
-24 is greater than 20<br>
-25 is greater than 20<br>
-26 is greater than 20<br>
-27 is greater than 20<br>
-28 is greater than 20<br>
-29 is greater than 20<br>
-30 is greater than 20<br>
-31 is greater than 20<br>
-32 is greater than 20<br>
-33 is greater than 20<br>
-34 is greater than 20<br>
-35 is greater than 20<br>
-36 is greater than 20<br>
-37 is greater than 20<br>
-38 is greater than 20<br>
-39 is greater than 20<br>
-*******************<br>
+*** WHILE tests ***<br />
+0 is smaller than 20<br />
+1 is smaller than 20<br />
+2 is smaller than 20<br />
+3 is smaller than 20<br />
+4 is smaller than 20<br />
+5 is smaller than 20<br />
+6 is smaller than 20<br />
+7 is smaller than 20<br />
+8 is smaller than 20<br />
+9 is smaller than 20<br />
+10 is smaller than 20<br />
+11 is smaller than 20<br />
+12 is smaller than 20<br />
+13 is smaller than 20<br />
+14 is smaller than 20<br />
+15 is smaller than 20<br />
+16 is smaller than 20<br />
+17 is smaller than 20<br />
+18 is smaller than 20<br />
+19 is smaller than 20<br />
+20 equals 20<br />
+21 is greater than 20<br />
+22 is greater than 20<br />
+23 is greater than 20<br />
+24 is greater than 20<br />
+25 is greater than 20<br />
+26 is greater than 20<br />
+27 is greater than 20<br />
+28 is greater than 20<br />
+29 is greater than 20<br />
+30 is greater than 20<br />
+31 is greater than 20<br />
+32 is greater than 20<br />
+33 is greater than 20<br />
+34 is greater than 20<br />
+35 is greater than 20<br />
+36 is greater than 20<br />
+37 is greater than 20<br />
+38 is greater than 20<br />
+39 is greater than 20<br />
+*******************<br />
-*** Nested WHILEs ***<br>
-Each array variable should be equal to the sum of its indices:<br>
-${test00}[0] = 0<br>
-${test00}[1] = 1<br>
-${test00}[2] = 2<br>
-${test01}[0] = 1<br>
-${test01}[1] = 2<br>
-${test01}[2] = 3<br>
-${test02}[0] = 2<br>
-${test02}[1] = 3<br>
-${test02}[2] = 4<br>
-${test10}[0] = 1<br>
-${test10}[1] = 2<br>
-${test10}[2] = 3<br>
-${test11}[0] = 2<br>
-${test11}[1] = 3<br>
-${test11}[2] = 4<br>
-${test12}[0] = 3<br>
-${test12}[1] = 4<br>
-${test12}[2] = 5<br>
-${test20}[0] = 2<br>
-${test20}[1] = 3<br>
-${test20}[2] = 4<br>
-${test21}[0] = 3<br>
-${test21}[1] = 4<br>
-${test21}[2] = 5<br>
-${test22}[0] = 4<br>
-${test22}[1] = 5<br>
-${test22}[2] = 6<br>
-*********************<br>
+*** Nested WHILEs ***<br />
+Each array variable should be equal to the sum of its indices:<br />
+${test00}[0] = 0<br />
+${test00}[1] = 1<br />
+${test00}[2] = 2<br />
+${test01}[0] = 1<br />
+${test01}[1] = 2<br />
+${test01}[2] = 3<br />
+${test02}[0] = 2<br />
+${test02}[1] = 3<br />
+${test02}[2] = 4<br />
+${test10}[0] = 1<br />
+${test10}[1] = 2<br />
+${test10}[2] = 3<br />
+${test11}[0] = 2<br />
+${test11}[1] = 3<br />
+${test11}[2] = 4<br />
+${test12}[0] = 3<br />
+${test12}[1] = 4<br />
+${test12}[2] = 5<br />
+${test20}[0] = 2<br />
+${test20}[1] = 3<br />
+${test20}[2] = 4<br />
+${test21}[0] = 3<br />
+${test21}[1] = 4<br />
+${test21}[2] = 5<br />
+${test22}[0] = 4<br />
+${test22}[1] = 5<br />
+${test22}[2] = 6<br />
+*********************<br />
-*** hash test... ***<br>
+*** hash test... ***<br />
commented out...
-**************************<br>
+**************************<br />
-*** Hash resizing test ***<br>
-ba<br>
-baa<br>
-baaa<br>
-baaaa<br>
-baaaaa<br>
-baaaaaa<br>
-baaaaaaa<br>
-baaaaaaaa<br>
-baaaaaaaaa<br>
-baaaaaaaaaa<br>
-ba<br>
-10<br>
-baa<br>
-9<br>
-baaa<br>
-8<br>
-baaaa<br>
-7<br>
-baaaaa<br>
-6<br>
-baaaaaa<br>
-5<br>
-baaaaaaa<br>
-4<br>
-baaaaaaaa<br>
-3<br>
-baaaaaaaaa<br>
-2<br>
-baaaaaaaaaa<br>
-1<br>
-**************************<br>
+*** Hash resizing test ***<br />
+ba<br />
+baa<br />
+baaa<br />
+baaaa<br />
+baaaaa<br />
+baaaaaa<br />
+baaaaaaa<br />
+baaaaaaaa<br />
+baaaaaaaaa<br />
+baaaaaaaaaa<br />
+ba<br />
+10<br />
+baa<br />
+9<br />
+baaa<br />
+8<br />
+baaaa<br />
+7<br />
+baaaaa<br />
+6<br />
+baaaaaa<br />
+5<br />
+baaaaaaa<br />
+4<br />
+baaaaaaaa<br />
+3<br />
+baaaaaaaaa<br />
+2<br />
+baaaaaaaaaa<br />
+1<br />
+**************************<br />
-*** break/continue test ***<br>
-$i should go from 0 to 2<br>
-$j should go from 3 to 4, and $q should go from 3 to 4<br>
- $j=3<br>
- $q=3<br>
- $q=4<br>
- $j=4<br>
- $q=3<br>
- $q=4<br>
-$j should go from 0 to 2<br>
- $j=0<br>
- $j=1<br>
- $j=2<br>
-$k should go from 0 to 2<br>
- $k=0<br>
- $k=1<br>
- $k=2<br>
-$i=0<br>
-$j should go from 3 to 4, and $q should go from 3 to 4<br>
- $j=3<br>
- $q=3<br>
- $q=4<br>
- $j=4<br>
- $q=3<br>
- $q=4<br>
-$j should go from 0 to 2<br>
- $j=0<br>
- $j=1<br>
- $j=2<br>
-$k should go from 0 to 2<br>
- $k=0<br>
- $k=1<br>
- $k=2<br>
-$i=1<br>
-$j should go from 3 to 4, and $q should go from 3 to 4<br>
- $j=3<br>
- $q=3<br>
- $q=4<br>
- $j=4<br>
- $q=3<br>
- $q=4<br>
-$j should go from 0 to 2<br>
- $j=0<br>
- $j=1<br>
- $j=2<br>
-$k should go from 0 to 2<br>
- $k=0<br>
- $k=1<br>
- $k=2<br>
-$i=2<br>
-***********************<br>
+*** break/continue test ***<br />
+$i should go from 0 to 2<br />
+$j should go from 3 to 4, and $q should go from 3 to 4<br />
+ $j=3<br />
+ $q=3<br />
+ $q=4<br />
+ $j=4<br />
+ $q=3<br />
+ $q=4<br />
+$j should go from 0 to 2<br />
+ $j=0<br />
+ $j=1<br />
+ $j=2<br />
+$k should go from 0 to 2<br />
+ $k=0<br />
+ $k=1<br />
+ $k=2<br />
+$i=0<br />
+$j should go from 3 to 4, and $q should go from 3 to 4<br />
+ $j=3<br />
+ $q=3<br />
+ $q=4<br />
+ $j=4<br />
+ $q=3<br />
+ $q=4<br />
+$j should go from 0 to 2<br />
+ $j=0<br />
+ $j=1<br />
+ $j=2<br />
+$k should go from 0 to 2<br />
+ $k=0<br />
+ $k=1<br />
+ $k=2<br />
+$i=1<br />
+$j should go from 3 to 4, and $q should go from 3 to 4<br />
+ $j=3<br />
+ $q=3<br />
+ $q=4<br />
+ $j=4<br />
+ $q=3<br />
+ $q=4<br />
+$j should go from 0 to 2<br />
+ $j=0<br />
+ $j=1<br />
+ $j=2<br />
+$k should go from 0 to 2<br />
+ $k=0<br />
+ $k=1<br />
+ $k=2<br />
+$i=2<br />
+***********************<br />
-*** Nested file include test ***<br>
+*** Nested file include test ***<br />
<html>
This is Finish.phtml. This file is supposed to be included
from regression_test.phtml. This is normal HTML.
and this is PHP code, 2+2=4
</html>
-********************************<br>
+********************************<br />
-Tests completed.<br>
+Tests completed.<br />
Limor Ullmann is now Limor Baruch :I
echo (float)"3.14", "\n";
?>
---EXPECT--
-3,14
---UEXPECTF--
-Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale functions in %s on line %d
+--EXPECTF--
+Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale functions in %s034.php on line %d
3,14
}
try {
- ThrowException();
+ ThrowException();
} catch (MyException $exception) {
print "There was an exception: " . $exception->getException();
print "\n";
?>
===DONE===
<?php exit(0); ?>
---EXPECTF--
-string(15) "Error2Exception"
-string(5) "fopen"
-===DONE===
---UEXPECTF--
+--EXPECT--
unicode(15) "Error2Exception"
unicode(5) "fopen"
===DONE===
?>
===DONE===
---EXPECTF--
+--EXPECT--
Catchable
===DONE===
--TEST--
Bug #18872 (class constant used as default parameter)
--FILE--
-<?php
-class FooBar {
- const BIFF = 3;
-}
-
-function foo($biff = FooBar::BIFF) {
- echo $biff . "\n";
-}
-
-foo();
-foo();
-?>
+<?php
+class FooBar {
+ const BIFF = 3;
+}
+
+function foo($biff = FooBar::BIFF) {
+ echo $biff . "\n";
+}
+
+foo();
+foo();
+?>
--EXPECT--
3
3
7 -- 7
8 -- 8
9 -- 9
-string(10) "0123456780"
---UEXPECT--
-0 -- 0
-1 -- 1
-2 -- 2
-3 -- 3
-4 -- 4
-5 -- 5
-6 -- 6
-7 -- 7
-8 -- 8
-9 -- 9
unicode(10) "0123456780"
?>
--EXPECTF--
[1024] errstr: test, errfile: %s, errline: %d
-
?>
--EXPECTF--
Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 4
-array(1) {
- ["foo"]=>
- string(4) "test"
-}
-
-Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 11
-array(1) {
- ["foo"]=>
- string(4) "test"
-}
---UEXPECTF--
-Strict Standards: Only variables should be assigned by reference in %sbug21600.php on line 4
array(1) {
[u"foo"]=>
unicode(4) "test"
var_dump($x->bars[0]->whosdrunk());
?>
--EXPECT--
-string(14) "The old Tavern"
---UEXPECT--
unicode(14) "The old Tavern"
?>
--EXPECTF--
Deprecated: Assigning the return value of new by reference is deprecated in %s on line %d
-object(foo)#%d (1) {
- ["fubar"]=>
- string(5) "fubar"
-}
-string(5) "fubar"
-string(5) "fubar"
-object(foo)#%d (1) {
- ["fubar"]=>
- string(5) "fubar"
-}
-string(5) "fubar"
-string(5) "fubar"
---UEXPECTF--
-Deprecated: Assigning the return value of new by reference is deprecated in %s on line %d
object(foo)#%d (1) {
[u"fubar"]=>
unicode(5) "fubar"
$result{-1} = 'a';
?>
--EXPECT--
-string(5) "* *-*"
-string(7) "* *-* *"
-string(7) "*4*-* *"
-string(7) "*4*s* *"
-string(8) "*4*s* *0"
-string(8) "*-*-* *0"
-string(8) "*-*s*s*0"
-string(8) "4-4s4s*0"
-string(9) "4-4s4s505"
-string(9) "454s4s505"
-string(1) "-"
-string(1) "s"
-string(1) "4"
-string(1) "5"
-string(1) "5"
-[Illegal string offset: -1]
---UEXPECT--
unicode(5) "* *-*"
unicode(7) "* *-* *"
unicode(7) "*4*-* *"
var_dump(current($arr));
?>
--EXPECT--
-string(3) "one"
-bool(false)
---UEXPECT--
unicode(3) "one"
bool(false)
?>
--EXPECTF--
-Fatal error: Cannot re-assign $this in %s on line %d
\ No newline at end of file
+Fatal error: Cannot re-assign $this in %s on line %d
?>
--EXPECT--
-array(1) {
- [123]=>
- array(1) {
- [0]=>
- string(4) "SEGV"
- }
-}
-Done
---UEXPECT--
array(1) {
[123]=>
array(1) {
}
}
Done
-
printf("decimal_point: %s\n", $lc['decimal_point']);
printf("thousands_sep: %s\n", $lc['thousands_sep']);
?>
---EXPECT--
-decimal_point: ,
-thousands_sep: .
---UEXPECTF--
+--EXPECTF--
Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale functions in %s on line %d
Deprecated: localeconv(): deprecated in Unicode mode, please use ICU locale functions in %s on line %d
ob_end_clean();
?>
---EXPECTF--
+--EXPECTF--
Fatal error: Uncaught exception 'Exception' in %s:%d
Stack trace:
#0 [internal function]: output_handler('', %d)
eval("echo 'Hello'; // comment");
echo " World";
//last line comment
---EXPECTF--
+--EXPECT--
Hello World
echo "ALIVE!\n";
?>
--EXPECTF--
-array(5) {
- [0]=>
- int(4096)
- [1]=>
- string(%d) "Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_002.php on line %d and defined"
- [2]=>
- string(%d) "%scatchable_error_002.php"
- [3]=>
- int(5)
- [4]=>
- array(0) {
- }
-}
-ALIVE!
---UEXPECTF--
array(5) {
[0]=>
int(4096)
require_once 'include_files/eval.inc';
?>
--EXPECT--
-Included!
\ No newline at end of file
+Included!
<?php
echo "foo\n";
?>
---EXPECTF--
+--EXPECT--
foo
$s = ob_get_clean();
var_dump($s);
-var_dump(unicode_decode($s, unicode_semantics()?"utf8":"latin1"));
+var_dump(unicode_decode($s, "utf8"));
?>
--EXPECTF--
-string(10) "%s"
-unicode(10) "%s"
---UEXPECTF--
string(14) "%s"
unicode(10) "%s"
--FILE--
abc
--EXPECT--
-abc
\ No newline at end of file
+abc
%f
%s
%x
-%c
\ No newline at end of file
+%c
--FILE--
abcde12314235xyz34264768286abcde
--EXPECTREGEX--
-[abcde]+[0-5]*xyz[2-8]+abcde
\ No newline at end of file
+[abcde]+[0-5]*xyz[2-8]+abcde
var_dump(ini_get('arg_separator.input'));
?>
--EXPECT--
-string(1) "="
---UEXPECT--
unicode(1) "="
var_dump($php_errormsg);
?>
--EXPECTF--
-string(1) "1"
-string(5) "16383"
-string(1) "0"
-string(1) "1"
-string(1) "0"
-NULL
-string(%d) "%sivision by zer%s"
---UEXPECTF--
unicode(1) "1"
unicode(5) "16383"
unicode(1) "0"
?>
--EXPECTF--
%s: %sivision by zero in %s on line %d
-string(1) "1"
-string(4) "4095"
-string(1) "0"
-string(1) "1"
-string(1) "0"
-string(%d) "%sivision by zer%s"
-string(%d) "%sivision by zer%s"
---UEXPECTF--
-%s: %sivision by zero in %s on line %d
unicode(1) "1"
unicode(4) "4095"
unicode(1) "0"
var_dump($php_errormsg);
?>
--EXPECTF--
-string(1) "1"
-string(5) "16383"
-string(1) "0"
-string(1) "1"
-string(1) "0"
-NULL
-string(%d) "%sivision by zer%s"
---UEXPECTF--
unicode(1) "1"
unicode(5) "16383"
unicode(1) "0"
Warning: chdir(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
bool(false)
*** Finished testing open_basedir configuration [chdir] ***
-
bool(true)
bool(true)
*** Finished testing open_basedir configuration [chmod] ***
-
bool(true)
bool(true)
*** Finished testing open_basedir configuration [copy] ***
-
Warning: unlink(copy.txt): No such file or directory in %s on line %d
bool(false)
*** Finished testing open_basedir configuration [copy] ***
-
Warning: dir(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-Warning: dir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d
-bool(false)
-object(Directory)#%d (2) {
- ["path"]=>
- string(%d) "%s/test/ok/"
- ["handle"]=>
- resource(%d) of type (stream)
-}
-object(Directory)#%d (2) {
- ["path"]=>
- string(%d) "%s/test/ok"
- ["handle"]=>
- resource(%d) of type (stream)
-}
-object(Directory)#%d (2) {
- ["path"]=>
- string(%d) "%s/test/ok/../ok"
- ["handle"]=>
- resource(%d) of type (stream)
-}
-*** Finished testing open_basedir configuration [dir] ***
---UEXPECTF--
-*** Testing open_basedir configuration [dir] ***
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-
-Warning: dir(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: dir(../bad): failed to open dir: Operation not permitted in %s on line %d
-bool(false)
-
-Warning: dir(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: dir(../bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d
-bool(false)
-
-Warning: dir(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: dir(..): failed to open dir: Operation not permitted in %s on line %d
-bool(false)
-
-Warning: dir(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: dir(../): failed to open dir: Operation not permitted in %s on line %d
-bool(false)
-
-Warning: dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: dir(/): failed to open dir: Operation not permitted in %s on line %d
-bool(false)
-
-Warning: dir(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: dir(../bad/.): failed to open dir: Operation not permitted in %s on line %d
-bool(false)
-
-Warning: dir(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: dir(%s/test/bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d
-bool(false)
-
-Warning: dir(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-
Warning: dir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d
bool(false)
object(Directory)#%d (2) {
resource(%d) of type (stream)
}
*** Finished testing open_basedir configuration [dir] ***
-
Warning: ini_set(): open_basedir restriction in effect. File(%s/test/bad.txt) is not within the allowed path(s): (.) in %s on line %d
bool(false)
-Warning: ini_set(): open_basedir restriction in effect. File(%s/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-string(0) ""
-string(%d) "%s/test/ok/ok.txt"
-*** Finished testing open_basedir configuration [error_log] ***
---UEXPECTF--
-*** Testing open_basedir configuration [error_log] ***
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-
-Warning: ini_set(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
-Warning: ini_set(): open_basedir restriction in effect. File(%s/test/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
Warning: ini_set(): open_basedir restriction in effect. File(%s/bad.txt) is not within the allowed path(s): (.) in %s on line %d
bool(false)
unicode(0) ""
unicode(%d) "%s/test/ok/ok.txt"
*** Finished testing open_basedir configuration [error_log] ***
-
bool(false)
bool(true)
*** Finished testing open_basedir configuration [error_log] ***
-
string(12) "Hello World!"
}
*** Finished testing open_basedir configuration [file] ***
-
bool(true)
bool(true)
*** Finished testing open_basedir configuration [file_exists] ***
-
Warning: file_put_contents%s/test/bad/bad.txt): failed to open stream: Operation not permitted in %s on line %d
bool(false)
*** Finished testing open_basedir configuration [file_put_contents] ***
-
int(%d)
int(%d)
*** Finished testing open_basedir configuration [fileatime] ***
-
int(%d)
int(%d)
*** Finished testing open_basedir configuration [filectime] ***
-
int(%d)
int(%d)
*** Finished testing open_basedir configuration [filegroup] ***
-
int(%d)
int(%d)
*** Finished testing open_basedir configuration [fileinode] ***
-
int(%d)
int(%d)
*** Finished testing open_basedir configuration [filemtime] ***
-
int(%d)
int(%d)
*** Finished testing open_basedir configuration [fileowner] ***
-
int(%d)
int(%d)
*** Finished testing open_basedir configuration [fileperms] ***
-
int(%d)
int(%d)
*** Finished testing open_basedir configuration [filesize] ***
-
Warning: filetype(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
bool(false)
-Warning: filetype(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-string(3) "dir"
-string(4) "file"
-string(4) "file"
-string(4) "file"
-string(4) "file"
-*** Finished testing open_basedir configuration [filetype] ***
---UEXPECTF--
-*** Testing open_basedir configuration [filetype] ***
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-
-Warning: filetype(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
-Warning: filetype(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
-Warning: filetype(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
-Warning: filetype(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
-Warning: filetype(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
-Warning: filetype(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
-Warning: filetype(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
-Warning: filetype(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
Warning: filetype(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
bool(false)
unicode(3) "dir"
unicode(4) "file"
unicode(4) "file"
*** Finished testing open_basedir configuration [filetype] ***
-
resource(%d) of type (stream)
resource(%d) of type (stream)
*** Finished testing open_basedir configuration [fopen] ***
-
bool(false)
bool(false)
bool(false)
-array(1) {
- [0]=>
- string(5) "../ok"
-}
-array(1) {
- [0]=>
- string(6) "ok.txt"
-}
-array(1) {
- [0]=>
- string(12) "../ok/ok.txt"
-}
-array(1) {
- [0]=>
- string(%d) "%s/test/ok/ok.txt"
-}
-array(1) {
- [0]=>
- string(%d) "%s/test/ok/../ok/ok.txt"
-}
-*** Finished testing open_basedir configuration [glob] ***
---UEXPECTF--
-*** Testing open_basedir configuration [glob] ***
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(false)
-bool(false)
-bool(false)
-array(0) {
-}
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
array(1) {
[0]=>
unicode(5) "../ok"
unicode(%d) "%s/test/ok/../ok/ok.txt"
}
*** Finished testing open_basedir configuration [glob] ***
-
bool(false)
bool(false)
bool(false)
-array(1) {
- [0]=>
- string(5) "../ok"
-}
-array(1) {
- [0]=>
- string(6) "ok.txt"
-}
-array(1) {
- [0]=>
- string(12) "../ok/ok.txt"
-}
-array(1) {
- [0]=>
- string(%d) "%s/test/ok/ok.txt"
-}
-array(1) {
- [0]=>
- string(%d) "%s/test/ok/../ok/ok.txt"
-}
-*** Finished testing open_basedir configuration [glob] ***
---UEXPECTF--
-*** Testing open_basedir configuration [glob] ***
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-bool(false)
array(1) {
[0]=>
unicode(5) "../ok"
unicode(%d) "%s/test/ok/../ok/ok.txt"
}
*** Finished testing open_basedir configuration [glob] ***
-
bool(false)
bool(false)
*** Finished testing open_basedir configuration [is_dir] ***
-
bool(true)
bool(true)
*** Finished testing open_basedir configuration [is_file] ***
-
bool(false)
bool(false)
*** Finished testing open_basedir configuration [is_link] ***
-
bool(true)
bool(true)
*** Finished testing open_basedir configuration [is_readable] ***
-
bool(true)
bool(true)
*** Finished testing open_basedir configuration [is_writable] ***
-
bool(true)
bool(true)
*** Finished testing open_basedir configuration [link] ***
-
Warning: unlink(): open_basedir restriction in effect. File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
bool(false)
*** Finished testing open_basedir configuration [linkinfo] ***
-
bool(true)
bool(true)
*** Finished testing open_basedir configuration [lstat] ***
-
resource(%d) of type (stream)
resource(%d) of type (stream)
*** Finished testing open_basedir configuration [opendir] ***
-
array(0) {
}
*** Finished testing open_basedir configuration [parse_ini_file] ***
-
Warning: unlink(): open_basedir restriction in effect. File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
bool(false)
*** Finished testing open_basedir configuration [readlink] ***
-
bool(true)
bool(true)
bool(true)
-string(%d) "%s\test\bad"
-string(%d) "%s\test\bad\bad.txt"
-string(%d) "%s\test"
-string(%d) "%s\test"
-string(%d) "%s"
-string(%d) "%s\test\bad"
-string(%d) "%s\test\bad\bad.txt"
-string(%d) "%s\test\bad\bad.txt"
-string(%d) "%s\test"
-string(%d) "%s\test\ok"
-string(%d) "%s\test\ok\ok.txt"
-string(%d) "%s\test\ok\ok.txt"
-string(%d) "%s\test\ok\ok.txt"
-string(%d) "%s\test\ok\ok.txt"
-*** Finished testing open_basedir configuration [realpath] ***
---UEXPECTF--
-*** Testing open_basedir configuration [realpath] ***
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
unicode(%d) "%s\test\bad"
unicode(%d) "%s\test\bad\bad.txt"
unicode(%d) "%s\test"
unicode(%d) "%s\test\ok\ok.txt"
unicode(%d) "%s\test\ok\ok.txt"
*** Finished testing open_basedir configuration [realpath] ***
-
Warning: rename(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
bool(false)
*** Finished testing open_basedir configuration [rename] ***
-
Warning: rmdir(): open_basedir restriction in effect. File(%s/test/bad) is not within the allowed path(s): (.) in %s on line %d
bool(false)
*** Finished testing open_basedir configuration [rmdir] ***
-
Warning: scandir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d
-Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- string(1) "."
- [1]=>
- string(2) ".."
- [2]=>
- string(6) "ok.txt"
-}
-array(3) {
- [0]=>
- string(1) "."
- [1]=>
- string(2) ".."
- [2]=>
- string(6) "ok.txt"
-}
-array(3) {
- [0]=>
- string(1) "."
- [1]=>
- string(2) ".."
- [2]=>
- string(6) "ok.txt"
-}
-*** Finished testing open_basedir configuration [scandir] ***
---UEXPECTF--
-*** Testing open_basedir configuration [scandir] ***
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-
-Warning: scandir(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: scandir(../bad): failed to open dir: Operation not permitted in %s on line %d
-
-Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
-bool(false)
-
-Warning: scandir(): open_basedir restriction in effect. File(../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: scandir(../bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d
-
-Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
-bool(false)
-
-Warning: scandir(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: scandir(..): failed to open dir: Operation not permitted in %s on line %d
-
-Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
-bool(false)
-
-Warning: scandir(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line 80
-
-Warning: scandir(../): failed to open dir: Operation not permitted in %s on line %d
-
-Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
-bool(false)
-
-Warning: scandir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: scandir(/): failed to open dir: Operation not permitted in %s on line %d
-
-Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
-bool(false)
-
-Warning: scandir(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: scandir(../bad/.): failed to open dir: Operation not permitted in %s on line %d
-
-Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
-bool(false)
-
-Warning: scandir(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: scandir(%s/test/bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d
-
-Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
-bool(false)
-
-Warning: scandir(): open_basedir restriction in effect. File(%s/test/bad/../bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
-
-Warning: scandir(%s/test/bad/../bad/bad.txt): failed to open dir: Operation not permitted in %s on line %d
-
Warning: scandir(): (errno 1): Operation not permitted in %s on line %d
bool(false)
array(3) {
unicode(6) "ok.txt"
}
*** Finished testing open_basedir configuration [scandir] ***
-
bool(true)
bool(true)
*** Finished testing open_basedir configuration [stat] ***
-
bool(true)
bool(true)
*** Finished testing open_basedir configuration [symlink] ***
-
Warning: tempnam(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
bool(false)
-Warning: tempnam(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-string(%d) "%s"
-bool(true)
-*** Finished testing open_basedir configuration [tempnam] ***
---UEXPECTF--
-*** Testing open_basedir configuration [tempnam] ***
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-
-Warning: tempnam(): open_basedir restriction in effect. File(../bad) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
-Warning: tempnam(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
-Warning: tempnam(): open_basedir restriction in effect. File(../) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
-Warning: tempnam(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
-Warning: tempnam(): open_basedir restriction in effect. File(../bad/.) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
-
Warning: tempnam(): open_basedir restriction in effect. File(./../.) is not within the allowed path(s): (.) in %s on line %d
bool(false)
unicode(%d) "%s"
bool(true)
*** Finished testing open_basedir configuration [tempnam] ***
-
bool(true)
bool(true)
*** Finished testing open_basedir configuration [touch] ***
-
Warning: unlink(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
bool(false)
*** Finished testing open_basedir configuration [unlink] ***
-
?>
--EXPECT--
-string(6) "abcdef"
-string(6) "abcdef"
-string(6) "a*c*e*"
-string(6) "a*c*e*"
---UEXPECT--
unicode(6) "abcdef"
unicode(6) "abcdef"
unicode(6) "a*c*e*"
--TEST--
Script encoding autodetection (SCSU)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
Script encoding autodetection (UTF-16BE)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
Script encoding autodetection (UTF-16LE)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
Script encoding autodetection (UTF-32BE)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
Script encoding autodetection (UTF-32LE)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
Script encoding autodetection (UTF7)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
Script encoding autodetection (UTF8)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
Script encoding (HZ)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
Script encoding (ISO-2022-KR)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
Script encoding (JIS)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
Script encoding (SJIS)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
declare script encoding (HZ)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
declare script encoding (ISO-2022-KR)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
declare script encoding (JIS)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
declare script encoding (SJIS)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--INI--
unicode.output_encoding=CP866
--FILE--
--TEST--
Unicode: strpos() function test
---INI--
-unicode.semantics=on
--FILE--
<?php
$a = "a™ᄒ\U020021z";
--TEST--
Unicode: strpos() function test
---INI--
-unicode.semantics=on
--FILE--
<?php
$a = "a™ᄒ\U020021z";
--TEST--
Unicode identifiers normalization (${})
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--FILE--
<?php
${"\u212B"} = "ok\n";
--TEST--
Unicode identifiers normalization ($$)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--FILE--
<?php
$a = "\u212B";
--TEST--
Unicode identifiers normalization (indirect function call)
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--FILE--
<?php
declare(encoding = "ISO-8859-1");
--TEST--
Unicode identifiers normalization ($GLOBALS[])
---SKIPIF--
-<?php if (!unicode_semantics()) die('skip unicode.semantics=off'); ?>
--FILE--
<?php
$GLOBALS["\u212B"] = "ok\n";