Test engine is improved to support unicode mode

This commit is contained in:
Dmitry Stogov 2005-08-15 14:37:55 +00:00
parent 7061405249
commit 08fe0d1da3
122 changed files with 11948 additions and 23 deletions

View File

@ -32,3 +32,20 @@ string(3) "foo"
'foo'
string(3) "foo"
'foo'
--UEXPECTF--
unicode(3) "foo"
'foo'
unicode(3) "foo"
'foo'
unicode(3) "foo"
'foo'
unicode(3) "foo"
'foo'
unicode(3) "foo"
'foo'
unicode(3) "foo"
'foo'
unicode(3) "foo"
'foo'
unicode(3) "foo"
'foo'

View File

@ -10,3 +10,5 @@ foo();
?>
--EXPECT--
string(1) "a"
--UEXPECT--
unicode(1) "a"

View File

@ -16,4 +16,8 @@ array(1) {
["public"]=>
string(6) "public"
}
--UEXPECT--
array(1) {
[u"public"]=>
unicode(6) "public"
}

View File

@ -70,3 +70,40 @@ array(1) {
int(1)
}
===DONE===
--UEXPECT--
Base::__construct
array(3) {
[u"Foo"]=>
int(1)
[u"Bar"]=>
int(2)
[u"Baz"]=>
int(3)
}
array(1) {
[u"Foo"]=>
int(1)
}
Base::__construct
array(3) {
[u"Baz"]=>
int(4)
[u"Foo"]=>
int(1)
[u"Bar"]=>
int(2)
}
Child::__construct
array(3) {
[u"Baz"]=>
int(4)
[u"Foo"]=>
int(1)
[u"Bar"]=>
int(2)
}
array(1) {
[u"Foo"]=>
int(1)
}
===DONE===

View File

@ -63,3 +63,21 @@ string(2) "A2"
string(2) "C2"
string(2) "C2"
===DONE===
--UEXPECTF--
===INIT===
unicode(1) "A"
unicode(1) "C"
unicode(1) "C"
===SetA===
unicode(2) "A2"
unicode(1) "C"
unicode(1) "C"
===SetB===
unicode(2) "A2"
unicode(2) "B2"
unicode(2) "B2"
===SetC===
unicode(2) "A2"
unicode(2) "C2"
unicode(2) "C2"
===DONE===

View File

@ -72,3 +72,26 @@ int(5)
Overloaded::__get(z)
int(6)
===DONE===
--UEXPECTF--
object(Object)#%d (1) {
[u"x"]=>
int(2)
}
int(2)
int(3)
Overloaded::__set(y,3)
int(3)
Overloaded::__get(y)
int(3)
Overloaded::__set(z,Object id #3)
object(Object)#%d (1) {
[u"x"]=>
int(4)
}
Overloaded::__get(z)
int(4)
Overloaded::__get(z)
int(5)
Overloaded::__get(z)
int(6)
===DONE===

View File

@ -29,3 +29,20 @@ array(2) {
}
}
===DONE===
--UEXPECT--
array(2) {
[u"empty"]=>
array(0) {
}
[u"three"]=>
array(3) {
[0]=>
int(1)
[u"b"]=>
unicode(1) "c"
[3]=>
array(0) {
}
}
}
===DONE===

View File

@ -39,3 +39,13 @@ NULL
string(4) "Base"
Fatal error: Cannot access private property ChildClass::$private_child in %sbug29674.php on line %d
--UEXPECTF--
===BASE===
unicode(4) "Base"
Notice: Undefined property: BaseClass::$private_child in %sbug29674.php on line %d
NULL
===CHILD===
unicode(4) "Base"
Fatal error: Cannot access private property ChildClass::$private_child in %sbug29674.php on line %d

View File

@ -28,3 +28,10 @@ string(1) "z"
string(1) "x"
string(1) "y"
string(1) "z"
--UEXPECT--
unicode(1) "x"
unicode(1) "y"
unicode(1) "z"
unicode(1) "x"
unicode(1) "y"
unicode(1) "z"

View File

@ -50,3 +50,12 @@ object(hariCow)#1 (2) {
["y"]=>
string(1) "y"
}
--UEXPECTF--
Notice: Undefined variable: db in %sbug30162.php on line 35
NULL
object(hariCow)#1 (2) {
[u"x"]=>
unicode(1) "x"
[u"y"]=>
unicode(1) "y"
}

View File

@ -16,3 +16,7 @@ haricow();
string(3) "one"
string(3) "one"
===DONE===
--UEXPECT--
unicode(3) "one"
unicode(3) "one"
===DONE===

View File

@ -37,3 +37,18 @@ object(bar)#1 (6) {
["c6"]=>
int(1)
}
--UEXPECT--
object(bar)#1 (6) {
[u"c1"]=>
int(1)
[u"c2"]=>
int(2)
[u"c3"]=>
int(1)
[u"c4"]=>
int(2)
[u"c5"]=>
int(1)
[u"c6"]=>
int(1)
}

View File

@ -95,3 +95,30 @@ NULL
string(2) "ok"
string(2) "ok"
---
--UEXPECT--
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
NULL
unicode(2) "ok"
unicode(2) "ok"
---
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
unicode(2) "ok"
NULL
unicode(2) "ok"
unicode(2) "ok"
---

View File

@ -19,3 +19,9 @@ object(test)#1 (1) {
["c"]=>
int(2)
}
--UEXPECT--
2
object(test)#1 (1) {
[u"c"]=>
int(2)
}

View File

@ -23,3 +23,16 @@ object(stdClass)#%d (1) {
int(0)
}
}
--UEXPECTF--
Strict Standards: Creating default object from empty value in %sbug33243.php on line 2
Strict Standards: Implicit cloning object of class 'stdClass' because of 'zend.ze1_compatibility_mode' in %sbug33243.php on line 3
Strict Standards: Implicit cloning object of class 'stdClass' because of 'zend.ze1_compatibility_mode' in %sbug33243.php on line 5
object(stdClass)#%d (1) {
[u"y"]=>
object(stdClass)#%d (1) {
[u"z"]=>
int(0)
}
}

View File

@ -28,3 +28,14 @@ int(1)
Notice: Object of class Foo could not be converted to double in %sbug33999.php on line 12
float(1)
--UEXPECTF--
object(Foo)#1 (1) {
[u"bar"]=>
unicode(3) "bat"
}
Notice: Object of class Foo could not be converted to int in %sbug33999.php on line 9
int(1)
Notice: Object of class Foo could not be converted to double in %sbug33999.php on line 12
float(1)

View File

@ -32,4 +32,10 @@ array(1) {
}
Fatal error: Cannot use [] for reading in %sbug34064.php on line 18
--UEXPECTF--
array(1) {
[0]=>
unicode(2) "ok"
}
Fatal error: Cannot use [] for reading in %sbug34064.php on line 18

View File

@ -19,3 +19,13 @@ array(1) {
string(2) "ok"
}
ok
--UEXPECT--
array(1) {
[u"default"]=>
unicode(2) "ok"
}
array(1) {
[u"default"]=>
unicode(2) "ok"
}
ok

View File

@ -47,3 +47,27 @@ array(3) {
string(1) "C"
}
}
--UEXPECT--
array(3) {
[0]=>
array(2) {
[u"id"]=>
unicode(1) "1"
[u"val"]=>
unicode(1) "A"
}
[1]=>
array(2) {
[u"id"]=>
unicode(1) "2"
[u"val"]=>
unicode(1) "B"
}
[2]=>
array(2) {
[u"id"]=>
unicode(1) "3"
[u"val"]=>
unicode(1) "C"
}
}

View File

@ -47,3 +47,27 @@ array(3) {
string(1) "C"
}
}
--UEXPECT--
array(3) {
[0]=>
array(2) {
[0]=>
unicode(1) "1"
[1]=>
unicode(1) "A"
}
[1]=>
array(2) {
[0]=>
unicode(1) "2"
[1]=>
unicode(1) "B"
}
[2]=>
array(2) {
[0]=>
unicode(1) "3"
[1]=>
unicode(1) "C"
}
}

View File

@ -59,3 +59,39 @@ array(3) {
string(1) "C"
}
}
--UEXPECT--
array(3) {
[0]=>
array(4) {
[u"id"]=>
unicode(1) "1"
[0]=>
unicode(1) "1"
[u"val"]=>
unicode(1) "A"
[1]=>
unicode(1) "A"
}
[1]=>
array(4) {
[u"id"]=>
unicode(1) "2"
[0]=>
unicode(1) "2"
[u"val"]=>
unicode(1) "B"
[1]=>
unicode(1) "B"
}
[2]=>
array(4) {
[u"id"]=>
unicode(1) "3"
[0]=>
unicode(1) "3"
[u"val"]=>
unicode(1) "C"
[1]=>
unicode(1) "C"
}
}

View File

@ -47,3 +47,27 @@ array(3) {
string(1) "C"
}
}
--UEXPECTF--
array(3) {
[0]=>
object(stdClass)#%d (2) {
[u"id"]=>
unicode(1) "1"
[u"val"]=>
unicode(1) "A"
}
[1]=>
object(stdClass)#%d (2) {
[u"id"]=>
unicode(1) "2"
[u"val"]=>
unicode(1) "B"
}
[2]=>
object(stdClass)#%d (2) {
[u"id"]=>
unicode(1) "3"
[u"val"]=>
unicode(1) "C"
}
}

View File

@ -151,3 +151,106 @@ array(3) {
string(2) "CC"
}
}
--UEXPECTF--
array(3) {
[0]=>
object(stdClass)#%d (3) {
[u"id"]=>
unicode(1) "1"
[u"val"]=>
unicode(1) "A"
[u"val2"]=>
unicode(2) "AA"
}
[1]=>
object(stdClass)#%d (3) {
[u"id"]=>
unicode(1) "2"
[u"val"]=>
unicode(1) "B"
[u"val2"]=>
unicode(2) "BB"
}
[2]=>
object(stdClass)#%d (3) {
[u"id"]=>
unicode(1) "3"
[u"val"]=>
unicode(1) "C"
[u"val2"]=>
unicode(2) "CC"
}
}
array(3) {
[0]=>
object(TestBase)#%d (3) {
[u"id"]=>
unicode(1) "1"
[u"val":protected]=>
unicode(1) "A"
[u"val2":u"TestBase":private]=>
unicode(2) "AA"
}
[1]=>
object(TestBase)#%d (3) {
[u"id"]=>
unicode(1) "2"
[u"val":protected]=>
unicode(1) "B"
[u"val2":u"TestBase":private]=>
unicode(2) "BB"
}
[2]=>
object(TestBase)#%d (3) {
[u"id"]=>
unicode(1) "3"
[u"val":protected]=>
unicode(1) "C"
[u"val2":u"TestBase":private]=>
unicode(2) "CC"
}
}
TestDerived::__construct(0,1)
TestDerived::__construct(1,2)
TestDerived::__construct(2,3)
array(3) {
[0]=>
object(TestDerived)#%d (5) {
[u"row":protected]=>
int(0)
[u"id"]=>
unicode(1) "1"
[u"val":protected]=>
unicode(1) "A"
[u"val2":u"TestBase":private]=>
NULL
[u"val2"]=>
unicode(2) "AA"
}
[1]=>
object(TestDerived)#%d (5) {
[u"row":protected]=>
int(1)
[u"id"]=>
unicode(1) "2"
[u"val":protected]=>
unicode(1) "B"
[u"val2":u"TestBase":private]=>
NULL
[u"val2"]=>
unicode(2) "BB"
}
[2]=>
object(TestDerived)#%d (5) {
[u"row":protected]=>
int(2)
[u"id"]=>
unicode(1) "3"
[u"val":protected]=>
unicode(1) "C"
[u"val2":u"TestBase":private]=>
NULL
[u"val2"]=>
unicode(2) "CC"
}
}

View File

@ -74,3 +74,50 @@ array(2) {
}
}
}
--UEXPECT--
array(2) {
[u"A"]=>
array(2) {
[0]=>
array(1) {
[0]=>
unicode(1) "1"
}
[1]=>
array(1) {
[0]=>
unicode(1) "2"
}
}
[u"C"]=>
array(1) {
[0]=>
array(1) {
[0]=>
unicode(1) "3"
}
}
}
array(2) {
[u"A"]=>
array(2) {
[0]=>
array(1) {
[u"id"]=>
unicode(1) "1"
}
[1]=>
array(1) {
[u"id"]=>
unicode(1) "2"
}
}
[u"C"]=>
array(1) {
[0]=>
array(1) {
[u"id"]=>
unicode(1) "3"
}
}
}

View File

@ -62,3 +62,38 @@ array(3) {
string(1) "C"
}
}
--UEXPECT--
array(3) {
[u"A"]=>
array(1) {
[0]=>
unicode(1) "A"
}
[u"B"]=>
array(1) {
[0]=>
unicode(1) "A"
}
[u"C"]=>
array(1) {
[0]=>
unicode(1) "C"
}
}
array(3) {
[u"A"]=>
array(1) {
[u"val"]=>
unicode(1) "A"
}
[u"B"]=>
array(1) {
[u"val"]=>
unicode(1) "A"
}
[u"C"]=>
array(1) {
[u"val"]=>
unicode(1) "C"
}
}

View File

@ -37,3 +37,16 @@ array(2) {
string(1) "C"
}
}
--UEXPECT--
array(2) {
[u"A"]=>
array(1) {
[0]=>
unicode(1) "B"
}
[u"C"]=>
array(1) {
[0]=>
unicode(1) "C"
}
}

View File

