tony2001 Tue May 29 12:10:20 2007 UTC
Modified files:
/php-src/ext/standard/tests/array 002.phpt 005.phpt 009.phpt
array_change_key_case.phpt
array_keys.phpt array_map.phpt
array_pop.phpt array_search.phpt
each.phpt
Log:
fix tests in unicode mode
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/002.phpt?r1=1.7&r2=1.8&diff_format=u
Index: php-src/ext/standard/tests/array/002.phpt
diff -u php-src/ext/standard/tests/array/002.phpt:1.7
php-src/ext/standard/tests/array/002.phpt:1.8
--- php-src/ext/standard/tests/array/002.phpt:1.7 Mon Aug 15 14:37:55 2005
+++ php-src/ext/standard/tests/array/002.phpt Tue May 29 12:10:20 2007
@@ -29,7 +29,7 @@
}
?>
---EXPECT--
+--EXPECTF--
Unsorted data:
array(8) {
[0]=>
@@ -129,6 +129,16 @@
float(-0.33333333333333)
}
Using SORT_STRING
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
array(8) {
[1000]=>
string(4) "test"
@@ -227,6 +237,16 @@
int(27)
}
Using SORT_STRING
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
array(8) {
[16777216]=>
float(-0.33333333333333)
@@ -521,6 +541,16 @@
float(-0.33333333333333)
}
Using SORT_STRING
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
array(8) {
[0]=>
string(4) "test"
@@ -619,6 +649,16 @@
int(27)
}
Using SORT_STRING
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
array(8) {
[0]=>
float(-0.33333333333333)
@@ -642,7 +682,7 @@
[7]=>
string(4) "test"
}
---UEXPECT--
+--UEXPECTF--
Unsorted data:
array(8) {
[0]=>
@@ -742,6 +782,16 @@
float(-0.33333333333333)
}
Using SORT_STRING
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
array(8) {
[1000]=>
unicode(4) "test"
@@ -840,6 +890,16 @@
int(27)
}
Using SORT_STRING
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
array(8) {
[16777216]=>
float(-0.33333333333333)
@@ -1134,6 +1194,16 @@
float(-0.33333333333333)
}
Using SORT_STRING
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
array(8) {
[0]=>
unicode(4) "test"
@@ -1232,6 +1302,16 @@
int(27)
}
Using SORT_STRING
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
+
+Notice: Array to string conversion in %s on line %d
array(8) {
[0]=>
float(-0.33333333333333)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/005.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/standard/tests/array/005.phpt
diff -u php-src/ext/standard/tests/array/005.phpt:1.4
php-src/ext/standard/tests/array/005.phpt:1.5
--- php-src/ext/standard/tests/array/005.phpt:1.4 Sat May 12 11:20:52 2007
+++ php-src/ext/standard/tests/array/005.phpt Tue May 29 12:10:20 2007
@@ -289,3 +289,211 @@
Current Element after shift operation is: int(2)
Done
+--UEXPECTF--
+*** Testing Error Conditions ***
+
+Warning: array_shift() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: array_shift() expects parameter 1 to be array, integer given in %s on
line %d
+NULL
+
+Warning: array_shift() expects parameter 1 to be array, Unicode string given
in %s on line %d
+NULL
+
+Warning: array_shift() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+NULL
+
+*** Testing with various array inputs ***
+
+-- Input Array for Iteration 1 is --
+Array
+(
+)
+
+Output after shift is :
+NULL
+
+-- Input Array for Iteration 2 is --
+Array
+(
+ [0] => 1
+ [1] => 2
+ [2] => 3
+ [3] => 4
+ [4] => 5
+ [5] => 6
+ [6] => 7
+ [7] => 8
+ [8] => 9
+)
+
+Output after shift is :
+int(1)
+
+-- Input Array for Iteration 3 is --
+Array
+(
+ [0] => One
+ [1] => _Two
+ [2] => Three
+ [3] => Four
+ [4] => Five
+)
+
+Output after shift is :
+unicode(3) "One"
+
+-- Input Array for Iteration 4 is --
+Array
+(
+ [0] => 6
+ [1] => six
+ [2] => 7
+ [3] => seven
+ [4] => 8
+ [5] => eight
+ [6] => 9
+ [7] => nine
+)
+
+Output after shift is :
+int(6)
+
+-- Input Array for Iteration 5 is --
+Array
+(
+ [a] => aaa
+ [A] => AAA
+ [c] => ccc
+ [d] => ddd
+ [e] => eee
+)
+
+Output after shift is :
+unicode(3) "aaa"
+
+-- Input Array for Iteration 6 is --
+Array
+(
+ [1] => one
+ [2] => two
+ [3] => three
+ [4] => four
+ [5] => five
+)
+
+Output after shift is :
+unicode(3) "one"
+
+-- Input Array for Iteration 7 is --
+Array
+(
+ [1] => one
+ [2] => two
+ [3] => 7
+ [4] => four
+ [5] => five
+)
+
+Output after shift is :
+unicode(3) "one"
+
+-- Input Array for Iteration 8 is --
+Array
+(
+ [f] => fff
+ [1] => one
+ [4] => 6
+ [] => 3
+ [2] => float
+ [F] => FFF
+ [blank] =>
+ [3] => 3.7
+ [5] => Five
+ [6] => 8.6
+ [4name] => jonny
+ [a] =>
+)
+
+Output after shift is :
+unicode(3) "fff"
+
+-- Input Array for Iteration 9 is --
+Array
+(
+ [0] => 12
+ [1] => name
+ [2] => age
+ [3] => 45
+)
+
+Output after shift is :
+int(12)
+
+-- Input Array for Iteration 10 is --
+Array
+(
+ [0] => Array
+ (
+ [0] => oNe
+ [1] => tWo
+ [2] => 4
+ )
+
+ [1] => Array
+ (
+ [0] => 10
+ [1] => 20
+ [2] => 30
+ [3] => 40
+ [4] => 50
+ )
+
+ [2] => Array
+ (
+ )
+
+)
+
+Output after shift is :
+array(3) {
+ [0]=>
+ unicode(3) "oNe"
+ [1]=>
+ unicode(3) "tWo"
+ [2]=>
+ int(4)
+}
+
+-- Input Array for Iteration 11 is --
+Array
+(
+ [one] => 2
+ [three] => 3
+ [0] => 3
+ [1] => 4
+ [3] => 33
+ [4] => 44
+ [5] => 57
+ [6] => 6
+ [5.4] => 554
+ [5.7] => 557
+)
+
+Output after shift is :
+int(2)
+
+*** Checking for internal array pointer being reset when shift is called ***
+
+Current Element is : int(1)
+
+Next Element is : int(2)
+
+Next Element is : int(3)
+
+shifted Element is : int(1)
+
+Current Element after shift operation is: int(2)
+Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/009.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/array/009.phpt
diff -u php-src/ext/standard/tests/array/009.phpt:1.2
php-src/ext/standard/tests/array/009.phpt:1.3
--- php-src/ext/standard/tests/array/009.phpt:1.2 Sat May 12 11:20:52 2007
+++ php-src/ext/standard/tests/array/009.phpt Tue May 29 12:10:20 2007
@@ -533,3 +533,420 @@
Warning: reset() expects parameter 1 to be array, string given in %s on line %d
NULL
Done
+--UEXPECTF--
+*** Testing basic operations ***
+-- Iteration 1 --
+int(0)
+int(0)
+bool(false)
+bool(false)
+NULL
+bool(false)
+int(0)
+int(0)
+array(1) {
+ [0]=>
+ int(0)
+}
+
+-- Iteration 2 --
+int(1)
+int(0)
+bool(false)
+bool(false)
+NULL
+bool(false)
+int(1)
+int(0)
+array(1) {
+ [0]=>
+ int(1)
+}
+
+-- Iteration 3 --
+int(1)
+int(0)
+int(2)
+int(2)
+int(1)
+int(3)
+int(3)
+int(2)
+int(-1)
+int(-1)
+int(3)
+int(-2)
+int(-2)
+int(4)
+int(-3)
+int(-3)
+int(5)
+bool(false)
+bool(false)
+NULL
+bool(false)
+int(1)
+int(0)
+array(6) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(-1)
+ [4]=>
+ int(-2)
+ [5]=>
+ int(-3)
+}
+
+-- Iteration 4 --
+float(1.1)
+int(0)
+float(2.2)
+float(2.2)
+int(1)
+float(3.3)
+float(3.3)
+int(2)
+float(-1.1)
+float(-1.1)
+int(3)
+float(-2.2)
+float(-2.2)
+int(4)
+float(-3.3)
+float(-3.3)
+int(5)
+bool(false)
+bool(false)
+NULL
+bool(false)
+float(1.1)
+int(0)
+array(6) {
+ [0]=>
+ float(1.1)
+ [1]=>
+ float(2.2)
+ [2]=>
+ float(3.3)
+ [3]=>
+ float(-1.1)
+ [4]=>
+ float(-2.2)
+ [5]=>
+ float(-3.3)
+}
+
+-- Iteration 5 --
+unicode(1) "a"
+int(0)
+unicode(1) "b"
+unicode(1) "b"
+int(1)
+unicode(1) "c"
+unicode(1) "c"
+int(2)
+unicode(2) "ab"
+unicode(2) "ab"
+int(3)
+unicode(2) "ac"
+unicode(2) "ac"
+int(4)
+unicode(2) "ad"
+unicode(2) "ad"
+int(5)
+bool(false)
+bool(false)
+NULL
+bool(false)
+unicode(1) "a"
+int(0)
+array(6) {
+ [0]=>
+ unicode(1) "a"
+ [1]=>
+ unicode(1) "b"
+ [2]=>
+ unicode(1) "c"
+ [3]=>
+ unicode(2) "ab"
+ [4]=>
+ unicode(2) "ac"
+ [5]=>
+ unicode(2) "ad"
+}
+
+-- Iteration 6 --
+unicode(5) "apple"
+unicode(1) "a"
+unicode(4) "book"
+unicode(4) "book"
+unicode(1) "b"
+unicode(4) "cook"
+unicode(4) "cook"
+unicode(1) "c"
+bool(false)
+bool(false)
+NULL
+bool(false)
+unicode(5) "apple"
+unicode(1) "a"
+array(3) {
+ [u"a"]=>
+ unicode(5) "apple"
+ [u"b"]=>
+ unicode(4) "book"
+ [u"c"]=>
+ unicode(4) "cook"
+}
+
+-- Iteration 7 --
+unicode(5) "drink"
+unicode(1) "d"
+unicode(4) "port"
+unicode(4) "port"
+unicode(1) "p"
+unicode(3) "set"
+unicode(3) "set"
+unicode(1) "s"
+bool(false)
+bool(false)
+NULL
+bool(false)
+unicode(5) "drink"
+unicode(1) "d"
+array(3) {
+ [u"d"]=>
+ unicode(5) "drink"
+ [u"p"]=>
+ unicode(4) "port"
+ [u"s"]=>
+ unicode(3) "set"
+}
+
+-- Iteration 8 --
+unicode(3) "One"
+int(1)
+unicode(3) "two"
+unicode(3) "two"
+int(2)
+unicode(5) "three"
+unicode(5) "three"
+int(3)
+bool(false)
+bool(false)
+NULL
+bool(false)
+unicode(3) "One"
+int(1)
+array(3) {
+ [1]=>
+ unicode(3) "One"
+ [2]=>
+ unicode(3) "two"
+ [3]=>
+ unicode(5) "three"
+}
+
+
+*** Testing possible variations ***
+-- Iteration 1 --
+bool(false)
+NULL
+bool(false)
+bool(false)
+NULL
+array(0) {
+}
+
+-- Iteration 2 --
+unicode(0) ""
+int(0)
+bool(false)
+bool(false)
+NULL
+bool(false)
+unicode(0) ""
+int(0)
+array(1) {
+ [0]=>
+ unicode(0) ""
+}
+
+-- Iteration 3 --
+NULL
+int(0)
+bool(false)
+bool(false)
+NULL
+bool(false)
+NULL
+int(0)
+array(1) {
+ [0]=>
+ NULL
+}
+
+-- Iteration 4 --
+NULL
+int(0)
+bool(false)
+bool(false)
+NULL
+bool(false)
+NULL
+int(0)
+array(1) {
+ [0]=>
+ NULL
+}
+
+-- Iteration 5 --
+NULL
+int(0)
+bool(true)
+bool(true)
+int(1)
+NULL
+NULL
+int(2)
+unicode(0) ""
+unicode(0) ""
+int(3)
+int(1)
+int(1)
+int(4)
+bool(false)
+bool(false)
+NULL
+bool(false)
+NULL
+int(0)
+array(5) {
+ [0]=>
+ NULL
+ [1]=>
+ bool(true)
+ [2]=>
+ NULL
+ [3]=>
+ unicode(0) ""
+ [4]=>
+ int(1)
+}
+
+-- Iteration 6 --
+unicode(4) "test"
+int(-1)
+unicode(4) "rest"
+unicode(4) "rest"
+int(-2)
+unicode(3) "two"
+unicode(3) "two"
+int(2)
+unicode(0) ""
+unicode(0) ""
+unicode(0) ""
+unicode(4) "zero"
+unicode(4) "zero"
+int(0)
+bool(false)
+bool(false)
+NULL
+bool(false)
+unicode(4) "test"
+int(-1)
+array(5) {
+ [-1]=>
+ unicode(4) "test"
+ [-2]=>
+ unicode(4) "rest"
+ [2]=>
+ unicode(3) "two"
+ [u""]=>
+ unicode(0) ""
+ [0]=>
+ unicode(4) "zero"
+}
+
+
+-- Testing variation: when array is unset --
+
+Warning: current() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+Warning: key() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+Warning: next() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+Warning: reset() expects parameter 1 to be array, null given in %s on line %d
+NULL
+
+*** Testing error conditions ***
+
+Warning: key() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: current() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: reset() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: next() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: key() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+
+Warning: current() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+
+Warning: reset() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+
+Warning: next() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+
+Warning: key() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+Warning: key() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: key() expects parameter 1 to be array, Unicode string given in %s on
line %d
+NULL
+
+Warning: current() expects parameter 1 to be array, integer given in %s on
line %d
+NULL
+
+Warning: current() expects parameter 1 to be array, double given in %s on line
%d
+NULL
+
+Warning: current() expects parameter 1 to be array, Unicode string given in %s
on line %d
+NULL
+
+Warning: next() expects parameter 1 to be array, integer given in %s on line %d
+NULL
+
+Warning: next() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: next() expects parameter 1 to be array, Unicode string given in %s on
line %d
+NULL
+
+Warning: reset() expects parameter 1 to be array, integer given in %s on line
%d
+NULL
+
+Warning: reset() expects parameter 1 to be array, double given in %s on line %d
+NULL
+
+Warning: reset() expects parameter 1 to be array, Unicode string given in %s
on line %d
+NULL
+Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_change_key_case.phpt?r1=1.4&r2=1.5&diff_format=u
Index: php-src/ext/standard/tests/array/array_change_key_case.phpt
diff -u php-src/ext/standard/tests/array/array_change_key_case.phpt:1.4
php-src/ext/standard/tests/array/array_change_key_case.phpt:1.5
--- php-src/ext/standard/tests/array/array_change_key_case.phpt:1.4 Sat May
12 11:20:52 2007
+++ php-src/ext/standard/tests/array/array_change_key_case.phpt Tue May 29
12:10:20 2007
@@ -879,3 +879,799 @@
Warning: array_change_key_case() expects at most 2 parameters, 3 given in %s
on line %d
NULL
end
+--UEXPECTF--
+*** Testing basic operations ***
+** Iteration 1 **
+array(0) {
+}
+array(0) {
+}
+array(0) {
+}
+
+** Iteration 2 **
+array(1) {
+ [0]=>
+ int(0)
+}
+array(1) {
+ [0]=>
+ int(0)
+}
+array(1) {
+ [0]=>
+ int(0)
+}
+
+** Iteration 3 **
+array(1) {
+ [0]=>
+ int(1)
+}
+array(1) {
+ [0]=>
+ int(1)
+}
+array(1) {
+ [0]=>
+ int(1)
+}
+
+** Iteration 4 **
+array(1) {
+ [0]=>
+ int(-1)
+}
+array(1) {
+ [0]=>
+ int(-1)
+}
+array(1) {
+ [0]=>
+ int(-1)
+}
+
+** Iteration 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(0)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(4)
+ [4]=>
+ int(5)
+}
+
+** Iteration 6 **
+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)
+}
+
+** Iteration 7 **
+array(1) {
+ [u""]=>
+ int(1)
+}
+array(1) {
+ [u""]=>
+ int(1)
+}
+array(1) {
+ [u""]=>
+ int(1)
+}
+
+** Iteration 8 **
+array(1) {
+ [u"a"]=>
+ int(1)
+}
+array(1) {
+ [u"A"]=>
+ int(1)
+}
+array(1) {
+ [u"a"]=>
+ int(1)
+}
+
+** Iteration 9 **
+array(1) {
+ [u"z"]=>
+ int(1)
+}
+array(1) {
+ [u"Z"]=>
+ int(1)
+}
+array(1) {
+ [u"z"]=>
+ int(1)
+}
+
+** Iteration 10 **
+array(1) {
+ [u"one"]=>
+ int(1)
+}
+array(1) {
+ [u"ONE"]=>
+ int(1)
+}
+array(1) {
+ [u"one"]=>
+ int(1)
+}
+
+** Iteration 11 **
+array(1) {
+ [u"one"]=>
+ int(1)
+}
+array(1) {
+ [u"ONE"]=>
+ int(1)
+}
+array(1) {
+ [u"one"]=>
+ int(1)
+}
+
+** Iteration 12 **
+array(1) {
+ [u"one"]=>
+ int(1)
+}
+array(1) {
+ [u"ONE"]=>
+ int(1)
+}
+array(1) {
+ [u"one"]=>
+ int(1)
+}
+
+** Iteration 13 **
+array(1) {
+ [u"one"]=>
+ int(1)
+}
+array(1) {
+ [u"ONE"]=>
+ int(1)
+}
+array(1) {
+ [u"one"]=>
+ int(1)
+}
+
+** Iteration 14 **
+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)
+}
+
+** Iteration 15 **
+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)
+}
+
+** Iteration 16 **
+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)
+}
+
+** Iteration 17 **
+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)
+}
+
+** Iteration 18 **
+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)
+}
+
+** Iteration 19 **
+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)
+}
+
+** Iteration 20 **
+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)
+}
+
+** Iteration 21 **
+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)
+}
+
+** Iteration 22 **
+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)
+}
+
+** Iteration 23 **
+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)
+}
+
+** Iteration 24 **
+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)
+}
+
+** Iteration 25 **
+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)
+}
+
+** Iteration 26 **
+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)
+}
+
+** Iteration 27 **
+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)
+}
+
+** Iteration 28 **
+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)
+}
+
+** Iteration 29 **
+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)
+}
+
+** Iteration 30 **
+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)
+}
+
+** Iteration 31 **
+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)
+}
+
+** Iteration 32 **
+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)
+}
+
+** Iteration 33 **
+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)
+}
+
+** Iteration 34 **
+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"
+}
+
+** Iteration 35 **
+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"
+}
+
+** Iteration 36 **
+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"
+}
+
+** Iteration 37 **
+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"
+}
+
+
+*** Testing possible variations ***
+array(4) {
+ [u"ONE"]=>
+ int(1)
+ [u"TWO"]=>
+ int(2)
+ [u"THREE"]=>
+ int(3)
+ [u"FOUR"]=>
+ unicode(4) "four"
+}
+array(1) {
+ [u"one"]=>
+ int(4)
+}
+array(1) {
+ [u"ONE"]=>
+ int(3)
+}
+array(1) {
+ [u"ONE"]=>
+ int(2)
+}
+
+*** Testing error conditions ***
+
+Warning: array_change_key_case() expects parameter 1 to be array, integer
given in %s on line %d
+NULL
+
+Warning: array_change_key_case() expects parameter 1 to be array, integer
given in %s on line %d
+NULL
+
+Warning: array_change_key_case() expects parameter 2 to be long, Unicode
string given in %s on line %d
+NULL
+
+Warning: array_change_key_case() expects at least 1 parameter, 0 given in %s
on line %d
+NULL
+
+Warning: array_change_key_case() expects at most 2 parameters, 3 given in %s
on line %d
+NULL
+end
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_keys.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/array/array_keys.phpt
diff -u php-src/ext/standard/tests/array/array_keys.phpt:1.2
php-src/ext/standard/tests/array/array_keys.phpt:1.3
--- php-src/ext/standard/tests/array/array_keys.phpt:1.2 Sat May 12
11:20:52 2007
+++ php-src/ext/standard/tests/array/array_keys.phpt Tue May 29 12:10:20 2007
@@ -459,3 +459,364 @@
int(2)
}
Done
+--UEXPECTF--
+*** Testing array_keys() on basic array operation ***
+array(5) {
+ [0]=>
+ unicode(1) "a"
+ [1]=>
+ unicode(1) "b"
+ [2]=>
+ int(2)
+ [3]=>
+ int(-23)
+ [4]=>
+ int(3)
+}
+
+*** Testing array_keys() on various arrays ***
+-- Iteration 0 --
+array(0) {
+}
+
+-- Iteration 1 --
+array(1) {
+ [0]=>
+ int(0)
+}
+
+-- Iteration 2 --
+array(1) {
+ [0]=>
+ int(0)
+}
+
+-- Iteration 3 --
+array(1) {
+ [0]=>
+ unicode(5) "Hello"
+}
+
+-- Iteration 4 --
+array(1) {
+ [0]=>
+ unicode(0) ""
+}
+
+-- Iteration 5 --
+array(4) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+ [3]=>
+ unicode(1) "d"
+}
+
+-- Iteration 6 --
+array(4) {
+ [0]=>
+ unicode(1) "a"
+ [1]=>
+ unicode(1) "b"
+ [2]=>
+ unicode(1) "c"
+ [3]=>
+ unicode(1) "d"
+}
+
+-- Iteration 7 --
+array(4) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+ [3]=>
+ int(3)
+}
+
+-- Iteration 8 --
+array(5) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ unicode(1) "a"
+ [3]=>
+ int(3)
+ [4]=>
+ int(5)
+}
+
+-- Iteration 9 --
+array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(0)
+ [2]=>
+ unicode(0) ""
+ [3]=>
+ int(2)
+ [4]=>
+ int(3)
+}
+
+-- Iteration 10 --
+array(3) {
+ [0]=>
+ unicode(1) "a"
+ [1]=>
+ unicode(2) "ab"
+ [2]=>
+ unicode(2) "cd"
+}
+
+-- Iteration 11 --
+array(4) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+ [3]=>
+ unicode(0) ""
+}
+
+*** Testing array_keys() on all the types other than arrays ***
+-- Loose type checking --
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(-1)
+ [2]=>
+ unicode(3) "php"
+}
+
+-- strict type checking --
+array(0) {
+}
+
+-- Loose type checking --
+array(4) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ unicode(0) ""
+}
+
+-- strict type checking --
+array(0) {
+}
+
+-- Loose type checking --
+array(1) {
+ [0]=>
+ int(1)
+}
+
+-- strict type checking --
+array(0) {
+}
+
+-- Loose type checking --
+array(4) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(2)
+ [2]=>
+ unicode(3) "php"
+ [3]=>
+ unicode(0) ""
+}
+
+-- strict type checking --
+array(0) {
+}
+
+-- Loose type checking --
+array(1) {
+ [0]=>
+ int(-1)
+}
+
+-- strict type checking --
+array(0) {
+}
+
+-- Loose type checking --
+array(1) {
+ [0]=>
+ int(1)
+}
+
+-- strict type checking --
+array(1) {
+ [0]=>
+ int(1)
+}
+
+-- Loose type checking --
+array(2) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(2)
+}
+
+-- strict type checking --
+array(1) {
+ [0]=>
+ int(0)
+}
+
+-- Loose type checking --
+array(1) {
+ [0]=>
+ int(-1)
+}
+
+-- strict type checking --
+array(1) {
+ [0]=>
+ int(-1)
+}
+
+-- Loose type checking --
+array(4) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ unicode(0) ""
+}
+
+-- strict type checking --
+array(1) {
+ [0]=>
+ int(2)
+}
+
+-- Loose type checking --
+array(2) {
+ [0]=>
+ int(2)
+ [1]=>
+ int(3)
+}
+
+-- strict type checking --
+array(1) {
+ [0]=>
+ int(3)
+}
+
+-- Loose type checking --
+array(1) {
+ [0]=>
+ unicode(3) "php"
+}
+
+-- strict type checking --
+array(1) {
+ [0]=>
+ unicode(3) "php"
+}
+
+-- Loose type checking --
+array(2) {
+ [0]=>
+ int(2)
+ [1]=>
+ unicode(0) ""
+}
+
+-- strict type checking --
+array(1) {
+ [0]=>
+ unicode(0) ""
+}
+
+*** Testing array_keys() with resource type ***
+array(1) {
+ [0]=>
+ int(0)
+}
+array(1) {
+ [0]=>
+ int(0)
+}
+array(1) {
+ [0]=>
+ int(1)
+}
+array(1) {
+ [0]=>
+ int(1)
+}
+
+*** Testing array_keys() on range of values ***
+array(4) {
+ [0]=>
+ int(2147483647)
+ [1]=>
+ int(-2147483648)
+ [2]=>
+ int(-2147483647)
+ [3]=>
+ int(0)
+}
+
+*** Testing array_keys() on an array created on the fly ***
+array(3) {
+ [0]=>
+ unicode(1) "a"
+ [1]=>
+ unicode(1) "b"
+ [2]=>
+ unicode(1) "c"
+}
+array(0) {
+}
+
+*** Testing error conditions ***
+Warning: array_keys() expects parameter 1 to be array, integer given in %s on
line %d
+NULL
+
+Warning: array_keys() expects parameter 1 to be array, Unicode string given in
%s on line %d
+NULL
+
+Warning: array_keys() expects parameter 1 to be array, object given in %s on
line %d
+NULL
+
+Warning: array_keys() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: array_keys() expects at most 3 parameters, 4 given in %s on line %d
+NULL
+
+Warning: Illegal offset type in %s on line %d
+array(3) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+}
+Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_map.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/array/array_map.phpt
diff -u php-src/ext/standard/tests/array/array_map.phpt:1.2
php-src/ext/standard/tests/array/array_map.phpt:1.3
--- php-src/ext/standard/tests/array/array_map.phpt:1.2 Sat May 12 11:20:52 2007
+++ php-src/ext/standard/tests/array/array_map.phpt Tue May 29 12:10:20 2007
@@ -416,3 +416,303 @@
string(41) "Static_Function_helloWorld(): Hello World"
}
Done
+--UEXPECTF--
+*** Testing basic operations ***
+array(0) {
+}
+array(0) {
+}
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(2)
+ [1]=>
+ int(2)
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ int(3)
+ [1]=>
+ int(3)
+ }
+}
+array(4) {
+ [0]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(1)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ int(2)
+ [1]=>
+ int(2)
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ NULL
+ [1]=>
+ int(3)
+ }
+ [3]=>
+ array(2) {
+ [0]=>
+ NULL
+ [1]=>
+ int(4)
+ }
+}
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ unicode(3) "Jan"
+ [1]=>
+ unicode(2) "31"
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ unicode(3) "Feb"
+ [1]=>
+ unicode(2) "28"
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ unicode(5) "March"
+ [1]=>
+ unicode(2) "31"
+ }
+}
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ unicode(4) "Text"
+ [1]=>
+ int(4)
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ unicode(5) "Words"
+ [1]=>
+ int(5)
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ unicode(6) "Lineup"
+ [1]=>
+ int(6)
+ }
+}
+array(4) {
+ [0]=>
+ array(2) {
+ [0]=>
+ unicode(1) "a"
+ [1]=>
+ NULL
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ unicode(2) "ab"
+ [1]=>
+ NULL
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ unicode(3) "abc"
+ [1]=>
+ NULL
+ }
+ [3]=>
+ array(2) {
+ [0]=>
+ unicode(4) "abcd"
+ [1]=>
+ NULL
+ }
+}
+array(3) {
+ [0]=>
+ array(2) {
+ [0]=>
+ unicode(2) "01"
+ [1]=>
+ unicode(3) "Jan"
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ unicode(2) "02"
+ [1]=>
+ unicode(3) "Feb"
+ }
+ [2]=>
+ array(2) {
+ [0]=>
+ unicode(2) "03"
+ [1]=>
+ unicode(5) "March"
+ }
+}
+array(3) {
+ [u"key1"]=>
+ int(1)
+ [u"key2"]=>
+ int(4)
+ [u"key3"]=>
+ int(9)
+}
+
+*** Testing possible variations ***
+array(5) {
+ [0]=>
+ int(6)
+ [1]=>
+ int(8)
+ [2]=>
+ int(10)
+ [3]=>
+ int(8)
+ [4]=>
+ int(9)
+}
+array(2) {
+ [0]=>
+ array(2) {
+ [0]=>
+ unicode(5) "Hello"
+ [1]=>
+ unicode(5) "World"
+ }
+ [1]=>
+ array(2) {
+ [0]=>
+ unicode(4) "Good"
+ [1]=>
+ unicode(3) "Day"
+ }
+}
+Array
+(
+ [0] => 1
+ [1] => 4
+ [2] => 9
+)
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(4)
+ [2]=>
+ array(4) {
+ [0]=>
+ int(9)
+ [1]=>
+ int(16)
+ [2]=>
+ array(2) {
+ [0]=>
+ int(25)
+ [1]=>
+ int(4)
+ }
+ [3]=>
+ array(0) {
+ }
+ }
+}
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(4)
+ [2]=>
+ int(9)
+}
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(4)
+ [2]=>
+ int(9)
+}
+
+*** Testing error conditions ***
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+
+Warning: array_map(): Argument #2 should be an array in %s on line %d
+NULL
+
+Warning: array_map() expects at least 2 parameters, 0 given in %s on line %d
+NULL
+
+Warning: array_map() expects parameter 1 to be valid callback, Unicode string
given in %s on line %d
+NULL
+
+Warning: array_map() expects parameter 1 to be valid callback, Unicode string
given in %s on line %d
+NULL
+
+Warning: array_map() expects parameter 1 to be valid callback, Unicode string
given in %s on line %d
+NULL
+
+Warning: array_map() expects parameter 1 to be valid callback, Unicode string
given in %s on line %d
+NULL
+
+Warning: array_map() expects parameter 1 to be valid callback, Unicode string
given in %s on line %d
+NULL
+
+Warning: array_map() expects parameter 1 to be valid callback, Unicode string
given in %s on line %d
+NULL
+
+Warning: array_map() expects parameter 1 to be valid callback, Unicode string
given in %s on line %d
+NULL
+
+Warning: array_map() expects parameter 1 to be valid callback, Unicode string
given in %s on line %d
+NULL
+
+*** Testing operation on objects ***
+array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(4)
+ [2]=>
+ int(9)
+}
+
+Warning: array_map() expects parameter 1 to be valid callback, array given in
%s on line %d
+NULL
+
+Warning: array_map() expects at least 2 parameters, 1 given in %s on line %d
+NULL
+array(1) {
+ [0]=>
+ unicode(41) "Static_Function_helloWorld(): Hello World"
+}
+Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_pop.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/array/array_pop.phpt
diff -u php-src/ext/standard/tests/array/array_pop.phpt:1.2
php-src/ext/standard/tests/array/array_pop.phpt:1.3
--- php-src/ext/standard/tests/array/array_pop.phpt:1.2 Sat May 12 11:20:52 2007
+++ php-src/ext/standard/tests/array/array_pop.phpt Tue May 29 12:10:20 2007
@@ -284,3 +284,206 @@
Current Element after POP operation is: int(1)
Done
+--UEXPECTF--
+*** Testing Error Conditions ***
+
+Warning: array_pop() expects exactly 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: array_pop() expects parameter 1 to be array, integer given in %s on
line %d
+NULL
+
+Warning: array_pop() expects parameter 1 to be array, Unicode string given in
%s on line %d
+NULL
+
+Warning: array_pop() expects exactly 1 parameter, 2 given in %s on line %d
+NULL
+NULL
+
+*** Normal testing with various array inputs ***
+
+-- Input Array for Iteration 1 is --
+Array
+(
+)
+
+Output after Pop is :
+NULL
+
+-- Input Array for Iteration 2 is --
+Array
+(
+ [0] => 1
+ [1] => 2
+ [2] => 3
+ [3] => 4
+ [4] => 5
+ [5] => 6
+ [6] => 7
+ [7] => 8
+ [8] => 9
+)
+
+Output after Pop is :
+int(9)
+
+-- Input Array for Iteration 3 is --
+Array
+(
+ [0] => One
+ [1] => _Two
+ [2] => Three
+ [3] => Four
+ [4] => Five
+)
+
+Output after Pop is :
+unicode(4) "Five"
+
+-- Input Array for Iteration 4 is --
+Array
+(
+ [0] => 6
+ [1] => six
+ [2] => 7
+ [3] => seven
+ [4] => 8
+ [5] => eight
+ [6] => 9
+ [7] => nine
+)
+
+Output after Pop is :
+unicode(4) "nine"
+
+-- Input Array for Iteration 5 is --
+Array
+(
+ [a] => aaa
+ [A] => AAA
+ [c] => ccc
+ [d] => ddd
+ [e] => eee
+)
+
+Output after Pop is :
+unicode(3) "eee"
+
+-- Input Array for Iteration 6 is --
+Array
+(
+ [1] => one
+ [2] => two
+ [3] => three
+ [4] => four
+ [5] => five
+)
+
+Output after Pop is :
+unicode(4) "five"
+
+-- Input Array for Iteration 7 is --
+Array
+(
+ [1] => one
+ [2] => two
+ [3] => 7
+ [4] => four
+ [5] => five
+)
+
+Output after Pop is :
+unicode(4) "five"
+
+-- Input Array for Iteration 8 is --
+Array
+(
+ [f] => fff
+ [1] => one
+ [4] => 6
+ [] => 3
+ [2] => float
+ [F] => FFF
+ [blank] =>
+ [3] => 3.7
+ [5] => Five
+ [6] => 8.6
+ [4name] => jonny
+ [a] =>
+)
+
+Output after Pop is :
+NULL
+
+-- Input Array for Iteration 9 is --
+Array
+(
+ [0] => 12
+ [1] => name
+ [2] => age
+ [3] => 45
+)
+
+Output after Pop is :
+unicode(2) "45"
+
+-- Input Array for Iteration 10 is --
+Array
+(
+ [0] => Array
+ (
+ [0] => oNe
+ [1] => tWo
+ [2] => 4
+ )
+
+ [1] => Array
+ (
+ [0] => 10
+ [1] => 20
+ [2] => 30
+ [3] => 40
+ [4] => 50
+ )
+
+ [2] => Array
+ (
+ )
+
+)
+
+Output after Pop is :
+array(0) {
+}
+
+-- Input Array for Iteration 11 is --
+Array
+(
+ [one] => 2
+ [three] => 3
+ [0] => 3
+ [1] => 4
+ [3] => 33
+ [4] => 44
+ [5] => 57
+ [6] => 6
+ [5.4] => 554
+ [5.7] => 557
+)
+
+Output after Pop is :
+int(557)
+
+*** Checking for internal array pointer being reset when pop is called ***
+
+Current Element is : int(1)
+
+Next Element is : int(2)
+
+Next Element is : int(3)
+
+POPed Element is : int(9)
+
+Current Element after POP operation is: int(1)
+
+Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_search.phpt?r1=1.5&r2=1.6&diff_format=u
Index: php-src/ext/standard/tests/array/array_search.phpt
diff -u php-src/ext/standard/tests/array/array_search.phpt:1.5
php-src/ext/standard/tests/array/array_search.phpt:1.6
--- php-src/ext/standard/tests/array/array_search.phpt:1.5 Sat May 12
11:20:52 2007
+++ php-src/ext/standard/tests/array/array_search.phpt Tue May 29 12:10:20 2007
@@ -885,3 +885,680 @@
Warning: in_array() expects parameter 2 to be array, integer given in %s on
line %d
NULL
Done
+--UEXPECTF--
+OK
+*** Testing STRICT option of in_array() on arrays ***
+-- Iteration 1 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 2 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 3 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 4 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 5 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 6 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 7 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 8 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 9 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 10 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 11 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 12 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 13 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 14 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 15 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 16 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 17 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 18 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 19 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 20 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 21 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 22 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 23 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 24 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 25 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 26 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 27 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 28 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 29 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 30 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 31 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 32 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 33 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 34 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 35 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 36 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 37 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 38 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 39 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 40 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 41 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 42 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 43 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 44 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 45 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 46 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 47 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 48 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 49 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 50 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 51 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 52 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 53 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 54 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 55 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 56 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 57 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 58 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 59 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 60 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 61 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 62 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 63 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 64 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 65 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 66 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 67 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 68 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 69 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 70 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 71 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 72 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 73 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 74 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 75 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 76 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 77 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 78 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 79 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 80 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 81 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 82 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 83 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 84 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 85 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 86 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 87 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 88 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 89 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 90 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 91 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 92 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 93 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 94 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 95 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 96 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 97 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 98 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 99 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 100 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 101 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 102 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 103 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 104 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 105 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 106 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 107 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 108 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 109 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 110 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 111 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 112 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 113 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 114 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 115 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 116 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 117 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 118 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 119 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 120 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 121 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 122 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 123 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 124 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 125 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 126 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 127 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 128 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 129 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 130 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 131 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 132 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 133 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 134 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 135 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 136 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 137 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 138 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 139 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 140 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 141 --
+bool(false)
+bool(false)
+bool(false)
+-- Iteration 142 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 143 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 144 --
+bool(false)
+bool(false)
+bool(false)
+
+*** Testing loose and strict TYPE comparison of in_array() ***
+-- Iteration 1 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 2 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 3 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 4 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 5 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 6 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 7 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 8 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 9 --
+bool(true)
+bool(true)
+bool(true)
+-- Iteration 10 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 11 --
+bool(true)
+bool(false)
+bool(true)
+-- Iteration 12 --
+bool(true)
+bool(true)
+bool(true)
+
+*** Testing sub-arrays with in_array() ***
+bool(true)
+bool(true)
+bool(true)
+
+*** Testing objects with in_array() ***
+
+Warning: in_array() expects parameter 2 to be array, object given in %s on
line %d
+NULL
+
+Warning: in_array() expects parameter 2 to be array, object given in %s on
line %d
+NULL
+bool(true)
+
+*** Testing resource type with in_array() ***
+bool(true)
+bool(false)
+
+*** Testing miscelleneos inputs with in_array() ***
+bool(true)
+bool(false)
+bool(true)
+bool(true)
+bool(true)
+bool(true)
+bool(false)
+bool(false)
+bool(true)
+bool(false)
+
+*** Testing error conditions of in_array() ***
+
+Warning: in_array() expects at least 2 parameters, 0 given in %s on line %d
+NULL
+
+Warning: in_array() expects at most 3 parameters, 4 given in %s on line %d
+NULL
+
+Warning: in_array() expects at least 2 parameters, 1 given in %s on line %d
+NULL
+
+Warning: in_array() expects parameter 2 to be array, Unicode string given in
%s on line %d
+NULL
+
+Warning: in_array() expects parameter 2 to be array, integer given in %s on
line %d
+NULL
+Done
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/each.phpt?r1=1.2&r2=1.3&diff_format=u
Index: php-src/ext/standard/tests/array/each.phpt
diff -u php-src/ext/standard/tests/array/each.phpt:1.2
php-src/ext/standard/tests/array/each.phpt:1.3
--- php-src/ext/standard/tests/array/each.phpt:1.2 Sat May 12 11:20:52 2007
+++ php-src/ext/standard/tests/array/each.phpt Tue May 29 12:10:20 2007
@@ -707,3 +707,608 @@
Warning: Variable passed to each() is not an array or object in %s on line %d
NULL
Done
+--UEXPECTF--
+*** Testing each() : basic functionality ***
+-- Iteration 0 --
+array(4) {
+ [1]=>
+ int(0)
+ [u"value"]=>
+ int(0)
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+bool(false)
+array(4) {
+ [1]=>
+ int(0)
+ [u"value"]=>
+ int(0)
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+
+-- Iteration 1 --
+array(4) {
+ [1]=>
+ int(1)
+ [u"value"]=>
+ int(1)
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+bool(false)
+array(4) {
+ [1]=>
+ int(1)
+ [u"value"]=>
+ int(1)
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+
+-- Iteration 2 --
+array(4) {
+ [1]=>
+ int(-1)
+ [u"value"]=>
+ int(-1)
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+bool(false)
+array(4) {
+ [1]=>
+ int(-1)
+ [u"value"]=>
+ int(-1)
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+
+-- Iteration 3 --
+array(4) {
+ [1]=>
+ int(1)
+ [u"value"]=>
+ int(1)
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+array(4) {
+ [1]=>
+ int(2)
+ [u"value"]=>
+ int(2)
+ [0]=>
+ int(1)
+ [u"key"]=>
+ int(1)
+}
+array(4) {
+ [1]=>
+ int(3)
+ [u"value"]=>
+ int(3)
+ [0]=>
+ int(2)
+ [u"key"]=>
+ int(2)
+}
+array(4) {
+ [1]=>
+ int(4)
+ [u"value"]=>
+ int(4)
+ [0]=>
+ int(3)
+ [u"key"]=>
+ int(3)
+}
+array(4) {
+ [1]=>
+ int(5)
+ [u"value"]=>
+ int(5)
+ [0]=>
+ int(4)
+ [u"key"]=>
+ int(4)
+}
+bool(false)
+array(4) {
+ [1]=>
+ int(1)
+ [u"value"]=>
+ int(1)
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+
+-- Iteration 4 --
+array(4) {
+ [1]=>
+ int(-1)
+ [u"value"]=>
+ int(-1)
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+array(4) {
+ [1]=>
+ int(-2)
+ [u"value"]=>
+ int(-2)
+ [0]=>
+ int(1)
+ [u"key"]=>
+ int(1)
+}
+array(4) {
+ [1]=>
+ int(-3)
+ [u"value"]=>
+ int(-3)
+ [0]=>
+ int(2)
+ [u"key"]=>
+ int(2)
+}
+array(4) {
+ [1]=>
+ int(6)
+ [u"value"]=>
+ int(6)
+ [0]=>
+ int(3)
+ [u"key"]=>
+ int(3)
+}
+array(4) {
+ [1]=>
+ int(7)
+ [u"value"]=>
+ int(7)
+ [0]=>
+ int(4)
+ [u"key"]=>
+ int(4)
+}
+array(4) {
+ [1]=>
+ int(8)
+ [u"value"]=>
+ int(8)
+ [0]=>
+ int(5)
+ [u"key"]=>
+ int(5)
+}
+bool(false)
+array(4) {
+ [1]=>
+ int(-1)
+ [u"value"]=>
+ int(-1)
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+
+-- Iteration 5 --
+array(4) {
+ [1]=>
+ unicode(1) "a"
+ [u"value"]=>
+ unicode(1) "a"
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+array(4) {
+ [1]=>
+ unicode(2) "ab"
+ [u"value"]=>
+ unicode(2) "ab"
+ [0]=>
+ int(1)
+ [u"key"]=>
+ int(1)
+}
+array(4) {
+ [1]=>
+ unicode(3) "abc"
+ [u"value"]=>
+ unicode(3) "abc"
+ [0]=>
+ int(2)
+ [u"key"]=>
+ int(2)
+}
+array(4) {
+ [1]=>
+ unicode(4) "abcd"
+ [u"value"]=>
+ unicode(4) "abcd"
+ [0]=>
+ int(3)
+ [u"key"]=>
+ int(3)
+}
+bool(false)
+array(4) {
+ [1]=>
+ unicode(1) "a"
+ [u"value"]=>
+ unicode(1) "a"
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+
+-- Iteration 6 --
+array(4) {
+ [1]=>
+ unicode(3) "one"
+ [u"value"]=>
+ unicode(3) "one"
+ [0]=>
+ int(1)
+ [u"key"]=>
+ int(1)
+}
+array(4) {
+ [1]=>
+ unicode(3) "two"
+ [u"value"]=>
+ unicode(3) "two"
+ [0]=>
+ int(2)
+ [u"key"]=>
+ int(2)
+}
+array(4) {
+ [1]=>
+ unicode(5) "three"
+ [u"value"]=>
+ unicode(5) "three"
+ [0]=>
+ int(3)
+ [u"key"]=>
+ int(3)
+}
+array(4) {
+ [1]=>
+ unicode(4) "four"
+ [u"value"]=>
+ unicode(4) "four"
+ [0]=>
+ int(4)
+ [u"key"]=>
+ int(4)
+}
+bool(false)
+array(4) {
+ [1]=>
+ unicode(3) "one"
+ [u"value"]=>
+ unicode(3) "one"
+ [0]=>
+ int(1)
+ [u"key"]=>
+ int(1)
+}
+
+-- Iteration 7 --
+array(4) {
+ [1]=>
+ int(1)
+ [u"value"]=>
+ int(1)
+ [0]=>
+ unicode(3) "one"
+ [u"key"]=>
+ unicode(3) "one"
+}
+array(4) {
+ [1]=>
+ int(2)
+ [u"value"]=>
+ int(2)
+ [0]=>
+ unicode(3) "two"
+ [u"key"]=>
+ unicode(3) "two"
+}
+array(4) {
+ [1]=>
+ unicode(5) "three"
+ [u"value"]=>
+ unicode(5) "three"
+ [0]=>
+ int(3)
+ [u"key"]=>
+ int(3)
+}
+array(4) {
+ [1]=>
+ int(4)
+ [u"value"]=>
+ int(4)
+ [0]=>
+ int(4)
+ [u"key"]=>
+ int(4)
+}
+array(4) {
+ [1]=>
+ NULL
+ [u"value"]=>
+ NULL
+ [0]=>
+ unicode(0) ""
+ [u"key"]=>
+ unicode(0) ""
+}
+array(4) {
+ [1]=>
+ int(6)
+ [u"value"]=>
+ int(6)
+ [0]=>
+ unicode(2) " "
+ [u"key"]=>
+ unicode(2) " "
+}
+array(4) {
+ [1]=>
+ unicode(1) "+ [u"value"]=>
+ unicode(1) "+ [0]=>
+ unicode(1) "+ [u"key"]=>
+ unicode(1) "+}
+array(4) {
+ [1]=>
+ bool(true)
+ [u"value"]=>
+ bool(true)
+ [0]=>
+ int(1)
+ [u"key"]=>
+ int(1)
+}
+array(4) {
+ [1]=>
+ bool(false)
+ [u"value"]=>
+ bool(false)
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+bool(false)
+array(4) {
+ [1]=>
+ int(1)
+ [u"value"]=>
+ int(1)
+ [0]=>
+ unicode(3) "one"
+ [u"key"]=>
+ unicode(3) "one"
+}
+
+-- Iteration 8 --
+array(4) {
+ [1]=>
+ unicode(5) "one.5"
+ [u"value"]=>
+ unicode(5) "one.5"
+ [0]=>
+ unicode(3) "1.5"
+ [u"key"]=>
+ unicode(3) "1.5"
+}
+array(4) {
+ [1]=>
+ unicode(11) "negative2.0"
+ [u"value"]=>
+ unicode(11) "negative2.0"
+ [0]=>
+ unicode(4) "-2.0"
+ [u"key"]=>
+ unicode(4) "-2.0"
+}
+bool(false)
+array(4) {
+ [1]=>
+ unicode(5) "one.5"
+ [u"value"]=>
+ unicode(5) "one.5"
+ [0]=>
+ unicode(3) "1.5"
+ [u"key"]=>
+ unicode(3) "1.5"
+}
+
+-- Iteration 9 --
+array(4) {
+ [1]=>
+ unicode(9) "negative5"
+ [u"value"]=>
+ unicode(9) "negative5"
+ [0]=>
+ int(-5)
+ [u"key"]=>
+ int(-5)
+}
+array(4) {
+ [1]=>
+ unicode(11) "negative.05"
+ [u"value"]=>
+ unicode(11) "negative.05"
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+bool(false)
+array(4) {
+ [1]=>
+ unicode(9) "negative5"
+ [u"value"]=>
+ unicode(9) "negative5"
+ [0]=>
+ int(-5)
+ [u"key"]=>
+ int(-5)
+}
+
+
+*** Testing each() : possible variations ***
+-- Testing each() with reset() function --
+array(1) {
+ [0]=>
+ int(0)
+}
+array(4) {
+ [1]=>
+ array(1) {
+ [0]=>
+ int(0)
+ }
+ [u"value"]=>
+ array(1) {
+ [0]=>
+ int(0)
+ }
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+array(4) {
+ [1]=>
+ int(1)
+ [u"value"]=>
+ int(1)
+ [0]=>
+ int(0)
+ [u"key"]=>
+ int(0)
+}
+-- Testing each() with resources --
+array(4) {
+ [1]=>
+ resource(5) of type (stream)
+ [u"value"]=>
+ resource(5) of type (stream)
+ [0]=>
+ unicode(4) "file"
+ [u"key"]=>
+ unicode(4) "file"
+}
+array(4) {
+ [1]=>
+ resource(6) of type (stream)
+ [u"value"]=>
+ resource(6) of type (stream)
+ [0]=>
+ unicode(3) "dir"
+ [u"key"]=>
+ unicode(3) "dir"
+}
+-- Testing each with objects --
+array(4) {
+ [1]=>
+ int(100)
+ [u"value"]=>
+ int(100)
+ [0]=>
+ unicode(23) "+ [u"key"]=>
+ unicode(23) "+}
+array(4) {
+ [1]=>
+ unicode(6) "string"
+ [u"value"]=>
+ unicode(6) "string"
+ [0]=>
+ unicode(16) "+ [u"key"]=>
+ unicode(16) "+}
+array(4) {
+ [1]=>
+ array(4) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ bool(true)
+ [3]=>
+ NULL
+ }
+ [u"value"]=>
+ array(4) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ bool(true)
+ [3]=>
+ NULL
+ }
+ [0]=>
+ unicode(10) "var_public"
+ [u"key"]=>
+ unicode(10) "var_public"
+}
+-- Testing each() with null array --
+bool(false)
+
+*** Testing error conditions ***
+
+Warning: Wrong parameter count for each() in %s on line %d
+NULL
+
+Warning: Wrong parameter count for each() in %s on line %d
+NULL
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+
+Warning: Variable passed to each() is not an array or object in %s on line %d
+NULL
+Done
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php