@ -128,3 +128,75 @@ array(4) {
string(1) "D"
}
}
--UEXPECTF--
array(4) {
[0]=>
array(3) {
[0]=>
unicode(8) "stdClass"
[1]=>
unicode(1) "1"
[2]=>
unicode(1) "A"
}
[1]=>
array(3) {
[0]=>
unicode(5) "Test1"
[1]=>
unicode(1) "2"
[2]=>
unicode(1) "B"
}
[2]=>
array(3) {
[0]=>
unicode(5) "Test2"
[1]=>
unicode(1) "3"
[2]=>
unicode(1) "C"
}
[3]=>
array(3) {
[0]=>
NULL
[1]=>
unicode(1) "4"
[2]=>
unicode(1) "D"
}
}
Test1::__construct()
Test2::__construct()
Test3::__construct()
array(4) {
[0]=>
object(stdClass)#%d (2) {
[u"id"]=>
unicode(1) "1"
[u"val"]=>
unicode(1) "A"
}
[1]=>
object(Test1)#%d (2) {
[u"id"]=>
unicode(1) "2"
[u"val"]=>
unicode(1) "B"
}
[2]=>
object(Test2)#%d (2) {
[u"id"]=>
unicode(1) "3"
[u"val"]=>
unicode(1) "C"
}
[3]=>
object(Test3)#%d (2) {
[u"id"]=>
unicode(1) "4"
[u"val"]=>
unicode(1) "D"
}
}

View File

@ -116,3 +116,62 @@ array(2) {
string(1) "D"
}
}
--UEXPECTF--
Test1::__construct()
Test2::__construct()
Test3::__construct()
array(2) {
[u"Group1"]=>
array(2) {
[0]=>
object(stdClass)#%d (2) {
[u"id"]=>
unicode(1) "1"
[u"val"]=>
unicode(1) "A"
}
[1]=>
object(Test1)#%d (2) {
[u"id"]=>
unicode(1) "2"
[u"val"]=>
unicode(1) "B"
}
}
[u"Group2"]=>
array(2) {
[0]=>
object(Test2)#%d (2) {
[u"id"]=>
unicode(1) "3"
[u"val"]=>
unicode(1) "C"
}
[1]=>
object(Test3)#%d (2) {
[u"id"]=>
unicode(1) "4"
[u"val"]=>
unicode(1) "D"
}
}
}
Test1::__construct()
Test2::__construct()
Test3::__construct()
array(2) {
[u"Group1"]=>
object(Test1)#%d (2) {
[u"id"]=>
unicode(1) "2"
[u"val"]=>
unicode(1) "B"
}
[u"Group2"]=>
object(Test3)#%d (2) {
[u"id"]=>
unicode(1) "4"
[u"val"]=>
unicode(1) "D"
}
}

View File

@ -242,3 +242,167 @@ array(4) {
string(1) "D"
}
}
--UEXPECTF--
DerivedStatement::__construct(Overloaded)
Test1::__construct(0,0)
test(1,N/A)
test(2,N/A)
test(3,N/A)
test(4,N/A)
array(2) {
[u"Group1"]=>
array(2) {
[0]=>
array(1) {
[1]=>
unicode(3) "N/A"
}
[1]=>
array(1) {
[2]=>
unicode(3) "N/A"
}
}
[u"Group2"]=>
array(2) {
[0]=>
array(1) {
[3]=>
unicode(3) "N/A"
}
[1]=>
array(1) {
[4]=>
unicode(3) "N/A"
}
}
}
test(1,A)
test(2,B)
test(3,C)
test(4,D)
array(4) {
[0]=>
array(1) {
[1]=>
unicode(1) "A"
}
[1]=>
array(1) {
[2]=>
unicode(1) "B"
}
[2]=>
array(1) {
[3]=>
unicode(1) "C"
}
[3]=>
array(1) {
[4]=>
unicode(1) "D"
}
}
Test1::factory(1,A)
Test1::__construct(1,A)
Test1::factory(2,B)
Test1::__construct(2,B)
Test1::factory(3,C)
Test1::__construct(3,C)
Test1::factory(4,D)
Test1::__construct(4,D)
array(4) {
[0]=>
object(Test1)#%d (2) {
[u"id"]=>
unicode(1) "1"
[u"val"]=>
unicode(1) "A"
}
[1]=>
object(Test1)#%d (2) {
[u"id"]=>
unicode(1) "2"
[u"val"]=>
unicode(1) "B"
}
[2]=>
object(Test1)#%d (2) {
[u"id"]=>
unicode(1) "3"
[u"val"]=>
unicode(1) "C"
}
[3]=>
object(Test1)#%d (2) {
[u"id"]=>
unicode(1) "4"
[u"val"]=>
unicode(1) "D"
}
}
Test1::factory(1,A)
Test1::__construct(1,A)
Test1::factory(2,B)
Test1::__construct(2,B)
Test1::factory(3,C)
Test1::__construct(3,C)
Test1::factory(4,D)
Test1::__construct(4,D)
array(4) {
[0]=>
object(Test1)#%d (2) {
[u"id"]=>
unicode(1) "1"
[u"val"]=>
unicode(1) "A"
}
[1]=>
object(Test1)#%d (2) {
[u"id"]=>
unicode(1) "2"
[u"val"]=>
unicode(1) "B"
}
[2]=>
object(Test1)#%d (2) {
[u"id"]=>
unicode(1) "3"
[u"val"]=>
unicode(1) "C"
}
[3]=>
object(Test1)#%d (2) {
[u"id"]=>
unicode(1) "4"
[u"val"]=>
unicode(1) "D"
}
}
unicode(16) "DerivedStatement"
DerivedStatement::retrieve(1,A)
DerivedStatement::retrieve(2,B)
DerivedStatement::retrieve(3,C)
DerivedStatement::retrieve(4,D)
array(4) {
[0]=>
array(1) {
[1]=>
unicode(1) "A"
}
[1]=>
array(1) {
[2]=>
unicode(1) "B"
}
[2]=>
array(1) {
[3]=>
unicode(1) "C"
}
[3]=>
array(1) {
[4]=>
unicode(1) "D"
}
}

View File

@ -95,3 +95,56 @@ array(2) {
string(6) "Group2"
}
}
--UEXPECTF--
array(2) {
[0]=>
array(2) {
[0]=>
unicode(1) "A"
[1]=>
unicode(6) "Group1"
}
[1]=>
array(2) {
[0]=>
unicode(1) "B"
[1]=>
unicode(6) "Group2"
}
}
Test::__construct(N/A)
Test::__construct(N/A)
array(2) {
[0]=>
object(Test)#%d (2) {
[u"val"]=>
unicode(1) "A"
[u"grp"]=>
unicode(6) "Group1"
}
[1]=>
object(Test)#%d (2) {
[u"val"]=>
unicode(1) "B"
[u"grp"]=>
unicode(6) "Group2"
}
}
Test::__construct(Changed)
Test::__construct(Changed)
array(2) {
[0]=>
object(Test)#%d (2) {
[u"val"]=>
unicode(1) "A"
[u"grp"]=>
unicode(6) "Group1"
}
[1]=>
object(Test)#%d (2) {
[u"val"]=>
unicode(1) "B"
[u"grp"]=>
unicode(6) "Group2"
}
}

View File

@ -93,3 +93,44 @@ object(Test)#%d (2) {
["grp"]=>
string(6) "Group2"
}
--UEXPECTF--
array(2) {
[0]=>
unicode(1) "A"
[1]=>
unicode(6) "Group1"
}
array(2) {
[0]=>
unicode(1) "B"
[1]=>
unicode(6) "Group2"
}
Test::__construct(N/A)
object(Test)#%d (2) {
[u"val"]=>
unicode(1) "A"
[u"grp"]=>
unicode(6) "Group1"
}
Test::__construct(N/A)
object(Test)#%d (2) {
[u"val"]=>
unicode(1) "B"
[u"grp"]=>
unicode(6) "Group2"
}
Test::__construct(WOW)
object(Test)#%d (2) {
[u"val"]=>
unicode(1) "A"
[u"grp"]=>
unicode(6) "Group1"
}
Test::__construct(WOW)
object(Test)#%d (2) {
[u"val"]=>
unicode(1) "B"
[u"grp"]=>
unicode(6) "Group2"
}

View File

@ -99,3 +99,34 @@ array(2) {
[1]=>
string(6) "Group2"
}
--UEXPECTF--
Test::__construct(WOW)
object(Test)#4 (2) {
[u"val"]=>
unicode(1) "A"
[u"grp"]=>
unicode(6) "Group1"
}
Test::__construct(WOW)
object(Test)#6 (2) {
[u"val"]=>
unicode(1) "B"
[u"grp"]=>
unicode(6) "Group2"
}
NULL
bool(false)
PDOStatementAggregate::__construct
PDOStatementAggregate::getIterator
array(2) {
[0]=>
unicode(1) "A"
[1]=>
unicode(6) "Group1"
}
array(2) {
[0]=>
unicode(1) "B"
[1]=>
unicode(6) "Group2"
}

View File

@ -97,3 +97,61 @@ array(1) {
string(2) "B2"
}
}
--UEXPECT--
array(2) {
[0]=>
unicode(1) "1"
[1]=>
unicode(1) "2"
}
array(2) {
[0]=>
unicode(2) "A2"
[1]=>
unicode(2) "B2"
}
array(2) {
[1]=>
array(1) {
[0]=>
unicode(1) "A"
}
[2]=>
array(1) {
[0]=>
unicode(1) "A"
}
}
array(2) {
[1]=>
unicode(1) "A"
[2]=>
unicode(1) "A"
}
array(2) {
[1]=>
unicode(1) "1"
[2]=>
unicode(1) "2"
}
array(2) {
[1]=>
unicode(1) "A"
[2]=>
unicode(1) "A"
}
array(2) {
[1]=>
unicode(2) "A2"
[2]=>
unicode(2) "B2"
}
array(1) {
[u"A"]=>
array(2) {
[0]=>
unicode(2) "A2"
[1]=>
unicode(2) "B2"
}
}

View File

@ -196,3 +196,98 @@ string(1) "2"
string(7) "String0"
string(7) "String1"
string(7) "String2"
--UXPECT--
unicode(1) "3"
array(3) {
[0]=>
unicode(7) "String0"
[1]=>
unicode(7) "String1"
[2]=>
unicode(7) "String2"
}
===WHILE===
array(1) {
[0]=>
unicode(7) "String0"
}
array(1) {
[1]=>
unicode(7) "String1"
}
array(1) {
[2]=>
unicode(7) "String2"
}
===ALONE===
array(1) {
[0]=>
unicode(7) "String0"
}
bool(true)
bool(true)
bool(true)
bool(true)
array(1) {
[0]=>
unicode(7) "String0"
}
array(1) {
[1]=>
unicode(7) "String1"
}
bool(true)
bool(true)
bool(true)
bool(true)
array(1) {
[1]=>
unicode(7) "String1"
}
array(1) {
[2]=>
unicode(7) "String2"
}
bool(true)
bool(true)
bool(true)
bool(true)
array(1) {
[2]=>
unicode(7) "String2"
}
===REBIND/SAME===
array(1) {
[0]=>
unicode(7) "String0"
}
bool(true)
bool(true)
unicode(7) "String0"
bool(true)
bool(true)
unicode(1) "0"
array(1) {
[1]=>
unicode(7) "String1"
}
bool(true)
bool(true)
unicode(7) "String1"
bool(true)
bool(true)
unicode(1) "1"
array(1) {
[2]=>
unicode(7) "String2"
}
bool(true)
bool(true)
unicode(7) "String2"
bool(true)
bool(true)
unicode(1) "2"
===REBIND/CONFLICT===
unicode(7) "String0"
unicode(7) "String1"
unicode(7) "String2"

View File

@ -196,3 +196,98 @@ string(1) "2"
string(7) "String0"
string(7) "String1"
string(7) "String2"
--UEXPECT--
unicode(1) "3"
array(3) {
[0]=>
unicode(7) "String0"
[1]=>
unicode(7) "String1"
[2]=>
unicode(7) "String2"
}
===WHILE===
array(1) {
[0]=>
unicode(7) "String0"
}
array(1) {
[1]=>
unicode(7) "String1"
}
array(1) {
[2]=>
unicode(7) "String2"
}
===ALONE===
array(1) {
[0]=>
unicode(7) "String0"
}
bool(true)
bool(true)
bool(true)
bool(true)
array(1) {
[0]=>
unicode(7) "String0"
}
array(1) {
[1]=>
unicode(7) "String1"
}
bool(true)
bool(true)
bool(true)
bool(true)
array(1) {
[1]=>
unicode(7) "String1"
}
array(1) {
[2]=>
unicode(7) "String2"
}
bool(true)
bool(true)
bool(true)
bool(true)
array(1) {
[2]=>
unicode(7) "String2"
}
===REBIND/SAME===
array(1) {
[0]=>
unicode(7) "String0"
}
bool(true)
bool(true)
unicode(7) "String0"
bool(true)
bool(true)
unicode(1) "0"
array(1) {
[1]=>
unicode(7) "String1"
}
bool(true)
bool(true)
unicode(7) "String1"
bool(true)
bool(true)
unicode(1) "1"
array(1) {
[2]=>
unicode(7) "String2"
}
bool(true)
bool(true)
unicode(7) "String2"
bool(true)
bool(true)
unicode(1) "2"
===REBIND/CONFLICT===
unicode(7) "String0"
unicode(7) "String1"
unicode(7) "String2"

View File

@ -267,3 +267,116 @@ array(3) {
string(7) "Private"
}
}
--UEXPECTF--
unicode(1) "3"
array(3) {
[0]=>
unicode(8) "stdClass"
[1]=>
unicode(8) "TestBase"
[2]=>
unicode(11) "TestDerived"
}
===TYPES===
array(4) {
[u"stdClass"]=>
unicode(1) "0"
[u"TestBase"]=>
unicode(1) "1"
[u"TestDerived"]=>
unicode(1) "2"
[u"TestLeaf"]=>
NULL
}
===INSERT===
TestBase::serialize() = 'a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}'
TestDerived::serialize()
TestBase::serialize() = 'a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}'
TestDerived::serialize()
TestBase::serialize() = 'a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}'
===DATA===
array(4) {
[0]=>
unicode(0) ""
[1]=>
unicode(91) "a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}"
[2]=>
unicode(144) "a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}"
[3]=>
unicode(144) "a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}"
}
===FAILURE===
Exception:SQLSTATE[HY000]: General error: cannot unserialize class
===COUNT===
unicode(1) "3"
===DATABASE===
array(3) {
[0]=>
array(2) {
[u"name"]=>
unicode(8) "TestBase"
[u"val"]=>
unicode(91) "a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";}"
}
[1]=>
array(2) {
[u"name"]=>
unicode(11) "TestDerived"
[u"val"]=>
unicode(144) "a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}"
}
[2]=>
array(2) {
[u"name"]=>
NULL
[u"val"]=>
unicode(144) "a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";}"
}
}
===FETCHCLASS===
TestBase::unserialize(a:3:{s:7:"BasePub";s:6:"Public";s:7:"BasePro";s:9:"Protected";s:7:"BasePri";s:7:"Private";})
TestDerived::unserialize()
TestBase::unserialize(a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";})
TestDerived::unserialize()
TestBase::unserialize(a:4:{s:7:"BasePub";s:13:"DerivedPublic";s:7:"BasePro";s:16:"DerivdeProtected";s:10:"DerivedPub";s:6:"Public";s:10:"DerivedPro";s:9:"Protected";})
array(3) {
[0]=>
object(TestBase)#%d (3) {
[u"BasePub"]=>
unicode(7) "#Public"
[u"BasePro":protected]=>
unicode(10) "#Protected"
[u"BasePri":u"TestBase":private]=>
unicode(8) "#Private"
}
[1]=>
object(TestDerived)#%d (6) {
[u"BasePub"]=>
unicode(14) "#DerivedPublic"
[u"BasePro":protected]=>
unicode(17) "#DerivdeProtected"
[u"DerivedPub"]=>
unicode(7) "#Public"
[u"DerivedPro":protected]=>
unicode(10) "#Protected"
[u"DerivedPri":u"TestDerived":private]=>
unicode(7) "Private"
[u"BasePri":u"TestBase":private]=>
unicode(7) "Private"
}
[2]=>
object(TestLeaf)#%d (6) {
[u"BasePub"]=>
unicode(14) "#DerivedPublic"
[u"BasePro":protected]=>
unicode(17) "#DerivdeProtected"
[u"DerivedPub"]=>
unicode(7) "#Public"
[u"DerivedPro":protected]=>
unicode(10) "#Protected"
[u"DerivedPri":u"TestDerived":private]=>
unicode(7) "Private"
[u"BasePri":u"TestBase":private]=>
unicode(7) "Private"
}
}

View File

@ -68,3 +68,32 @@ array(1) {
[3]=>
string(7) "String3"
}
--UEXPECT--
unicode(1) "4"
array(4) {
[0]=>
unicode(7) "String0"
[1]=>
unicode(7) "String1"
[2]=>
unicode(7) "String2"
[3]=>
unicode(7) "String3"
}
===WHILE===
array(1) {
[0]=>
unicode(7) "String0"
}
array(1) {
[1]=>
unicode(7) "String1"
}
array(1) {
[2]=>
unicode(7) "String2"
}
array(1) {
[3]=>
unicode(7) "String3"
}

View File

@ -109,3 +109,39 @@ array(2) {
}
PDOStatementX::__destruct()
PDODatabaseX::__destruct()
--UEXPECTF--
int(1)
int(2)
object(PDODatabaseX)#%d (2) {
[u"test1"]=>
int(1)
[u"test2"]=>
int(22)
}
PDODatabaseX::query()
PDOStatementX::__construct()
PDOStatementX::__destruct()
PDODatabaseX::query()
PDOStatementX::__construct()
PDOStatementX::__destruct()
PDODatabaseX::query()
PDOStatementX::__construct()
PDOStatementX::__destruct()
PDODatabaseX::query()
PDOStatementX::__construct()
object(PDOStatementX)#%d (3) {
[u"test1"]=>
int(1)
[u"queryString"]=>
unicode(24) "SELECT val, id FROM test"
[u"test2"]=>
int(22)
}
array(2) {
[u"A"]=>
unicode(1) "0"
[u"B"]=>
unicode(1) "1"
}
PDOStatementX::__destruct()
PDODatabaseX::__destruct()

View File

@ -110,3 +110,55 @@ object(Test)#%d (3) {
===FAIL===
Fatal error: Cannot access protected property Fail::$id in %spdo_025.php on line %d
--UEXPECTF--
object(Test)#%d (3) {
[u"id"]=>
unicode(2) "10"
[u"val"]=>
unicode(3) "Abc"
[u"val2"]=>
unicode(3) "zxy"
}
object(Test)#%d (3) {
[u"id"]=>
unicode(2) "20"
[u"val"]=>
unicode(3) "Def"
[u"val2"]=>
unicode(3) "wvu"
}
object(Test)#%d (3) {
[u"id"]=>
unicode(2) "30"
[u"val"]=>
unicode(3) "Ghi"
[u"val2"]=>
unicode(3) "tsr"
}
object(Test)#%d (3) {
[u"id"]=>
unicode(2) "40"
[u"val"]=>
unicode(3) "Jkl"
[u"val2"]=>
unicode(3) "qpo"
}
object(Test)#%d (3) {
[u"id"]=>
unicode(2) "50"
[u"val"]=>
unicode(3) "Mno"
[u"val2"]=>
unicode(3) "nml"
}
object(Test)#%d (3) {
[u"id"]=>
unicode(2) "60"
[u"val"]=>
unicode(3) "Pqr"
[u"val2"]=>
unicode(3) "kji"
}
===FAIL===
Fatal error: Cannot access protected property Fail::$id in %spdo_025.php on line %d

View File

@ -108,3 +108,37 @@ array(3) {
===DONE===
PDODatabase::__destruct()
PDOStatementX::__destruct()
--UEXPECT--
unicode(11) "PDODatabase"
unicode(12) "PDOStatement"
PDODatabase::query()
PDOStatementX::__construct()
unicode(13) "PDOStatementX"
unicode(11) "PDODatabase"
array(3) {
[u"id"]=>
unicode(2) "10"
[u"val"]=>
unicode(3) "Abc"
[u"val2"]=>
unicode(3) "zxy"
}
array(3) {
[u"id"]=>
unicode(2) "20"
[u"val"]=>
unicode(3) "Def"
[u"val2"]=>
unicode(3) "wvu"
}
array(3) {
[u"id"]=>
unicode(2) "30"
[u"val"]=>
unicode(3) "Ghi"
[u"val2"]=>
unicode(3) "tsr"
}
===DONE===
PDODatabase::__destruct()
PDOStatementX::__destruct()

View File

@ -87,3 +87,14 @@ array(2) {
}
string(17) "ReflectionClassEx"
===DONE===
--UEXPECT--
array(0) {
}
array(2) {
[0]=>
unicode(3) "bla"
[1]=>
unicode(4) "name"
}
unicode(17) "ReflectionClassEx"
===DONE===

View File

@ -61,3 +61,16 @@ string(7) "getName"
string(3) "bar"
string(3) "baz"
===DONE===
--UEXPECTF--
ReflectionMethodEx::__construct
unicode(18) "ReflectionMethodEx"
unicode(7) "getName"
unicode(3) "xyz"
NULL
Cannot set read-only property ReflectionMethodEx::$class
Cannot set read-only property ReflectionMethodEx::$name
unicode(18) "ReflectionMethodEx"
unicode(7) "getName"
unicode(3) "bar"
unicode(3) "baz"
===DONE===

View File

@ -101,3 +101,20 @@ string(7) "updated"
EXCEPTION
EXCEPTION
===DONE===
--UEXPECT--
unicode(3) "pub"
unicode(3) "pub"
unicode(7) "updated"
EXCEPTION
EXCEPTION
unicode(7) "updated"
unicode(7) "updated"
unicede(7) "updated"
EXCEPTION
EXCEPTION
unicode(7) "updated"
unicode(7) "updated"
unicode(7) "updated"
EXCEPTION
EXCEPTION
===DONE===

View File

@ -23,3 +23,6 @@ var_dump($class->getName());
--EXPECT--
string(3) "Foo"
===DONE===
--UEXPECT--
unicode(3) "Foo"
===DONE===

View File

@ -29,3 +29,7 @@ $foo->testBAR();
string(7) "testBAR"
string(7) "testBAR"
===DONE===
--UEXPECTF--
unicode(7) "testBAR"
unicode(7) "testBAR"
===DONE===

View File

@ -18,3 +18,9 @@ array(1) {
string(4) "test"
}
===DONE===
--UEXPECT--
array(1) {
[u"a"]=>
unicode(4) "test"
}
===DONE===

View File

@ -28,7 +28,17 @@ array(1) {
[0]=>
array(1) {
["enabled"]=>
UNKNOWN:0
UNKNOWN:0 /* FIXME */
}
}
===DONE===
--UEXPECT--
unicode(4) "test"
array(1) {
[0]=>
array(1) {
[u"enabled"]=>
UNKNOWN:0 /* FIXME */
}
}
===DONE===

View File

@ -38,3 +38,8 @@ string(28) "Here we have some text data."
string(19) "And here some more."
string(15) "Wow once again."
---Done---
--UEXPECT--
unicode(28) "Here we have some text data."
unicode(19) "And here some more."
unicode(15) "Wow once again."
---Done---

View File

@ -78,3 +78,20 @@ string(10) "Bla bla 2."
string(5) "elem1"
string(10) "Bla bla 1."
===DONE===
--UEXPECT--
unicode(5) "elem1"
unicode(10) "Bla bla 1."
unicode(6) "elem11"
unicode(10) "Bla bla 2."
===CLONE===
unicode(5) "elem1"
unicode(10) "Bla bla 1."
unicode(6) "elem11"
unicode(10) "Bla bla 2."
===ELEMENT===
unicode(6) "elem11"
unicode(10) "Bla bla 2."
===COMMENT===
unicode(5) "elem1"
unicode(10) "Bla bla 1."
===DONE===

View File

@ -90,3 +90,47 @@ NULL
int(4)
int(4)
===Done===
--UEXPECTF--
===Property===
object(SimpleXMLElement)#%d (2) {
[u"comment"]=>
object(SimpleXMLElement)#%d (0) {
}
[u"elem2"]=>
object(SimpleXMLElement)#%d (1) {
[u"elem3"]=>
object(SimpleXMLElement)#%d (1) {
[u"elem4"]=>
object(SimpleXMLElement)#%d (1) {
[u"test"]=>
object(SimpleXMLElement)#%d (0) {
}
}
}
}
}
===Array===
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(5) "elem1"
}
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(5) "first"
}
===Set===
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(8) "Changed1"
}
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(2) "12"
}
===Unset===
NULL
NULL
===Misc.===
int(4)
int(4)
===Done===

View File

@ -43,3 +43,11 @@ string(6) "elem11"
string(16) "SimpleXMLElement"
string(10) "Bla bla 2."
===DONE===
--UEXPECT--
unicode(5) "elem1"
unicode(16) "SimpleXMLElement"
unicode(10) "Bla bla 1."
unicode(6) "elem11"
unicode(16) "SimpleXMLElement"
unicode(10) "Bla bla 2."
===DONE===

View File

@ -58,3 +58,31 @@ object(SimpleXMLElement)#%d (1) {
string(2) "35"
}
===DONE===
--UEXPECTF--
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(3) "Joe"
}
NULL
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(3) "XXX"
}
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(2) "30"
}
---Unset:---
---Unset?---
NULL
bool(false)
---Unsupported---
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(2) "30"
}
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(2) "35"
}
===DONE===

View File

@ -54,3 +54,28 @@ object(SimpleXMLElement)#%d (1) {
string(1) "5"
}
===DONE===
--UEXPECTF--
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(3) "Joe"
}
NULL
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(3) "XXX"
}
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(2) "30"
}
---Unset:---
---Unset?---
NULL
bool(false)
---Unsupported---
NULL
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(1) "5"
}
===DONE===

View File

@ -53,3 +53,27 @@ object(SimpleXMLElement)#%d (1) {
string(1) "5"
}
===DONE===
--UEXPECTF--
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(3) "Joe"
}
NULL
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(3) "XXX"
}
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(2) "30"
}
---Unset:---
---Unset?---
NULL
bool(false)
---Unsupported---
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(1) "5"
}
===DONE===

View File

@ -55,3 +55,30 @@ object(SimpleXMLElement)#%d (1) {
string(9) "JoeFooBar"
}
===DONE===
--UEXPECTF--
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(3) "Joe"
}
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(6) "JoeFoo"
}
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(9) "JoeFooBar"
}
---[0]---
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(3) "Joe"
}
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(6) "JoeFoo"
}
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(9) "JoeFooBar"
}
===DONE===

View File

@ -27,3 +27,13 @@ object(SimpleXMLElement)#%d (1) {
string(6) "FooBar"
}
===DONE===
--UEXPECTF--
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(3) "Foo"
}
object(SimpleXMLElement)#%d (1) {
[0]=>
unicode(6) "FooBar"
}
===DONE===

View File

@ -78,3 +78,20 @@ string(7) "Foo Bar"
string(5) "elem2"
string(28) "Here we have some text data."
===DONE===
--UEXPECT--
unicode(5) "elem1"
unicode(10) "Bla bla 1."
unicode(6) "elem11"
unicode(10) "Bla bla 2."
===CLONE===
unicode(5) "elem1"
unicode(10) "Bla bla 1."
unicode(6) "elem11"
unicode(10) "Bla bla 2."
===ELEMENT===
unicode(7) "elem111"
unicode(7) "Foo Bar"
===COMMENT===
unicode(5) "elem2"
unicode(28) "Here we have some text data."
===DONE===

View File

@ -101,3 +101,67 @@ object(ArrayObject)#1 (4) {
int(4)
}
===DONE===
--UEXPECTF--
object(ArrayObject)#1 (2) {
[0]=>
int(0)
[1]=>
int(1)
}
int(2)
int(3)
array(6) {
[0]=>
int(0)
[1]=>
int(1)
[2]=>
int(2)
[3]=>
int(3)
[4]=>
int(4)
[5]=>
int(5)
}
unicode(1) "a"
object(ArrayObject)#1 (5) {
[0]=>
int(0)
[1]=>
int(1)
[2]=>
int(2)
[3]=>
int(3)
[u"a"]=>
unicode(1) "a"
}
int(0)
Notice: Undefined offset: 6 in %sarray_001.php on line %d
NULL
Notice: Undefined index: b in %sarray_001.php on line %d
NULL
Notice: Undefined offset: 7 in %sarray_001.php on line %d
Notice: Undefined index: c in %sarray_001.php on line %d
object(ArrayObject)#1 (2) {
[0]=>
int(0)
[2]=>
int(2)
}
object(ArrayObject)#1 (4) {
[0]=>
int(0)
[2]=>
int(2)
[4]=>
unicode(1) "3"
[5]=>
int(4)
}
===DONE===

View File

@ -35,3 +35,17 @@ object(ArrayObject)#%d (5) {
string(4) "five"
}
===DONE===
--UEXPECTF--
object(ArrayObject)#%d (5) {
[1]=>
unicode(3) "one"
[2]=>
unicode(3) "two"
[3]=>
unicode(5) "three"
[4]=>
unicode(4) "four"
[5]=>
unicode(4) "five"
}
===DONE===

View File

@ -144,3 +144,82 @@ array(4) {
string(9) "changed 6"
}
===DONE===
--UEXPECTF--
array(4) {
[0]=>
unicode(3) "1st"
[1]=>
int(1)
[2]=>
unicode(3) "3rd"
[u"4th"]=>
int(4)
}
===EMPTY===
bool(false)
bool(false)
bool(false)
bool(false)
bool(true)
bool(true)
===isset===
bool(true)
bool(true)
bool(true)
bool(true)
bool(false)
bool(false)
===offsetGet===
unicode(3) "1st"
int(1)
unicode(3) "3rd"
int(4)
Notice: Undefined index: 5th in %sarray_010.php on line %d
NULL
Notice: Undefined offset: 6 in %sarray_010.php on line %d
NULL
===offsetSet===
WRITE 1
unicode(9) "Changed 1"
WRITE 2
unicode(11) "Changed 4th"
WRITE 3
unicode(9) "Added 5th"
WRITE 4
unicode(7) "Added 6"
unicode(3) "1st"
unicode(3) "3rd"
unicode(9) "changed 6"
unicode(9) "changed 6"
===unset===
array(6) {
[0]=>
unicode(3) "1st"
[1]=>
unicode(9) "Changed 1"
[2]=>
unicode(3) "3rd"
[u"4th"]=>
unicode(11) "Changed 4th"
[u"5th"]=>
unicode(9) "Added 5th"
[6]=>
unicode(9) "changed 6"
}
Notice: Undefined offset: 7 in %sarray_010.php on line %d
Notice: Undefined index: 8th in %sarray_010.php on line %d
array(4) {
[0]=>
unicode(3) "1st"
[1]=>
unicode(9) "Changed 1"
[u"5th"]=>
unicode(9) "Added 5th"
[6]=>
unicode(9) "changed 6"
}
===DONE===

View File

@ -35,3 +35,23 @@ array(2) {
int(3)
}
===DONE===
--UEXPECT--
array(2) {
[0]=>
unicode(3) "one"
[1]=>
int(1)
}
array(2) {
[0]=>
unicode(3) "two"
[1]=>
int(2)
}
array(2) {
[0]=>
unicode(5) "three"
[1]=>
int(3)
}
===DONE===

View File

@ -647,3 +647,518 @@ ArrayIteratorEx::setFlags(3)
int(1)
bool(true)
===DONE===
--UEXPECTF--
ArrayObjectEx::__construct()
===CHECK===
ArrayObjectEx::setFlags(0)
ArrayObjectEx::dump()
array(3) {
[u"Flags"]=>
int(0)
[u"OVars"]=>
array(2) {
[u"a"]=>
int(25)
[u"pub1"]=>
int(42)
}
[u"$this"]=>
object(ArrayObjectEx)#1 (3) {
[0]=>
int(1)
[u"a"]=>
int(25)
[u"pub1"]=>
int(42)
}
}
ArrayObjectEx::show()
ArrayObjectEx::getIterator()
ArrayIteratorEx::__construct()
ArrayIteratorEx::dump()
array(3) {
[u"Flags"]=>
int(0)
[u"OVars"]=>
array(2) {
[u"a"]=>
int(25)
[u"pub1"]=>
int(42)
}
[u"$this"]=>
object(ArrayIteratorEx)#2 (3) {
[0]=>
int(1)
[u"a"]=>
int(25)
[u"pub1"]=>
int(42)
}
}
array(1) {
[0]=>
int(1)
}
array(1) {
[u"a"]=>
int(25)
}
array(1) {
[u"pub1"]=>
int(42)
}
===FOREACH===
ArrayObjectEx::getIterator()
ArrayIteratorEx::__construct()
ArrayIteratorEx::dump()
array(3) {
[u"Flags"]=>
int(0)
[u"OVars"]=>
array(2) {
[u"a"]=>
int(25)
[u"pub1"]=>
int(42)
}
[u"$this"]=>
object(ArrayIteratorEx)#3 (3) {
[0]=>
int(1)
[u"a"]=>
int(25)
[u"pub1"]=>
int(42)
}
}
array(1) {
[0]=>
int(1)
}
array(1) {
[u"a"]=>
int(25)
}
array(1) {
[u"pub1"]=>
int(42)
}
===PROPERTY===
int(1)
bool(false)
ArrayObjectEx::setFlags(2)
int(1)
bool(true)
int(1)
bool(false)
ArrayIteratorEx::setFlags(2)
int(1)
bool(true)
===CHECK===
ArrayObjectEx::setFlags(1)
ArrayObjectEx::dump()
array(3) {
[u"Flags"]=>
int(1)
[u"OVars"]=>
array(5) {
[u"pub1"]=>
int(1)
[u"pro1"]=>
int(2)
[u"pri1"]=>
int(3)
[u"imp1"]=>
int(4)
[u"dyn1"]=>
int(5)
}
[u"$this"]=>
object(ArrayObjectEx)#1 (5) {
[u"pub1"]=>
int(1)
[u"pro1":protected]=>
int(2)
[u"pri1":u"ArrayObjectEx":private]=>
int(3)
[u"imp1"]=>
int(4)
[u"dyn1"]=>
int(5)
}
}
ArrayObjectEx::show()
ArrayObjectEx::getIterator()
ArrayIteratorEx::__construct()
ArrayIteratorEx::dump()
array(3) {
[u"Flags"]=>
int(1)
[u"OVars"]=>
array(5) {
[u"pub2"]=>
int(1)
[u"pro2"]=>
int(2)
[u"pri2"]=>
int(3)
[u"imp2"]=>
int(4)
[u"dyn2"]=>
int(5)
}
[u"$this"]=>
object(ArrayIteratorEx)#3 (5) {
[u"pub2"]=>
int(1)
[u"pro2":protected]=>
int(2)
[u"pri2":u"ArrayIteratorEx":private]=>
int(3)
[u"imp2"]=>
int(4)
[u"dyn2"]=>
int(5)
}
}
array(1) {
[0]=>
int(1)
}
array(1) {
[u"a"]=>
int(25)
}
array(1) {
[u"pub1"]=>
int(42)
}
===FOREACH===
ArrayObjectEx::getIterator()
ArrayIteratorEx::__construct()
ArrayIteratorEx::dump()
array(3) {
[u"Flags"]=>
int(1)
[u"OVars"]=>
array(5) {
[u"pub2"]=>
int(1)
[u"pro2"]=>
int(2)
[u"pri2"]=>
int(3)
[u"imp2"]=>
int(4)
[u"dyn2"]=>
int(5)
}
[u"$this"]=>
object(ArrayIteratorEx)#2 (5) {
[u"pub2"]=>
int(1)
[u"pro2":protected]=>
int(2)
[u"pri2":u"ArrayIteratorEx":private]=>
int(3)
[u"imp2"]=>
int(4)
[u"dyn2"]=>
int(5)
}
}
array(1) {
[0]=>
int(1)
}
array(1) {
[u"a"]=>
int(25)
}
array(1) {
[u"pub1"]=>
int(42)
}
===PROPERTY===
int(1)
bool(false)
ArrayObjectEx::setFlags(3)
int(1)
bool(true)
int(1)
bool(false)
ArrayIteratorEx::setFlags(3)
int(1)
bool(true)
#####EXCHANGE#####
ArrayObjectEx::exchange()
===CHECK===
ArrayObjectEx::setFlags(0)
ArrayObjectEx::dump()
array(3) {
[u"Flags"]=>
int(0)
[u"OVars"]=>
array(5) {
[u"pub1"]=>
int(1)
[u"pro1"]=>
int(2)
[u"pri1"]=>
int(3)
[u"imp1"]=>
int(4)
[u"dyn1"]=>
int(5)
}
[u"$this"]=>
object(ArrayObjectEx)#1 (5) {
[u"pub1"]=>
int(1)
[u"pro1":protected]=>
int(2)
[u"pri1":u"ArrayObjectEx":private]=>
int(3)
[u"imp1"]=>
int(4)
[u"dyn1"]=>
int(5)
}
}
ArrayObjectEx::show()
ArrayObjectEx::getIterator()
ArrayIteratorEx::__construct()
ArrayIteratorEx::dump()
array(3) {
[u"Flags"]=>
int(0)
[u"OVars"]=>
array(4) {
[u"pub1"]=>
int(1)
[u"pro1"]=>
int(2)
[u"imp1"]=>
int(4)
[u"dyn1"]=>
int(5)
}
[u"$this"]=>
object(ArrayIteratorEx)#2 (5) {
[u"pub1"]=>
int(1)
[u"pro1":protected]=>
int(2)
[u"pri1":u"ArrayObjectEx":private]=>
int(3)
[u"imp1"]=>
int(4)
[u"dyn1"]=>
int(5)
}
}
array(1) {
[u"pub1"]=>
int(1)
}
array(1) {
[u"imp1"]=>
int(4)
}
array(1) {
[u"dyn1"]=>
int(5)
}
===FOREACH===
ArrayObjectEx::getIterator()
ArrayIteratorEx::__construct()
ArrayIteratorEx::dump()
array(3) {
[u"Flags"]=>
int(0)
[u"OVars"]=>
array(4) {
[u"pub1"]=>
int(1)
[u"pro1"]=>
int(2)
[u"imp1"]=>
int(4)
[u"dyn1"]=>
int(5)
}
[u"$this"]=>
object(ArrayIteratorEx)#3 (5) {
[u"pub1"]=>
int(1)
[u"pro1":protected]=>
int(2)
[u"pri1":u"ArrayObjectEx":private]=>
int(3)
[u"imp1"]=>
int(4)
[u"dyn1"]=>
int(5)
}
}
array(1) {
[u"pub1"]=>
int(1)
}
array(1) {
[u"imp1"]=>
int(4)
}
array(1) {
[u"dyn1"]=>
int(5)
}
===PROPERTY===
int(1)
bool(false)
ArrayObjectEx::setFlags(2)
int(1)
bool(false)
int(1)
bool(false)
ArrayIteratorEx::setFlags(2)
int(1)
bool(true)
===CHECK===
ArrayObjectEx::setFlags(1)
ArrayObjectEx::dump()
array(3) {
[u"Flags"]=>
int(1)
[u"OVars"]=>
array(5) {
[u"pub1"]=>
int(1)
[u"pro1"]=>
int(2)
[u"pri1"]=>
int(3)
[u"imp1"]=>
int(4)
[u"dyn1"]=>
int(5)
}
[u"$this"]=>
object(ArrayObjectEx)#1 (5) {
[u"pub1"]=>
int(1)
[u"pro1":protected]=>
int(2)
[u"pri1":u"ArrayObjectEx":private]=>
int(3)
[u"imp1"]=>
int(4)
[u"dyn1"]=>
int(5)
}
}
ArrayObjectEx::show()
ArrayObjectEx::getIterator()
ArrayIteratorEx::__construct()
ArrayIteratorEx::dump()
array(3) {
[u"Flags"]=>
int(1)
[u"OVars"]=>
array(5) {
[u"pub2"]=>
int(1)
[u"pro2"]=>
int(2)
[u"pri2"]=>
int(3)
[u"imp2"]=>
int(4)
[u"dyn2"]=>
int(5)
}
[u"$this"]=>
object(ArrayIteratorEx)#3 (5) {
[u"pub2"]=>
int(1)
[u"pro2":protected]=>
int(2)
[u"pri2":u"ArrayIteratorEx":private]=>
int(3)
[u"imp2"]=>
int(4)
[u"dyn2"]=>
int(5)
}
}
array(1) {
[u"pub1"]=>
int(1)
}
array(1) {
[u"imp1"]=>
int(4)
}
array(1) {
[u"dyn1"]=>
int(5)
}
===FOREACH===
ArrayObjectEx::getIterator()
ArrayIteratorEx::__construct()
ArrayIteratorEx::dump()
array(3) {
[u"Flags"]=>
int(1)
[u"OVars"]=>
array(5) {
[u"pub2"]=>
int(1)
[u"pro2"]=>
int(2)
[u"pri2"]=>
int(3)
[u"imp2"]=>
int(4)
[u"dyn2"]=>
int(5)
}
[u"$this"]=>
object(ArrayIteratorEx)#2 (5) {
[u"pub2"]=>
int(1)
[u"pro2":protected]=>
int(2)
[u"pri2":u"ArrayIteratorEx":private]=>
int(3)
[u"imp2"]=>
int(4)
[u"dyn2"]=>
int(5)
}
}
array(1) {
[u"pub1"]=>
int(1)
}
array(1) {
[u"imp1"]=>
int(4)
}
array(1) {
[u"dyn1"]=>
int(5)
}
===PROPERTY===
int(1)
bool(false)
ArrayObjectEx::setFlags(3)
int(1)
bool(false)
int(1)
bool(false)
ArrayIteratorEx::setFlags(3)
int(1)
bool(true)
===DONE===

View File

@ -25,3 +25,6 @@ foreach($it as $key => $val) {
--EXPECT--
int(0)
string(5) "world"
--UEXPECT--
int(0)
unicode(5) "world"

View File

@ -46,3 +46,11 @@ myArray::offsetSet(two,two)
myArray::offsetGet(two)
string(3) "two"
===DONE===
--UEXPECT--
myArray::offsetSet(one,one)
myArray::offsetGet(one)
unicode(3) "one"
myArray::offsetSet(two,two)
myArray::offsetGet(two)
unicode(3) "two"
===DONE===

View File

@ -70,3 +70,25 @@ Collection Object
)
int(3)
===DONE===
--UEXPECT--
Initiate Obj
Assign values
Collection::offsetSet(NULL,foo)
Collection::offsetGet(0)
unicode(3) "foo"
Collection::offsetSet(NULL,bar)
Collection::offsetGet(0)
unicode(3) "foo"
Collection::offsetGet(1)
unicode(3) "bar"
Collection::offsetSet(foo,baz)
Collection::offsetGet(foo)
unicode(3) "baz"
Collection Object
(
[0] => foo
[1] => bar
[foo] => baz
)
int(3)
===DONE===

View File

@ -155,3 +155,115 @@ array(1) {
}
}
}
--UEXPECT--
array(11) {
[0]=>
unicode(3) "PHP"
[1]=>
unicode(27) "PHP: Hypertext Preprocessor"
[2]=>
unicode(4) "Test"
[u"test"]=>
int(27)
[3]=>
unicode(4) "test"
[4]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[5]=>
unicode(6) "monkey"
[6]=>
float(-0.33333333333333)
[7]=>
array(1) {
[0]=>
array(1) {
[0]=>
array(1) {
[0]=>
int(0)
}
}
}
[8]=>
array(1) {
[0]=>
array(1) {
[0]=>
array(1) {
[0]=>
int(0)
}
}
}
[9]=>
array(1) {
[0]=>
array(1) {
[0]=>
array(1) {
[0]=>
int(0)
}
}
}
}
-- Testing array_walk() --
int(0)
unicode(3) "PHP"
int(1)
unicode(27) "PHP: Hypertext Preprocessor"
int(2)
unicode(4) "Test"
unicode(4) "test"
int(27)
int(3)
unicode(4) "test"
int(4)
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
int(5)
unicode(6) "monkey"
int(6)
float(-0.33333333333333)
int(7)
array(1) {
[0]=>
array(1) {
[0]=>
array(1) {
[0]=>
int(0)
}
}
}
int(8)
array(1) {
[0]=>
array(1) {
[0]=>
array(1) {
[0]=>
int(0)
}
}
}
int(9)
array(1) {
[0]=>
array(1) {
[0]=>
array(1) {
[0]=>
int(0)
}
}
}

View File

@ -642,3 +642,616 @@ array(8) {
[7]=>
string(4) "test"
}
--UEXPECT--
Unsorted data:
array(8) {
[0]=>
unicode(3) "PHP"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(4) "Test"
[u"test"]=>
int(27)
[1000]=>
unicode(4) "test"
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[1001]=>
unicode(6) "monkey"
[16777216]=>
float(-0.33333333333333)
}
-- Testing arsort() --
No second argument:
array(8) {
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[u"test"]=>
int(27)
[1000]=>
unicode(4) "test"
[1001]=>
unicode(6) "monkey"
[5]=>
unicode(4) "Test"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[0]=>
unicode(3) "PHP"
[16777216]=>
float(-0.33333333333333)
}
Using SORT_REGULAR:
array(8) {
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[u"test"]=>
int(27)
[1000]=>
unicode(4) "test"
[1001]=>
unicode(6) "monkey"
[5]=>
unicode(4) "Test"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[0]=>
unicode(3) "PHP"
[16777216]=>
float(-0.33333333333333)
}
Using SORT_NUMERIC:
array(8) {
[u"test"]=>
int(27)
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[0]=>
unicode(3) "PHP"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[1001]=>
unicode(6) "monkey"
[5]=>
unicode(4) "Test"
[1000]=>
unicode(4) "test"
[16777216]=>
float(-0.33333333333333)
}
Using SORT_STRING
array(8) {
[1000]=>
unicode(4) "test"
[1001]=>
unicode(6) "monkey"
[5]=>
unicode(4) "Test"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[0]=>
unicode(3) "PHP"
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[u"test"]=>
int(27)
[16777216]=>
float(-0.33333333333333)
}
-- Testing asort() --
No second argument:
array(8) {
[16777216]=>
float(-0.33333333333333)
[0]=>
unicode(3) "PHP"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(4) "Test"
[1001]=>
unicode(6) "monkey"
[1000]=>
unicode(4) "test"
[u"test"]=>
int(27)
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
}
Using SORT_REGULAR:
array(8) {
[16777216]=>
float(-0.33333333333333)
[0]=>
unicode(3) "PHP"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(4) "Test"
[1001]=>
unicode(6) "monkey"
[1000]=>
unicode(4) "test"
[u"test"]=>
int(27)
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
}
Using SORT_NUMERIC:
array(8) {
[16777216]=>
float(-0.33333333333333)
[1001]=>
unicode(6) "monkey"
[1000]=>
unicode(4) "test"
[5]=>
unicode(4) "Test"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[0]=>
unicode(3) "PHP"
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[u"test"]=>
int(27)
}
Using SORT_STRING
array(8) {
[16777216]=>
float(-0.33333333333333)
[u"test"]=>
int(27)
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[0]=>
unicode(3) "PHP"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(4) "Test"
[1001]=>
unicode(6) "monkey"
[1000]=>
unicode(4) "test"
}
-- Testing krsort() --
No second argument:
array(8) {
[16777216]=>
float(-0.33333333333333)
[1001]=>
unicode(6) "monkey"
[1000]=>
unicode(4) "test"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(4) "Test"
[u"test"]=>
int(27)
[0]=>
unicode(3) "PHP"
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
}
Using SORT_REGULAR:
array(8) {
[16777216]=>
float(-0.33333333333333)
[1001]=>
unicode(6) "monkey"
[1000]=>
unicode(4) "test"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(4) "Test"
[0]=>
unicode(3) "PHP"
[u"test"]=>
int(27)
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
}
Using SORT_NUMERIC:
array(8) {
[16777216]=>
float(-0.33333333333333)
[1001]=>
unicode(6) "monkey"
[1000]=>
unicode(4) "test"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(4) "Test"
[u"test"]=>
int(27)
[0]=>
unicode(3) "PHP"
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
}
Using SORT_STRING
array(8) {
[u"test"]=>
int(27)
[5]=>
unicode(4) "Test"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[16777216]=>
float(-0.33333333333333)
[1001]=>
unicode(6) "monkey"
[1000]=>
unicode(4) "test"
[0]=>
unicode(3) "PHP"
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
}
-- Testing ksort() --
No second argument:
array(8) {
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[0]=>
unicode(3) "PHP"
[u"test"]=>
int(27)
[5]=>
unicode(4) "Test"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[1000]=>
unicode(4) "test"
[1001]=>
unicode(6) "monkey"
[16777216]=>
float(-0.33333333333333)
}
Using SORT_REGULAR:
array(8) {
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[u"test"]=>
int(27)
[0]=>
unicode(3) "PHP"
[5]=>
unicode(4) "Test"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[1000]=>
unicode(4) "test"
[1001]=>
unicode(6) "monkey"
[16777216]=>
float(-0.33333333333333)
}
Using SORT_NUMERIC:
array(8) {
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[0]=>
unicode(3) "PHP"
[u"test"]=>
int(27)
[5]=>
unicode(4) "Test"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[1000]=>
unicode(4) "test"
[1001]=>
unicode(6) "monkey"
[16777216]=>
float(-0.33333333333333)
}
Using SORT_STRING
array(8) {
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[0]=>
unicode(3) "PHP"
[1000]=>
unicode(4) "test"
[1001]=>
unicode(6) "monkey"
[16777216]=>
float(-0.33333333333333)
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(4) "Test"
[u"test"]=>
int(27)
}
-- Testing rsort() --
No second argument:
array(8) {
[0]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[1]=>
int(27)
[2]=>
unicode(4) "test"
[3]=>
unicode(6) "monkey"
[4]=>
unicode(4) "Test"
[5]=>
unicode(27) "PHP: Hypertext Preprocessor"
[6]=>
unicode(3) "PHP"
[7]=>
float(-0.33333333333333)
}
Using SORT_REGULAR:
array(8) {
[0]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[1]=>
int(27)
[2]=>
unicode(4) "test"
[3]=>
unicode(6) "monkey"
[4]=>
unicode(4) "Test"
[5]=>
unicode(27) "PHP: Hypertext Preprocessor"
[6]=>
unicode(3) "PHP"
[7]=>
float(-0.33333333333333)
}
Using SORT_NUMERIC:
array(8) {
[0]=>
int(27)
[1]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[2]=>
unicode(3) "PHP"
[3]=>
unicode(27) "PHP: Hypertext Preprocessor"
[4]=>
unicode(6) "monkey"
[5]=>
unicode(4) "Test"
[6]=>
unicode(4) "test"
[7]=>
float(-0.33333333333333)
}
Using SORT_STRING
array(8) {
[0]=>
unicode(4) "test"
[1]=>
unicode(6) "monkey"
[2]=>
unicode(4) "Test"
[3]=>
unicode(27) "PHP: Hypertext Preprocessor"
[4]=>
unicode(3) "PHP"
[5]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[6]=>
int(27)
[7]=>
float(-0.33333333333333)
}
-- Testing sort() --
No second argument:
array(8) {
[0]=>
float(-0.33333333333333)
[1]=>
unicode(3) "PHP"
[2]=>
unicode(27) "PHP: Hypertext Preprocessor"
[3]=>
unicode(4) "Test"
[4]=>
unicode(6) "monkey"
[5]=>
unicode(4) "test"
[6]=>
int(27)
[7]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
}
Using SORT_REGULAR:
array(8) {
[0]=>
float(-0.33333333333333)
[1]=>
unicode(3) "PHP"
[2]=>
unicode(27) "PHP: Hypertext Preprocessor"
[3]=>
unicode(4) "Test"
[4]=>
unicode(6) "monkey"
[5]=>
unicode(4) "test"
[6]=>
int(27)
[7]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
}
Using SORT_NUMERIC:
array(8) {
[0]=>
float(-0.33333333333333)
[1]=>
unicode(6) "monkey"
[2]=>
unicode(4) "test"
[3]=>
unicode(4) "Test"
[4]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(3) "PHP"
[6]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[7]=>
int(27)
}
Using SORT_STRING
array(8) {
[0]=>
float(-0.33333333333333)
[1]=>
int(27)
[2]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[3]=>
unicode(3) "PHP"
[4]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(4) "Test"
[6]=>
unicode(6) "monkey"
[7]=>
unicode(4) "test"
}

View File

@ -102,3 +102,78 @@ array(8) {
[7]=>
string(4) "test"
}
--UEXPECT--
-- Testing uasort() --
array(8) {
[16777216]=>
float(-0.33333333333333)
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[u"test"]=>
int(27)
[0]=>
unicode(3) "PHP"
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(4) "Test"
[1001]=>
unicode(6) "monkey"
[1000]=>
unicode(4) "test"
}
-- Testing uksort() --
array(8) {
[-1000]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[0]=>
unicode(3) "PHP"
[1000]=>
unicode(4) "test"
[1001]=>
unicode(6) "monkey"
[16777216]=>
float(-0.33333333333333)
[17]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(4) "Test"
[u"test"]=>
int(27)
}
-- Testing usort() --
array(8) {
[0]=>
float(-0.33333333333333)
[1]=>
array(2) {
[0]=>
unicode(6) "banana"
[1]=>
unicode(6) "orange"
}
[2]=>
int(27)
[3]=>
unicode(3) "PHP"
[4]=>
unicode(27) "PHP: Hypertext Preprocessor"
[5]=>
unicode(4) "Test"
[6]=>
unicode(6) "monkey"
[7]=>
unicode(4) "test"
}

View File

@ -57,3 +57,40 @@ array(5) {
[6]=>
string(6) "test21"
}
--UEXPECT--
array(5) {
[0]=>
unicode(5) "Test1"
[u"teST2"]=>
int(0)
[5]=>
unicode(5) "test2"
[u"abc"]=>
unicode(6) "test10"
[6]=>
unicode(6) "test21"
}
array(5) {
[u"teST2"]=>
int(0)
[0]=>
unicode(5) "Test1"
[5]=>
unicode(5) "test2"
[u"abc"]=>
unicode(6) "test10"
[6]=>
unicode(6) "test21"
}
array(5) {
[u"teST2"]=>
int(0)
[0]=>
unicode(5) "Test1"
[5]=>
unicode(5) "test2"
[u"abc"]=>
unicode(6) "test10"
[6]=>
unicode(6) "test21"
}

View File

@ -44,3 +44,25 @@ array(2) {
["c"]=>
string(5) "fubar"
}
--UEXPECT--
foo
array(2) {
[0]=>
unicode(3) "bar"
[1]=>
unicode(5) "fubar"
}
foo
array(2) {
[0]=>
unicode(3) "bar"
[1]=>
unicode(5) "fubar"
}
foo
array(2) {
[u"b"]=>
unicode(3) "bar"
[u"c"]=>
unicode(5) "fubar"
}

View File

@ -47,3 +47,27 @@ array(2) {
["b"]=>
string(3) "bar"
}
--UEXPECT--
fubar
array(3) {
[0]=>
unicode(3) "foo"
[1]=>
unicode(3) "bar"
[2]=>
unicode(6) "foobar"
}
fubar
array(2) {
[3]=>
unicode(3) "foo"
[4]=>
unicode(3) "bar"
}
fubar
array(2) {
[u"a"]=>
unicode(3) "foo"
[u"b"]=>
unicode(3) "bar"
}

View File

@ -649,3 +649,526 @@ array(3) {
int(23)
}
}
--UEXPECTF--
$a=array (
0 => 1,
'big' => 2,
1 => 3,
2 => 6,
3 => 3,
4 => 5,
5 => 3,
6 => 3,
7 => 3,
8 => 3,
9 => 3,
10 => 3,
11 => 3,
12 => 3,
13 => 3,
14 => 3,
);
$b=array (
0 => 2,
1 => 2,
2 => 3,
3 => 3,
4 => 3,
5 => 3,
6 => 3,
7 => 3,
8 => 3,
9 => 3,
10 => 3,
11 => 3,
12 => 3,
13 => 3,
14 => 3,
);
$c=array (
0 => -1,
1 => 1,
);
array(2) {
[2]=>
int(6)
[4]=>
int(5)
}
array(5) {
[0]=>
int(1)
[u"big"]=>
int(2)
[1]=>
int(3)
[2]=>
int(6)
[4]=>
int(5)
}
$a=array (
'a' => 2,
'b' => 'some',
'c' => 'done',
'z' => 'foo',
'f' => 5,
'fan' => 'fen',
7 => 18,
9 => 25,
11 => 42,
12 => 42,
45 => 42,
73 => 'foo',
95 => 'some',
'som3' => 'some',
'want' => 'wanna',
);
$b=array (
'a' => 7,
7 => 18,
9 => 13,
11 => 42,
45 => 46,
'som3' => 'some',
'foo' => 'some',
'goo' => 'foo',
'f' => 5,
'z' => 'equal',
);
$c=array (
73 => 'foo',
95 => 'some',
);
Results:
array(5) {
[u"a"]=>
int(2)
[u"c"]=>
unicode(4) "done"
[u"fan"]=>
unicode(3) "fen"
[9]=>
int(25)
[u"want"]=>
unicode(5) "wanna"
}
array(9) {
[u"a"]=>
int(2)
[u"b"]=>
unicode(4) "some"
[u"c"]=>
unicode(4) "done"
[u"z"]=>
unicode(3) "foo"
[u"fan"]=>
unicode(3) "fen"
[9]=>
int(25)
[12]=>
int(42)
[45]=>
int(42)
[u"want"]=>
unicode(5) "wanna"
}
-=-=-=-=-=-=-=-=- New functionality from 5.0.0 -=-=-=-=-=-=-=-
$a=array (
'0.1' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 12;
public $public_member = 12;
},
0 =>
class cr {
private $priv_member = 23;
public $public_member = 23;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
$b=array (
'0.2' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 22;
public $public_member = 22;
},
0 =>
class cr {
private $priv_member = 3;
public $public_member = 3;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
var_dump(array_udiff_uassoc($a, $b, "comp_func_cr", "comp_func"));
array(3) {
[u"0.1"]=>
object(cr)#1 (2) {
[u"priv_member":u"cr":private]=>
int(9)
[u"public_member"]=>
int(9)
}
[u"0.5"]=>
object(cr)#2 (2) {
[u"priv_member":u"cr":private]=>
int(12)
[u"public_member"]=>
int(12)
}
[0]=>
object(cr)#3 (2) {
[u"priv_member":u"cr":private]=>
int(23)
[u"public_member"]=>
int(23)
}
}
$a=array (
'0.1' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 12;
public $public_member = 12;
},
0 =>
class cr {
private $priv_member = 23;
public $public_member = 23;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
$b=array (
'0.2' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 22;
public $public_member = 22;
},
0 =>
class cr {
private $priv_member = 3;
public $public_member = 3;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
var_dump(array_udiff_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func"));
array(3) {
[u"0.1"]=>
object(cr)#1 (2) {
[u"priv_member":u"cr":private]=>
int(9)
[u"public_member"]=>
int(9)
}
[u"0.5"]=>
object(cr)#2 (2) {
[u"priv_member":u"cr":private]=>
int(12)
[u"public_member"]=>
int(12)
}
[0]=>
object(cr)#3 (2) {
[u"priv_member":u"cr":private]=>
int(23)
[u"public_member"]=>
int(23)
}
}
$a=array (
'0.1' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 12;
public $public_member = 12;
},
0 =>
class cr {
private $priv_member = 23;
public $public_member = 23;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
$b=array (
'0.2' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 22;
public $public_member = 22;
},
0 =>
class cr {
private $priv_member = 3;
public $public_member = 3;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
var_dump(array_diff_assoc($a, $b));
array(5) {
[u"0.1"]=>
object(cr)#1 (2) {
[u"priv_member":u"cr":private]=>
int(9)
[u"public_member"]=>
int(9)
}
[u"0.5"]=>
object(cr)#2 (2) {
[u"priv_member":u"cr":private]=>
int(12)
[u"public_member"]=>
int(12)
}
[0]=>
object(cr)#3 (2) {
[u"priv_member":u"cr":private]=>
int(23)
[u"public_member"]=>
int(23)
}
[1]=>
object(cr)#4 (2) {
[u"priv_member":u"cr":private]=>
int(4)
[u"public_member"]=>
int(4)
}
[2]=>
object(cr)#5 (2) {
[u"priv_member":u"cr":private]=>
int(-15)
[u"public_member"]=>
int(-15)
}
}
$a=array (
'0.1' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 12;
public $public_member = 12;
},
0 =>
class cr {
private $priv_member = 23;
public $public_member = 23;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
$b=array (
'0.2' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 22;
public $public_member = 22;
},
0 =>
class cr {
private $priv_member = 3;
public $public_member = 3;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
var_dump(array_udiff($a, $b, "comp_func_cr"));
array(2) {
[u"0.5"]=>
object(cr)#2 (2) {
[u"priv_member":u"cr":private]=>
int(12)
[u"public_member"]=>
int(12)
}
[0]=>
object(cr)#3 (2) {
[u"priv_member":u"cr":private]=>
int(23)
[u"public_member"]=>
int(23)
}
}
$a=array (
'0.1' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 12;
public $public_member = 12;
},
0 =>
class cr {
private $priv_member = 23;
public $public_member = 23;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
$b=array (
'0.2' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 22;
public $public_member = 22;
},
0 =>
class cr {
private $priv_member = 3;
public $public_member = 3;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
var_dump(array_udiff_assoc($a, $b, "comp_func_cr"));
array(3) {
[u"0.1"]=>
object(cr)#1 (2) {
[u"priv_member":u"cr":private]=>
int(9)
[u"public_member"]=>
int(9)
}
[u"0.5"]=>
object(cr)#2 (2) {
[u"priv_member":u"cr":private]=>
int(12)
[u"public_member"]=>
int(12)
}
[0]=>
object(cr)#3 (2) {
[u"priv_member":u"cr":private]=>
int(23)
[u"public_member"]=>
int(23)
}
}

View File

@ -308,3 +308,230 @@ array(5) {
["som3"]=>
string(4) "some"
}
--UEXPECT--
-=-=-=-=-=-=-=-=-=-= TEST 1 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
$a=array (
0 => 1,
'big' => 2,
1 => 2,
2 => 6,
3 => 3,
4 => 5,
5 => 3,
6 => 3,
7 => 454,
8 => 'some_string',
9 => 3,
10 => 3,
11 => 3,
12 => 3,
13 => 3,
14 => 3,
15 => 3,
16 => 3,
17 => 17,
);
$b=array (
0 => 2,
1 => 2,
2 => 3,
3 => 3,
4 => 3,
5 => 3,
6 => 3,
7 => 3,
8 => 3,
9 => 3,
10 => 3,
11 => 3,
12 => 3,
13 => 3,
14 => 3,
15 => 17,
16 => 25,
17 => 'some_string',
18 => 7,
19 => 8,
20 => 9,
21 => 109,
22 => 78,
23 => 17,
);
$c=array (
0 => -1,
1 => 2,
2 => 1,
3 => 15,
4 => 25,
5 => 17,
);
array_intersect($a,$b,$c);
array(3) {
[u"big"]=>
int(2)
[1]=>
int(2)
[17]=>
int(17)
}
array_intersect_assoc($a,$b,$c);
array(1) {
[1]=>
int(2)
}
array_intersect($a,$b);
array(15) {
[u"big"]=>
int(2)
[1]=>
int(2)
[3]=>
int(3)
[5]=>
int(3)
[6]=>
int(3)
[8]=>
unicode(11) "some_string"
[9]=>
int(3)
[10]=>
int(3)
[11]=>
int(3)
[12]=>
int(3)
[13]=>
int(3)
[14]=>
int(3)
[15]=>
int(3)
[16]=>
int(3)
[17]=>
int(17)
}
array_intersect_assoc($a,$b);
array(10) {
[1]=>
int(2)
[3]=>
int(3)
[5]=>
int(3)
[6]=>
int(3)
[9]=>
int(3)
[10]=>
int(3)
[11]=>
int(3)
[12]=>
int(3)
[13]=>
int(3)
[14]=>
int(3)
}
-=-=-=-=-=-=-=-=-=-= TEST 2 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
$a=array (
'a' => 2,
'b' => 'some',
'c' => 'done',
'z' => 'foo',
'f' => 5,
'fan' => 'fen',
'bad' => 'bed',
'gate' => 'web',
7 => 18,
9 => 25,
11 => 42,
12 => 42,
45 => 42,
73 => 'foo',
95 => 'some',
'som3' => 'some',
'want' => 'wanna',
);
$b=array (
'a' => 7,
7 => 18,
9 => 13,
11 => 42,
45 => 46,
'som3' => 'some',
'foo' => 'some',
'goo' => 'foo',
'f' => 5,
'z' => 'equal',
'gate' => 'web',
);
$c=array (
'gate' => 'web',
73 => 'foo',
95 => 'some',
);
Results:
array_intersect($a,$b,$c);
array(6) {
[u"b"]=>
unicode(4) "some"
[u"z"]=>
unicode(3) "foo"
[u"gate"]=>
unicode(3) "web"
[73]=>
unicode(3) "foo"
[95]=>
unicode(4) "some"
[u"som3"]=>
unicode(4) "some"
}
array_intersect_assoc($a,$b,$c);
array(1) {
[u"gate"]=>
unicode(3) "web"
}
array_intersect($a,$b);
array(11) {
[u"b"]=>
unicode(4) "some"
[u"z"]=>
unicode(3) "foo"
[u"f"]=>
int(5)
[u"gate"]=>
unicode(3) "web"
[7]=>
int(18)
[11]=>
int(42)
[12]=>
int(42)
[45]=>
int(42)
[73]=>
unicode(3) "foo"
[95]=>
unicode(4) "some"
[u"som3"]=>
unicode(4) "some"
}
array_intersect_assoc($a,$b);
array(5) {
[u"f"]=>
int(5)
[u"gate"]=>
unicode(3) "web"
[7]=>
int(18)
[11]=>
int(42)
[u"som3"]=>
unicode(4) "some"
}

View File

@ -767,3 +767,720 @@ array(4) {
}
end
--UEXPECT--
array(0) {
}
array(0) {
}
array(0) {
}
array(1) {
[0]=>
int(0)
}
array(1) {
[0]=>
int(0)
}
array(1) {
[0]=>
int(0)
}
array(1) {
[0]=>
int(1)
}
array(1) {
[0]=>
int(1)
}
array(1) {
[0]=>
int(1)
}
array(1) {
[0]=>
int(-1)
}
array(1) {
[0]=>
int(-1)
}
array(1) {
[0]=>
int(-1)
}
array(5) {
[0]=>
int(0)
[1]=>
int(2)
[2]=>
int(3)
[3]=>
int(4)
[4]=>
int(5)
}
array(5) {
[0]=>
int(0)
[1]=>
int(2)
[2]=>
int(3)
[3]=>
int(4)
[4]=>
int(5)
}
array(5) {
[0]=>
int(0)
[1]=>
int(2)
[2]=>
int(3)
[3]=>
int(4)
[4]=>
int(5)
}
array(5) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
[3]=>
int(4)
[4]=>
int(5)
}
array(5) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
[3]=>
int(4)
[4]=>
int(5)
}
array(5) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
[3]=>
int(4)
[4]=>
int(5)
}
array(1) {
[u""]=>
int(1)
}
array(1) {
[u""]=>
int(1)
}
array(1) {
[u""]=>
int(1)
}
array(1) {
[u"a"]=>
int(1)
}
array(1) {
[u"A"]=>
int(1)
}
array(1) {
[u"a"]=>
int(1)
}
array(1) {
[u"z"]=>
int(1)
}
array(1) {
[u"Z"]=>
int(1)
}
array(1) {
[u"z"]=>
int(1)
}
array(1) {
[u"one"]=>
int(1)
}
array(1) {
[u"ONE"]=>
int(1)
}
array(1) {
[u"one"]=>
int(1)
}
array(1) {
[u"one"]=>
int(1)
}
array(1) {
[u"ONE"]=>
int(1)
}
array(1) {
[u"one"]=>
int(1)
}
array(1) {
[u"one"]=>
int(1)
}
array(1) {
[u"ONE"]=>
int(1)
}
array(1) {
[u"one"]=>
int(1)
}
array(1) {
[u"one"]=>
int(1)
}
array(1) {
[u"ONE"]=>
int(1)
}
array(1) {
[u"one"]=>
int(1)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[0]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[0]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[0]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[0]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[0]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[0]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[0]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[0]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[0]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[0]=>
int(2)
}
array(2) {
[u"ONE"]=>
int(1)
[0]=>
int(2)
}
array(2) {
[u"one"]=>
int(1)
[0]=>
int(2)
}
array(4) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
[u"three"]=>
int(3)
[u"four"]=>
unicode(4) "four"
}
array(4) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
[u"THREE"]=>
int(3)
[u"FOUR"]=>
unicode(4) "four"
}
array(4) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
[u"three"]=>
int(3)
[u"four"]=>
unicode(4) "four"
}
array(4) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
[u"three"]=>
int(3)
[u"four"]=>
unicode(4) "FOUR"
}
array(4) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
[u"THREE"]=>
int(3)
[u"FOUR"]=>
unicode(4) "FOUR"
}
array(4) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
[u"three"]=>
int(3)
[u"four"]=>
unicode(4) "FOUR"
}
array(4) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
[u"three"]=>
int(3)
[u"four"]=>
unicode(4) "FOUR"
}
array(4) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
[u"THREE"]=>
int(3)
[u"FOUR"]=>
unicode(4) "FOUR"
}
array(4) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
[u"three"]=>
int(3)
[u"four"]=>
unicode(4) "FOUR"
}
array(4) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
[u"three"]=>
int(3)
[u"four"]=>
unicode(4) "four"
}
array(4) {
[u"ONE"]=>
int(1)
[u"TWO"]=>
int(2)
[u"THREE"]=>
int(3)
[u"FOUR"]=>
unicode(4) "four"
}
array(4) {
[u"one"]=>
int(1)
[u"two"]=>
int(2)
[u"three"]=>
int(3)
[u"four"]=>
unicode(4) "four"
}
end

File diff suppressed because it is too large Load Diff

View File

@ -92,4 +92,73 @@ array(1) {
[1]=>
int(1)
}
--UEXPECT--
array(0) {
}
array(1) {
[0]=>
int(1)
}
array(1) {
[1]=>
int(1)
}
array(1) {
[-1]=>
int(1)
}
array(1) {
[0]=>
int(2)
}
array(2) {
[0]=>
int(1)
[1]=>
int(1)
}
array(1) {
[1]=>
int(2)
}
array(3) {
[1]=>
int(2)
[u"hello"]=>
int(2)
[u"world"]=>
int(1)
}
array(2) {
[u"hello"]=>
int(2)
[u"world"]=>
int(1)
}
array(3) {
[u""]=>
int(2)
[u"world"]=>
int(3)
[u"hello"]=>
int(4)
}
array(1) {
[0]=>
int(1)
}
array(1) {
[1]=>
int(1)
}

View File

@ -563,3 +563,480 @@ array(2) {
}
}
end ------------ array_uintersect_uassoc() with method --------
--UEXPECTF--
begin ------------ array_intersect() ----------------------------
$a=array (
'0.1' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 12;
public $public_member = 12;
},
0 =>
class cr {
private $priv_member = 23;
public $public_member = 23;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
$b=array (
'0.2' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 22;
public $public_member = 22;
},
0 =>
class cr {
private $priv_member = 3;
public $public_member = 3;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
var_dump(array_intersect($a, $b);
array(0) {
}
end ------------ array_intersect() ----------------------------
begin ------------ array_uintersect() ---------------------------
$a=array (
'0.1' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 12;
public $public_member = 12;
},
0 =>
class cr {
private $priv_member = 23;
public $public_member = 23;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
$b=array (
'0.2' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 22;
public $public_member = 22;
},
0 =>
class cr {
private $priv_member = 3;
public $public_member = 3;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
var_dump(array_uintersect($a, $b, "comp_func_cr"));
array(3) {
[u"0.1"]=>
object(cr)#1 (2) {
[u"priv_member":u"cr":private]=>
int(9)
[u"public_member"]=>
int(9)
}
[1]=>
object(cr)#4 (2) {
[u"priv_member":u"cr":private]=>
int(4)
[u"public_member"]=>
int(4)
}
[2]=>
object(cr)#5 (2) {
[u"priv_member":u"cr":private]=>
int(-15)
[u"public_member"]=>
int(-15)
}
}
end ------------ array_uintersect() ---------------------------
begin ------------ array_intersect_assoc() ----------------------
$a=array (
'0.1' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 12;
public $public_member = 12;
},
0 =>
class cr {
private $priv_member = 23;
public $public_member = 23;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
$b=array (
'0.2' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 22;
public $public_member = 22;
},
0 =>
class cr {
private $priv_member = 3;
public $public_member = 3;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
var_dump(array_intersect_assoc($a, $b));
array(0) {
}
end ------------ array_intersect_assoc() ----------------------
begin ------------ array_uintersect_assoc() ---------------------
$a=array (
'0.1' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 12;
public $public_member = 12;
},
0 =>
class cr {
private $priv_member = 23;
public $public_member = 23;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
$b=array (
'0.2' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 22;
public $public_member = 22;
},
0 =>
class cr {
private $priv_member = 3;
public $public_member = 3;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
var_dump(array_uintersect_assoc($a, $b, "comp_func_cr"));
array(2) {
[1]=>
object(cr)#4 (2) {
[u"priv_member":u"cr":private]=>
int(4)
[u"public_member"]=>
int(4)
}
[2]=>
object(cr)#5 (2) {
[u"priv_member":u"cr":private]=>
int(-15)
[u"public_member"]=>
int(-15)
}
}
end ------------ array_uintersect_assoc() ---------------------
begin ------------ array_intersect_uassoc() ---------------------
$a=array (
'0.1' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 12;
public $public_member = 12;
},
0 =>
class cr {
private $priv_member = 23;
public $public_member = 23;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
$b=array (
'0.2' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 22;
public $public_member = 22;
},
0 =>
class cr {
private $priv_member = 3;
public $public_member = 3;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
var_dump(array_intersect_uassoc($a, $b, "comp_func"));
array(0) {
}
end ------------ array_intersect_uassoc() ---------------------
begin ------------ array_uintersect_uassoc() with ordinary func -
$a=array (
'0.1' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 12;
public $public_member = 12;
},
0 =>
class cr {
private $priv_member = 23;
public $public_member = 23;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
$b=array (
'0.2' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 22;
public $public_member = 22;
},
0 =>
class cr {
private $priv_member = 3;
public $public_member = 3;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
var_dump(array_uintersect_uassoc($a, $b, "comp_func_cr", "comp_func"));
array(2) {
[1]=>
object(cr)#4 (2) {
[u"priv_member":u"cr":private]=>
int(4)
[u"public_member"]=>
int(4)
}
[2]=>
object(cr)#5 (2) {
[u"priv_member":u"cr":private]=>
int(-15)
[u"public_member"]=>
int(-15)
}
}
end ------------ array_uintersect_uassoc() with ordinary func -
begin ------------ array_uintersect_uassoc() with method --------
$a=array (
'0.1' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 12;
public $public_member = 12;
},
0 =>
class cr {
private $priv_member = 23;
public $public_member = 23;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
$b=array (
'0.2' =>
class cr {
private $priv_member = 9;
public $public_member = 9;
},
'0.5' =>
class cr {
private $priv_member = 22;
public $public_member = 22;
},
0 =>
class cr {
private $priv_member = 3;
public $public_member = 3;
},
1 =>
class cr {
private $priv_member = 4;
public $public_member = 4;
},
2 =>
class cr {
private $priv_member = -15;
public $public_member = -15;
},
);
var_dump(array_uintersect_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func"));
array(2) {
[1]=>
object(cr)#4 (2) {
[u"priv_member":u"cr":private]=>
int(4)
[u"public_member"]=>
int(4)
}
[2]=>
object(cr)#5 (2) {
[u"priv_member":u"cr":private]=>
int(-15)
[u"public_member"]=>
int(-15)
}
}
end ------------ array_uintersect_uassoc() with method --------

View File

@ -77,3 +77,58 @@ array(3) {
string(1) "b"
}
}
--UEXPECT--
array(3) {
[u"a1"]=>
int(1)
[u"a2"]=>
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
[u"a3"]=>
array(2) {
[u"a"]=>
array(3) {
[0]=>
int(10)
[1]=>
int(20)
[2]=>
int(30)
}
[u"b"]=>
unicode(1) "b"
}
}
array(3) {
[u"a1"]=>
int(1)
[u"a2"]=>
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}
[u"a3"]=>
array(2) {
[u"a"]=>
array(3) {
[0]=>
int(10)
[1]=>
int(20)
[2]=>
int(30)
}
[u"b"]=>
unicode(1) "b"
}
}

View File

@ -10,3 +10,6 @@ echo "a2: $a : type : " . gettype($a) . "\n";
--EXPECT--
a1: 20
a2: 20 : type : string
--UEXPECT--
a1: 20
a2: 20 : type : unicode

View File

@ -53,3 +53,26 @@ string(1) "a"
int(-2)
string(1) "a"
==Done==
--UEXPECT--
==Mixed==
int(-1)
unicode(1) "a"
int(-2)
unicode(1) "b"
int(3)
unicode(1) "c"
int(4)
unicode(1) "d"
int(5)
unicode(1) "e"
int(6001)
unicode(1) "f"
unicode(2) "07"
unicode(1) "g"
==Normal==
int(0)
unicode(1) "a"
==Negative==
int(-2)
unicode(1) "a"
==Done==

View File

@ -22,3 +22,11 @@ string(1) "b"
int(0)
string(1) "a"
NULL
--UEXPECT--
int(0)
unicode(1) "c"
int(0)
unicode(1) "b"
int(0)
unicode(1) "a"
NULL

View File

@ -31,3 +31,20 @@ array(3) {
[0]=>
string(1) "a"
}
--UEXPECT--
array(3) {
[0]=>
unicode(1) "b"
[1]=>
unicode(1) "c"
[2]=>
unicode(1) "a"
}
array(3) {
[u"b"]=>
int(2)
[u"c"]=>
int(3)
[0]=>
unicode(1) "a"
}

View File

@ -23,3 +23,20 @@ array(2) {
string(2) "bb"
}
}
--UEXPECT--
array(2) {
[u"a"]=>
array(2) {
[0]=>
unicode(2) "aa"
[1]=>
unicode(2) "aa"
}
[u"b"]=>
array(2) {
[0]=>
unicode(2) "bb"
[1]=>
unicode(2) "bb"
}
}

View File

@ -89,3 +89,86 @@ array(10) {
[9]=>
int(10)
}
--UEXPECT--
array(2) {
[0]=>
int(2003)
[1]=>
int(2004)
}
array(26) {
[0]=>
unicode(1) "a"
[1]=>
unicode(1) "b"
[2]=>
unicode(1) "c"
[3]=>
unicode(1) "d"
[4]=>
unicode(1) "e"
[5]=>
unicode(1) "f"
[6]=>
unicode(1) "g"
[7]=>
unicode(1) "h"
[8]=>
unicode(1) "i"
[9]=>
unicode(1) "j"
[10]=>
unicode(1) "k"
[11]=>
unicode(1) "l"
[12]=>
unicode(1) "m"
[13]=>
unicode(1) "n"
[14]=>
unicode(1) "o"
[15]=>
unicode(1) "p"
[16]=>
unicode(1) "q"
[17]=>
unicode(1) "r"
[18]=>
unicode(1) "s"
[19]=>
unicode(1) "t"
[20]=>
unicode(1) "u"
[21]=>
unicode(1) "v"
[22]=>
unicode(1) "w"
[23]=>
unicode(1) "x"
[24]=>
unicode(1) "y"
[25]=>
unicode(1) "z"
}
array(10) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
[3]=>
int(4)
[4]=>
int(5)
[5]=>
int(6)
[6]=>
int(7)
[7]=>
int(8)
[8]=>
int(9)
[9]=>
int(10)
}

View File

@ -51,3 +51,13 @@ string(3) "abc"
int(15)
int(1200)
int(1)
--UEXPECT--
running_total is 0, current_value is 2
running_total is 4, current_value is 3
running_total is 13, current_value is 5
running_total is 38, current_value is 7
Total is 87
unicode(3) "abc"
int(15)
int(1200)
int(1)

View File

@ -30,3 +30,16 @@ array(5) {
[4]=>
string(5) "fifth"
}
--UEXPECT--
array(5) {
[0]=>
unicode(5) "first"
[1]=>
unicode(6) "second"
[2]=>
unicode(5) "third"
[3]=>
unicode(5) "forth"
[4]=>
unicode(5) "fifth"
}

View File

@ -221,3 +221,158 @@ long(2) refcount(2)
----r
string(2) "ok" refcount(2)
string(2) "ok" refcount(2)
--UEXPECT--
NULL refcount(2)
NULL refcount(2)
long(1) refcount(3)
long(2) refcount(3)
--
long(1) refcount(1)
long(2) refcount(1)
long(1) refcount(1)
long(2) refcount(1)
--
long(1) refcount(1)
long(2) refcount(1)
long(1) refcount(1)
long(2) refcount(1)
--
long(1) refcount(1)
long(3) refcount(1)
long(1) refcount(1)
long(3) refcount(1)
--
long(4) refcount(1)
long(3) refcount(1)
long(4) refcount(1)
long(3) refcount(1)
--
long(3) refcount(1)
long(3) refcount(1)
long(3) refcount(2)
--
long(4) refcount(1)
unicode(1) "x" refcount(1)
long(4) refcount(1)
unicode(1) "x" refcount(1)
long(3) refcount(2)
--
long(1) refcount(2)
long(2) refcount(2)
----a
long(1) refcount(1)
long(2) refcount(1)
long(1) refcount(1)
long(2) refcount(1)
--
long(1) refcount(1)
long(2) refcount(1)
long(1) refcount(1)
long(2) refcount(1)
--
long(1) refcount(1)
long(2) refcount(1)
long(1) refcount(1)
long(2) refcount(1)
--
long(1) refcount(1)
long(3) refcount(1)
long(1) refcount(1)
long(3) refcount(1)
--
long(4) refcount(1)
long(3) refcount(1)
long(4) refcount(1)
long(3) refcount(1)
--
long(3) refcount(1)
long(3) refcount(1)
long(3) refcount(2)
--
long(4) refcount(1)
unicode(1) "x" refcount(1)
long(4) refcount(1)
unicode(1) "x" refcount(1)
long(3) refcount(2)
--
long(1) refcount(2)
long(2) refcount(2)
----ra
NULL refcount(2)
NULL refcount(2)
long(1) refcount(3)
long(2) refcount(3)
--
long(1) refcount(1)
long(2) refcount(1)
long(1) refcount(1)
long(2) refcount(1)
--
long(1) refcount(1)
long(2) refcount(1)
long(1) refcount(1)
long(2) refcount(1)
--
long(1) refcount(1)
long(3) refcount(1)
long(1) refcount(1)
long(3) refcount(1)
--
long(4) refcount(1)
long(3) refcount(1)
long(4) refcount(1)
long(3) refcount(1)
--
long(3) refcount(1)
long(3) refcount(1)
long(3) refcount(2)
--
long(4) refcount(1)
unicode(1) "x" refcount(1)
long(4) refcount(1)
unicode(1) "x" refcount(1)
long(3) refcount(2)
--
long(1) refcount(2)
long(2) refcount(2)
----
long(1) refcount(1)
long(2) refcount(1)
long(1) refcount(1)
long(2) refcount(1)
--
long(1) refcount(1)
long(2) refcount(1)
long(1) refcount(1)
long(2) refcount(1)
--
long(1) refcount(1)
long(2) refcount(1)
long(1) refcount(1)
long(2) refcount(1)
--
long(1) refcount(1)
long(3) refcount(1)
long(1) refcount(1)
long(3) refcount(1)
--
long(4) refcount(1)
long(3) refcount(1)
long(4) refcount(1)
long(3) refcount(1)
--
long(3) refcount(1)
long(3) refcount(1)
long(3) refcount(2)
--
long(4) refcount(1)
unicode(1) "x" refcount(1)
long(4) refcount(1)
unicode(1) "x" refcount(1)
long(3) refcount(2)
--
long(1) refcount(2)
long(2) refcount(2)
----r
unicode(2) "ok" refcount(2)
unicode(2) "ok" refcount(2)

View File

@ -56,3 +56,42 @@ Array
)
)
--UEXPECT--
unicode(1) "a"
unicode(1) "a"
Array
(
[2] => p Object
(
[x] => 0
)
[1] => p Object
(
[x] => 1
)
[0] => p Object
(
[x] => 2
)
)
Now diffing:
unicode(1) "b"
unicode(1) "b"
unicode(1) "b"
unicode(1) "b"
unicode(1) "b"
unicode(1) "b"
unicode(1) "b"
unicode(1) "b"
unicode(1) "b"
Array
(
[1] => p Object
(
[x] => 1
)
)

View File

@ -11,3 +11,7 @@ var_dump($gg);
array(0) {
}
string(4) "afad"
--UEXPECT--
array(0) {
}
unicode(4) "afad"

View File

@ -113,3 +113,44 @@ array(1) {
["foo"]=>
&string(3) "noo"
}
--UEXPECT--
array(1) {
[u"foo"]=>
unicode(3) "aaa"
}
array(1) {
[u"foo"]=>
unicode(3) "bbb"
}
array(1) {
[u"foo"]=>
&unicode(3) "noo"
}
array(1) {
[u"foo"]=>
unicode(3) "bbb"
}
array(1) {
[u"foo"]=>
unicode(3) "bbb"
}
array(1) {
[u"foo"]=>
unicode(3) "bbb"
}
array(1) {
[u"foo"]=>
&unicode(3) "noo"
}
array(1) {
[u"foo"]=>
&unicode(3) "noo"
}
array(1) {
[u"foo"]=>
unicode(3) "aaa"
}
array(1) {
[u"foo"]=>
&unicode(3) "noo"
}

View File

@ -33,3 +33,23 @@ array(2) {
string(4) "0000"
}
Done
--UEXPECT--
array(2) {
[0]=>
unicode(3) "abc"
[1]=>
unicode(4) "0000"
}
array(2) {
[u"abc"]=>
int(1)
[0]=>
int(1)
}
array(2) {
[0]=>
unicode(3) "abc"
[1]=>
unicode(4) "0000"
}
Done

View File

@ -55,3 +55,28 @@ array(2) {
["_b"]=>
&int(2)
}
--UEXPECT--
int(1)
int(1)
int(1)
int(2)
int(2)
int(2)
array(2) {
[u"_a"]=>
&int(2)
[u"_b"]=>
&int(2)
}
int(1)
int(1)
int(1)
int(2)
int(2)
int(2)
array(2) {
[u"_a"]=>
&int(2)
[u"_b"]=>
&int(2)
}

View File

@ -28,3 +28,16 @@ array(5) {
["t"]=>
bool(false)
}
--UEXPECT--
array(5) {
[u"v"]=>
bool(false)
[u"h"]=>
bool(false)
[u"d"]=>
unicode(4) "test"
[u"m"]=>
unicode(4) "1234"
[u"t"]=>
bool(false)
}

View File

@ -10,3 +10,7 @@ var_dump($a, $b, $c);
string(1) "1"
string(1) "2"
string(1) "3"
--UEXPECT--
unicode(1) "1"
unicode(1) "2"
unicode(1) "3"

View File

@ -19,3 +19,7 @@ var_dump($x);
string(2) "02"
string(2) "02"
string(2) "02"
--UEXPECT--
unicode(2) "02"
unicode(2) "02"
unicode(2) "02"

View File

@ -142,17 +142,6 @@ if (getenv('TEST_PHP_USER')) {
$user_tests = array();
}
// Get info from php
$info_file = realpath(dirname(__FILE__)) . '/run-test-info.php';
@unlink($info_file);
$php_info = '<?php echo "
PHP_SAPI : " . PHP_SAPI . "
PHP_VERSION : " . phpversion() . "
ZEND_VERSION: " . zend_version() . "
PHP_OS : " . PHP_OS . " - " . php_uname() . "
INI actual : " . realpath(get_cfg_var("cfg_file_path")) . "
More .INIs : " . (function_exists(\'php_ini_scanned_files\') ? str_replace("\n","", php_ini_scanned_files()) : "** not determined **"); ?>';
save_text($info_file, $php_info);
$ini_overwrites = array(
'output_handler=',
'open_basedir=',
@ -174,17 +163,36 @@ $ini_overwrites = array(
'auto_append_file=',
'magic_quotes_runtime=0',
);
function write_information()
{
global $cwd, $php, $php_info, $user_tests, $ini_overwrites, $pass_options;
// Get info from php
$info_file = realpath(dirname(__FILE__)) . '/run-test-info.php';
@unlink($info_file);
$php_info = '<?php echo "
PHP_SAPI : " . PHP_SAPI . "
PHP_VERSION : " . phpversion() . "
ZEND_VERSION: " . zend_version() . "
PHP_OS : " . PHP_OS . " - " . php_uname() . "
INI actual : " . realpath(get_cfg_var("cfg_file_path")) . "
More .INIs : " . (function_exists(\'php_ini_scanned_files\') ? str_replace("\n","", php_ini_scanned_files()) : "** not determined **"); ?>';
save_text($info_file, $php_info);
$info_params = array();
settings2array($ini_overwrites,$info_params);
settings2params($info_params);
$php_info = `$php $info_params $info_file`;
$php_info = `$php $pass_options $info_params $info_file`;
@unlink($info_file);
define('TESTED_PHP_VERSION', `$php -r 'echo PHP_VERSION;'`);
$unicode = `$php $pass_options $info_params -r 'echo ini_get("unicode_semantics");'`;
define('TESTED_UNICODE', strcasecmp($unicode,"on") == 0 || $unicode == 1);
// check for extensions that need special handling and regenerate
$php_extensions = '<?php echo join(",",get_loaded_extensions()); ?>';
save_text($info_file, $php_extensions);
$php_extensions = explode(',',`$php $info_params $info_file`);
$php_extensions = explode(',',`$php $pass_options $info_params $info_file`);
$info_params_ex = array(
'session' => array('session.auto_start=0'),
'zlib' => array('zlib.output_compression=Off'),
@ -198,10 +206,6 @@ foreach($info_params_ex as $ext => $ini_overwrites_ex) {
@unlink($info_file);
// Write test context information.
function write_information()
{
global $cwd, $php, $php_info, $user_tests;
echo "
=====================================================================
CWD : $cwd
@ -750,6 +754,11 @@ TEST $file
$borked = true;
print_r($section_text);
}
if ((@count($section_text['UEXPECT']) + @count($section_text['UEXPECTF']) + @count($section_text['UEXPECTREGEX'])) > 1) {
$bork_info = "missing section --UEXPECT--, --UEXPECTF-- or --UEXPECTREGEX-- [$file]";
$borked = true;
print_r($section_text);
}
}
fclose($fp);
@ -920,7 +929,37 @@ TEST $file
// these may overwrite the test defaults...
if (array_key_exists('INI', $section_text)) {
settings2array(preg_split( "/[\n\r]+/", $section_text['INI']), $ini_settings);
if (isset($ini_settings["unicode_semantics"])) {
$unicode_test = strcasecmp($ini_settings["unicode_semantics"],"on") == 0 || $ini_settings["unicode_semantics"] == 1;
} else {
$unicode_test = TESTED_UNICODE;
}
} else {
$unicode_test = TESTED_UNICODE;
}
if ($unicode_test) {
if (isset($section_text['UEXPECT'])) {
unset($section_text['EXPECT']);
unset($section_text['EXPECTF']);
unset($section_text['EXPECTREGEX']);
$section_text['EXPECT'] = $section_text['UEXPECT'];
unset($section_text['UEXPECT']);
} else if (isset($section_text['UEXPECTF'])) {
unset($section_text['EXPECT']);
unset($section_text['EXPECTF']);
unset($section_text['EXPECTREGEX']);
$section_text['EXPECTF'] = $section_text['UEXPECTF'];
unset($section_text['UEXPECTF']);
} else if (isset($section_text['UEXPECTREGEX'])) {
unset($section_text['EXPECT']);
unset($section_text['EXPECTF']);
unset($section_text['EXPECTREGEX']);
$section_text['EXPECTREGEX'] = $section_text['UEXPECTREGEX'];
unset($section_text['UEXPECTREGEX']);
}
}
settings2params($ini_settings);
// We've satisfied the preconditions - run the test!

View File

@ -40,3 +40,23 @@ array(3) {
[2]=>
int(3)
}
--UEXPECT--
Method test called:
array(4) {
[0]=>
int(1)
[1]=>
unicode(1) "2"
[2]=>
float(3.4)
[3]=>
bool(true)
}
array(3) {
[0]=>
int(1)
[1]=>
int(2)
[2]=>
int(3)
}

View File

@ -70,3 +70,27 @@ object(setter)#%d (2) {
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)
[u"x"]=>
array(3) {
[u"a"]=>
int(101)
[u"b"]=>
int(2)
[u"c"]=>
int(3)
}
}

View File

@ -33,7 +33,11 @@ var_dump($foo->bar->baz);
?>
===DONE===
--EXPECTF--
--EXPECT--
string(5) "Check"
string(5) "Check"
===DONE===
--UEXPECT--
unicode(5) "Check"
unicode(5) "Check"
===DONE===

View File

@ -66,3 +66,18 @@ AutoGen::__get
Test::__get
string(5) "Check"
===DONE===
--UEXPECTF--
AutoGen::__get
Test::__set
AutoGen::__get
object(Test)#%d (1) {
[u"x":protected]=>
array(1) {
[u"baz"]=>
unicode(5) "Check"
}
}
AutoGen::__get
Test::__get
unicode(5) "Check"
===DONE===

Some files were not shown because too many files have changed in this diff Show More