?>
--EXPECT--
-array(11) {
- [0]=>
- string(3) "PHP"
- [1]=>
- string(27) "PHP: Hypertext Preprocessor"
- [2]=>
- string(4) "Test"
- ["test"]=>
- int(27)
- [3]=>
- string(4) "test"
- [4]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [5]=>
- string(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)
-string(3) "PHP"
-int(1)
-string(27) "PHP: Hypertext Preprocessor"
-int(2)
-string(4) "Test"
-string(4) "test"
-int(27)
-int(3)
-string(4) "test"
-int(4)
-array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
-}
-int(5)
-string(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)
- }
- }
-}
---UEXPECT--
array(11) {
[0]=>
unicode(3) "PHP"
?>
--EXPECTF--
Unsorted data:
-array(8) {
- [0]=>
- string(3) "PHP"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(4) "Test"
- ["test"]=>
- int(27)
- [1000]=>
- string(4) "test"
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [1001]=>
- string(6) "monkey"
- [16777216]=>
- float(-0.33333333333333)
-}
-
- -- Testing arsort() --
-No second argument:
-array(8) {
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- ["test"]=>
- int(27)
- [1000]=>
- string(4) "test"
- [1001]=>
- string(6) "monkey"
- [5]=>
- string(4) "Test"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [0]=>
- string(3) "PHP"
- [16777216]=>
- float(-0.33333333333333)
-}
-Using SORT_REGULAR:
-array(8) {
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- ["test"]=>
- int(27)
- [1000]=>
- string(4) "test"
- [1001]=>
- string(6) "monkey"
- [5]=>
- string(4) "Test"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [0]=>
- string(3) "PHP"
- [16777216]=>
- float(-0.33333333333333)
-}
-Using SORT_NUMERIC:
-array(8) {
- ["test"]=>
- int(27)
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [0]=>
- string(3) "PHP"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [1001]=>
- string(6) "monkey"
- [5]=>
- string(4) "Test"
- [1000]=>
- string(4) "test"
- [16777216]=>
- 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"
- [1001]=>
- string(6) "monkey"
- [5]=>
- string(4) "Test"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [0]=>
- string(3) "PHP"
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- ["test"]=>
- int(27)
- [16777216]=>
- float(-0.33333333333333)
-}
-
- -- Testing asort() --
-No second argument:
-array(8) {
- [16777216]=>
- float(-0.33333333333333)
- [0]=>
- string(3) "PHP"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(4) "Test"
- [1001]=>
- string(6) "monkey"
- [1000]=>
- string(4) "test"
- ["test"]=>
- int(27)
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
-}
-Using SORT_REGULAR:
-array(8) {
- [16777216]=>
- float(-0.33333333333333)
- [0]=>
- string(3) "PHP"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(4) "Test"
- [1001]=>
- string(6) "monkey"
- [1000]=>
- string(4) "test"
- ["test"]=>
- int(27)
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
-}
-Using SORT_NUMERIC:
-array(8) {
- [16777216]=>
- float(-0.33333333333333)
- [1001]=>
- string(6) "monkey"
- [1000]=>
- string(4) "test"
- [5]=>
- string(4) "Test"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [0]=>
- string(3) "PHP"
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- ["test"]=>
- 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)
- ["test"]=>
- int(27)
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [0]=>
- string(3) "PHP"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(4) "Test"
- [1001]=>
- string(6) "monkey"
- [1000]=>
- string(4) "test"
-}
-
- -- Testing krsort() --
-No second argument:
-array(8) {
- [16777216]=>
- float(-0.33333333333333)
- [1001]=>
- string(6) "monkey"
- [1000]=>
- string(4) "test"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(4) "Test"
- ["test"]=>
- int(27)
- [0]=>
- string(3) "PHP"
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
-}
-Using SORT_REGULAR:
-array(8) {
- [16777216]=>
- float(-0.33333333333333)
- [1001]=>
- string(6) "monkey"
- [1000]=>
- string(4) "test"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(4) "Test"
- [0]=>
- string(3) "PHP"
- ["test"]=>
- int(27)
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
-}
-Using SORT_NUMERIC:
-array(8) {
- [16777216]=>
- float(-0.33333333333333)
- [1001]=>
- string(6) "monkey"
- [1000]=>
- string(4) "test"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(4) "Test"
- ["test"]=>
- int(27)
- [0]=>
- string(3) "PHP"
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
-}
-Using SORT_STRING
-array(8) {
- ["test"]=>
- int(27)
- [5]=>
- string(4) "Test"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [16777216]=>
- float(-0.33333333333333)
- [1001]=>
- string(6) "monkey"
- [1000]=>
- string(4) "test"
- [0]=>
- string(3) "PHP"
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
-}
-
- -- Testing ksort() --
-No second argument:
-array(8) {
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [0]=>
- string(3) "PHP"
- ["test"]=>
- int(27)
- [5]=>
- string(4) "Test"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [1000]=>
- string(4) "test"
- [1001]=>
- string(6) "monkey"
- [16777216]=>
- float(-0.33333333333333)
-}
-Using SORT_REGULAR:
-array(8) {
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- ["test"]=>
- int(27)
- [0]=>
- string(3) "PHP"
- [5]=>
- string(4) "Test"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [1000]=>
- string(4) "test"
- [1001]=>
- string(6) "monkey"
- [16777216]=>
- float(-0.33333333333333)
-}
-Using SORT_NUMERIC:
-array(8) {
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [0]=>
- string(3) "PHP"
- ["test"]=>
- int(27)
- [5]=>
- string(4) "Test"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [1000]=>
- string(4) "test"
- [1001]=>
- string(6) "monkey"
- [16777216]=>
- float(-0.33333333333333)
-}
-Using SORT_STRING
-array(8) {
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [0]=>
- string(3) "PHP"
- [1000]=>
- string(4) "test"
- [1001]=>
- string(6) "monkey"
- [16777216]=>
- float(-0.33333333333333)
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(4) "Test"
- ["test"]=>
- int(27)
-}
-
- -- Testing rsort() --
-No second argument:
-array(8) {
- [0]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [1]=>
- int(27)
- [2]=>
- string(4) "test"
- [3]=>
- string(6) "monkey"
- [4]=>
- string(4) "Test"
- [5]=>
- string(27) "PHP: Hypertext Preprocessor"
- [6]=>
- string(3) "PHP"
- [7]=>
- float(-0.33333333333333)
-}
-Using SORT_REGULAR:
-array(8) {
- [0]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [1]=>
- int(27)
- [2]=>
- string(4) "test"
- [3]=>
- string(6) "monkey"
- [4]=>
- string(4) "Test"
- [5]=>
- string(27) "PHP: Hypertext Preprocessor"
- [6]=>
- string(3) "PHP"
- [7]=>
- float(-0.33333333333333)
-}
-Using SORT_NUMERIC:
-array(8) {
- [0]=>
- int(27)
- [1]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [2]=>
- string(3) "PHP"
- [3]=>
- string(27) "PHP: Hypertext Preprocessor"
- [4]=>
- string(6) "monkey"
- [5]=>
- string(4) "Test"
- [6]=>
- string(4) "test"
- [7]=>
- 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"
- [1]=>
- string(6) "monkey"
- [2]=>
- string(4) "Test"
- [3]=>
- string(27) "PHP: Hypertext Preprocessor"
- [4]=>
- string(3) "PHP"
- [5]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [6]=>
- int(27)
- [7]=>
- float(-0.33333333333333)
-}
-
- -- Testing sort() --
-No second argument:
-array(8) {
- [0]=>
- float(-0.33333333333333)
- [1]=>
- string(3) "PHP"
- [2]=>
- string(27) "PHP: Hypertext Preprocessor"
- [3]=>
- string(4) "Test"
- [4]=>
- string(6) "monkey"
- [5]=>
- string(4) "test"
- [6]=>
- int(27)
- [7]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
-}
-Using SORT_REGULAR:
-array(8) {
- [0]=>
- float(-0.33333333333333)
- [1]=>
- string(3) "PHP"
- [2]=>
- string(27) "PHP: Hypertext Preprocessor"
- [3]=>
- string(4) "Test"
- [4]=>
- string(6) "monkey"
- [5]=>
- string(4) "test"
- [6]=>
- int(27)
- [7]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
-}
-Using SORT_NUMERIC:
-array(8) {
- [0]=>
- float(-0.33333333333333)
- [1]=>
- string(6) "monkey"
- [2]=>
- string(4) "test"
- [3]=>
- string(4) "Test"
- [4]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(3) "PHP"
- [6]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [7]=>
- 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)
- [1]=>
- int(27)
- [2]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [3]=>
- string(3) "PHP"
- [4]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(4) "Test"
- [6]=>
- string(6) "monkey"
- [7]=>
- string(4) "test"
-}
---UEXPECTF--
-Unsorted data:
array(8) {
[0]=>
unicode(3) "PHP"
?>
--EXPECT--
-- Testing uasort() --
-array(8) {
- [16777216]=>
- float(-0.33333333333333)
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- ["test"]=>
- int(27)
- [0]=>
- string(3) "PHP"
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(4) "Test"
- [1001]=>
- string(6) "monkey"
- [1000]=>
- string(4) "test"
-}
-
- -- Testing uksort() --
-array(8) {
- [-1000]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [0]=>
- string(3) "PHP"
- [1000]=>
- string(4) "test"
- [1001]=>
- string(6) "monkey"
- [16777216]=>
- float(-0.33333333333333)
- [17]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(4) "Test"
- ["test"]=>
- int(27)
-}
-
- -- Testing usort() --
-array(8) {
- [0]=>
- float(-0.33333333333333)
- [1]=>
- array(2) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(6) "orange"
- }
- [2]=>
- int(27)
- [3]=>
- string(3) "PHP"
- [4]=>
- string(27) "PHP: Hypertext Preprocessor"
- [5]=>
- string(4) "Test"
- [6]=>
- string(6) "monkey"
- [7]=>
- string(4) "test"
-}
---UEXPECT--
--- Testing uasort() --
array(8) {
[16777216]=>
float(-0.33333333333333)
var_dump($data);
?>
--EXPECT--
-array(5) {
- [0]=>
- string(5) "Test1"
- ["teST2"]=>
- int(0)
- [5]=>
- string(5) "test2"
- ["abc"]=>
- string(6) "test10"
- [6]=>
- string(6) "test21"
-}
-array(5) {
- ["teST2"]=>
- int(0)
- [0]=>
- string(5) "Test1"
- [5]=>
- string(5) "test2"
- ["abc"]=>
- string(6) "test10"
- [6]=>
- string(6) "test21"
-}
-array(5) {
- ["teST2"]=>
- int(0)
- [0]=>
- string(5) "Test1"
- [5]=>
- string(5) "test2"
- ["abc"]=>
- string(6) "test10"
- [6]=>
- string(6) "test21"
-}
---UEXPECT--
array(5) {
[0]=>
unicode(5) "Test1"
unicode(6) "test10"
[6]=>
unicode(6) "test21"
-}
\ No newline at end of file
+}
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, 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 :
-string(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 :
-string(3) "aaa"
-
--- Input Array for Iteration 6 is --
-Array
-(
- [1] => one
- [2] => two
- [3] => three
- [4] => four
- [5] => five
-)
-
-Output after shift is :
-string(3) "one"
-
--- Input Array for Iteration 7 is --
-Array
-(
- [1] => one
- [2] => two
- [3] => 7
- [4] => four
- [5] => five
-)
-
-Output after shift is :
-string(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 :
-string(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]=>
- string(3) "oNe"
- [1]=>
- string(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
---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
?>
--EXPECT--
fubar
-array(3) {
- [0]=>
- string(3) "foo"
- [1]=>
- string(3) "bar"
- [2]=>
- string(6) "foobar"
-}
-fubar
-array(2) {
- [3]=>
- string(3) "foo"
- [4]=>
- string(3) "bar"
-}
-fubar
-array(2) {
- ["a"]=>
- string(3) "foo"
- ["b"]=>
- string(3) "bar"
-}
---UEXPECT--
-fubar
array(3) {
[0]=>
unicode(3) "foo"
[4]=>
int(5)
}
-array(5) {
- [0]=>
- int(1)
- ["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) {
- ["a"]=>
- int(2)
- ["c"]=>
- string(4) "done"
- ["fan"]=>
- string(3) "fen"
- [9]=>
- int(25)
- ["want"]=>
- string(5) "wanna"
-}
-array(9) {
- ["a"]=>
- int(2)
- ["b"]=>
- string(4) "some"
- ["c"]=>
- string(4) "done"
- ["z"]=>
- string(3) "foo"
- ["fan"]=>
- string(3) "fen"
- [9]=>
- int(25)
- [12]=>
- int(42)
- [45]=>
- int(42)
- ["want"]=>
- string(5) "wanna"
-}
--=-=-=-=-=-=-=-=- New functionality from 5.0.0 -=-=-=-=-=-=-=-
-$a=array (
- '0.1' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 12,
- 'public_member' => 12,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 23,
- 'public_member' => 23,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-$b=array (
- '0.2' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 22,
- 'public_member' => 22,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 3,
- 'public_member' => 3,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-var_dump(array_udiff_uassoc($a, $b, "comp_func_cr", "comp_func"));
-array(3) {
- ["0.1"]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(9)
- ["public_member"]=>
- int(9)
- }
- ["0.5"]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(12)
- ["public_member"]=>
- int(12)
- }
- [0]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(23)
- ["public_member"]=>
- int(23)
- }
-}
-$a=array (
- '0.1' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 12,
- 'public_member' => 12,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 23,
- 'public_member' => 23,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-$b=array (
- '0.2' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 22,
- 'public_member' => 22,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 3,
- 'public_member' => 3,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-var_dump(array_udiff_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func"));
-array(3) {
- ["0.1"]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(9)
- ["public_member"]=>
- int(9)
- }
- ["0.5"]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(12)
- ["public_member"]=>
- int(12)
- }
- [0]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(23)
- ["public_member"]=>
- int(23)
- }
-}
-$a=array (
- '0.1' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 12,
- 'public_member' => 12,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 23,
- 'public_member' => 23,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-$b=array (
- '0.2' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 22,
- 'public_member' => 22,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 3,
- 'public_member' => 3,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-var_dump(array_udiff($a, $b, "comp_func_cr"));
-array(2) {
- ["0.5"]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(12)
- ["public_member"]=>
- int(12)
- }
- [0]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(23)
- ["public_member"]=>
- int(23)
- }
-}
-$a=array (
- '0.1' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 12,
- 'public_member' => 12,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 23,
- 'public_member' => 23,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-$b=array (
- '0.2' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 22,
- 'public_member' => 22,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 3,
- 'public_member' => 3,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-var_dump(array_udiff_assoc($a, $b, "comp_func_cr"));
-array(3) {
- ["0.1"]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(9)
- ["public_member"]=>
- int(9)
- }
- ["0.5"]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(12)
- ["public_member"]=>
- int(12)
- }
- [0]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(23)
- ["public_member"]=>
- 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)
5 => 17,
);
array_intersect($a,$b,$c);
-array(3) {
- ["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) {
- ["big"]=>
- int(2)
- [1]=>
- int(2)
- [3]=>
- int(3)
- [5]=>
- int(3)
- [6]=>
- int(3)
- [8]=>
- string(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) {
- ["b"]=>
- string(4) "some"
- ["z"]=>
- string(3) "foo"
- ["gate"]=>
- string(3) "web"
- [73]=>
- string(3) "foo"
- [95]=>
- string(4) "some"
- ["som3"]=>
- string(4) "some"
-}
-array_intersect_assoc($a,$b,$c);
-array(1) {
- ["gate"]=>
- string(3) "web"
-}
-array_intersect($a,$b);
-array(11) {
- ["b"]=>
- string(4) "some"
- ["z"]=>
- string(3) "foo"
- ["f"]=>
- int(5)
- ["gate"]=>
- string(3) "web"
- [7]=>
- int(18)
- [11]=>
- int(42)
- [12]=>
- int(42)
- [45]=>
- int(42)
- [73]=>
- string(3) "foo"
- [95]=>
- string(4) "some"
- ["som3"]=>
- string(4) "some"
-}
-array_intersect_assoc($a,$b);
-array(5) {
- ["f"]=>
- int(5)
- ["gate"]=>
- string(3) "web"
- [7]=>
- int(18)
- [11]=>
- int(42)
- ["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)
echo "Done\n";
?>
---EXPECTF--
-*** 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 --
-string(1) "a"
-int(0)
-string(1) "b"
-string(1) "b"
-int(1)
-string(1) "c"
-string(1) "c"
-int(2)
-string(2) "ab"
-string(2) "ab"
-int(3)
-string(2) "ac"
-string(2) "ac"
-int(4)
-string(2) "ad"
-string(2) "ad"
-int(5)
-bool(false)
-bool(false)
-NULL
-bool(false)
-string(1) "a"
-int(0)
-array(6) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- [3]=>
- string(2) "ab"
- [4]=>
- string(2) "ac"
- [5]=>
- string(2) "ad"
-}
-
--- Iteration 6 --
-string(5) "apple"
-string(1) "a"
-string(4) "book"
-string(4) "book"
-string(1) "b"
-string(4) "cook"
-string(4) "cook"
-string(1) "c"
-bool(false)
-bool(false)
-NULL
-bool(false)
-string(5) "apple"
-string(1) "a"
-array(3) {
- ["a"]=>
- string(5) "apple"
- ["b"]=>
- string(4) "book"
- ["c"]=>
- string(4) "cook"
-}
-
--- Iteration 7 --
-string(5) "drink"
-string(1) "d"
-string(4) "port"
-string(4) "port"
-string(1) "p"
-string(3) "set"
-string(3) "set"
-string(1) "s"
-bool(false)
-bool(false)
-NULL
-bool(false)
-string(5) "drink"
-string(1) "d"
-array(3) {
- ["d"]=>
- string(5) "drink"
- ["p"]=>
- string(4) "port"
- ["s"]=>
- string(3) "set"
-}
-
--- Iteration 8 --
-string(3) "One"
-int(1)
-string(3) "two"
-string(3) "two"
-int(2)
-string(5) "three"
-string(5) "three"
-int(3)
-bool(false)
-bool(false)
-NULL
-bool(false)
-string(3) "One"
-int(1)
-array(3) {
- [1]=>
- string(3) "One"
- [2]=>
- string(3) "two"
- [3]=>
- string(5) "three"
-}
-
-
-*** Testing possible variations ***
--- Iteration 1 --
-bool(false)
-NULL
-bool(false)
-bool(false)
-NULL
-array(0) {
-}
-
--- Iteration 2 --
-string(0) ""
-int(0)
-bool(false)
-bool(false)
-NULL
-bool(false)
-string(0) ""
-int(0)
-array(1) {
- [0]=>
- string(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)
-string(0) ""
-string(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]=>
- string(0) ""
- [4]=>
- int(1)
-}
-
--- Iteration 6 --
-string(4) "test"
-int(-1)
-string(4) "rest"
-string(4) "rest"
-int(-2)
-string(3) "two"
-string(3) "two"
-int(2)
-string(0) ""
-string(0) ""
-string(0) ""
-string(4) "zero"
-string(4) "zero"
-int(0)
-bool(false)
-bool(false)
-NULL
-bool(false)
-string(4) "test"
-int(-1)
-array(5) {
- [-1]=>
- string(4) "test"
- [-2]=>
- string(4) "rest"
- [2]=>
- string(3) "two"
- [""]=>
- string(0) ""
- [0]=>
- string(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, 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, 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, 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, string given in %s on line %d
-NULL
-Done
---UEXPECTF--
+--EXPECTF--
*** Testing basic operations ***
-- Iteration 1 --
int(0)
int(5)
}
-** Iteration 7 **
-array(1) {
- [""]=>
- int(1)
-}
-array(1) {
- [""]=>
- int(1)
-}
-array(1) {
- [""]=>
- int(1)
-}
-
-** Iteration 8 **
-array(1) {
- ["a"]=>
- int(1)
-}
-array(1) {
- ["A"]=>
- int(1)
-}
-array(1) {
- ["a"]=>
- int(1)
-}
-
-** Iteration 9 **
-array(1) {
- ["z"]=>
- int(1)
-}
-array(1) {
- ["Z"]=>
- int(1)
-}
-array(1) {
- ["z"]=>
- int(1)
-}
-
-** Iteration 10 **
-array(1) {
- ["one"]=>
- int(1)
-}
-array(1) {
- ["ONE"]=>
- int(1)
-}
-array(1) {
- ["one"]=>
- int(1)
-}
-
-** Iteration 11 **
-array(1) {
- ["one"]=>
- int(1)
-}
-array(1) {
- ["ONE"]=>
- int(1)
-}
-array(1) {
- ["one"]=>
- int(1)
-}
-
-** Iteration 12 **
-array(1) {
- ["one"]=>
- int(1)
-}
-array(1) {
- ["ONE"]=>
- int(1)
-}
-array(1) {
- ["one"]=>
- int(1)
-}
-
-** Iteration 13 **
-array(1) {
- ["one"]=>
- int(1)
-}
-array(1) {
- ["ONE"]=>
- int(1)
-}
-array(1) {
- ["one"]=>
- int(1)
-}
-
-** Iteration 14 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 15 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 16 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 17 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 18 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 19 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 20 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 21 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 22 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 23 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 24 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 25 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 26 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 27 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 28 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 29 **
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-
-** Iteration 30 **
-array(2) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- [0]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
-}
-
-** Iteration 31 **
-array(2) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- [0]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
-}
-
-** Iteration 32 **
-array(2) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- [0]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
-}
-
-** Iteration 33 **
-array(2) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
-}
-array(2) {
- ["ONE"]=>
- int(1)
- [0]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
-}
-
-** Iteration 34 **
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- ["four"]=>
- string(4) "four"
-}
-array(4) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
- ["FOUR"]=>
- string(4) "four"
-}
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- ["four"]=>
- string(4) "four"
-}
-
-** Iteration 35 **
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- ["four"]=>
- string(4) "FOUR"
-}
-array(4) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
- ["FOUR"]=>
- string(4) "FOUR"
-}
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- ["four"]=>
- string(4) "FOUR"
-}
-
-** Iteration 36 **
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- ["four"]=>
- string(4) "FOUR"
-}
-array(4) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
- ["FOUR"]=>
- string(4) "FOUR"
-}
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- ["four"]=>
- string(4) "FOUR"
-}
-
-** Iteration 37 **
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- ["four"]=>
- string(4) "four"
-}
-array(4) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
- ["FOUR"]=>
- string(4) "four"
-}
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- ["four"]=>
- string(4) "four"
-}
-
-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""]=>
echo "end\n";
?>
--EXPECTF--
-Warning: array_change_key_case() expects parameter 2 to be long, string given in %s on line %d
-NULL
-array(4) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
- ["FOUR"]=>
- string(4) "four"
-}
-array(1) {
- ["one"]=>
- int(4)
-}
-
-Warning: array_change_key_case() expects parameter 2 to be long, string given in %s on line %d
-NULL
-array(1) {
- ["ONE"]=>
- int(3)
-}
-array(1) {
- ["ONE"]=>
- int(2)
-}
-end
---UEXPECTF--
Warning: array_change_key_case() expects parameter 2 to be long, Unicode string given in %s on line %d
NULL
array(4) {
-- Iteration 16 --
-Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-array(0) {
-}
-
--- Iteration 19 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_change_key_case() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_change_key_case() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 16 --
-
Warning: array_change_key_case() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
Warning: array_change_key_case() expects parameter 1 to be array, resource given in %s on line %d
NULL
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing array_change_key_case() : usage variations ***
--- Iteration 1 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 2 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 3 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 4 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 5 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 6 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 7 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 8 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 9 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 10 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 11 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 12 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 13 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 14 --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-
--- Iteration 15 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 16 --
-
-Warning: array_change_key_case() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_change_key_case() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_change_key_case() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_change_key_case() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_change_key_case() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_change_key_case() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-
--- Iteration 23 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-Done
---UEXPECTF--
-*** Testing array_change_key_case() : usage variations ***
-
-- Iteration 1 --
array(3) {
[u"one"]=>
[u"three"]=>
int(3)
}
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing array_change_key_case() : usage variations ***
--- Iteration 1 : int data --
-array(4) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [12345]=>
- string(8) "positive"
- [-2345]=>
- string(8) "negative"
-}
-
--- Iteration 2 : float data --
-array(3) {
- [10]=>
- string(8) "positive"
- [-10]=>
- string(8) "negative"
- [0]=>
- string(4) "half"
-}
-
--- Iteration 3 : extreme floats data --
-array(2) {
- [12345678]=>
- string(5) "large"
- [0]=>
- string(5) "small"
-}
-
--- Iteration 4 : null uppercase data --
-array(1) {
- [""]=>
- string(6) "null 1"
-}
-
--- Iteration 5 : null lowercase data --
-array(1) {
- [""]=>
- string(6) "null 2"
-}
-
--- Iteration 6 : bool lowercase data --
-array(2) {
- [1]=>
- string(6) "lowert"
- [0]=>
- string(6) "lowerf"
-}
-
--- Iteration 7 : bool uppercase data --
-array(2) {
- [1]=>
- string(6) "uppert"
- [0]=>
- string(6) "upperf"
-}
-
--- Iteration 8 : empty double quotes data --
-array(1) {
- [""]=>
- string(6) "emptyd"
-}
-
--- Iteration 9 : empty single quotes data --
-array(1) {
- [""]=>
- string(6) "emptys"
-}
-
--- Iteration 10 : string data --
-array(3) {
- ["STRINGD"]=>
- string(7) "stringd"
- ["STRINGS"]=>
- string(7) "strings"
- ["HELLO WORLD"]=>
- string(7) "stringh"
-}
-
--- Iteration 11 : undefined data --
-array(1) {
- [""]=>
- string(9) "undefined"
-}
-
--- Iteration 12 : unset data --
-array(1) {
- [""]=>
- string(5) "unset"
-}
-Done
---UEXPECTF--
-*** Testing array_change_key_case() : usage variations ***
-
-- Iteration 1 : int data --
array(4) {
[0]=>
[u""]=>
unicode(5) "unset"
}
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing array_change_key_case() : usage variations ***
--- $sort argument is -5 --
-array(3) {
- ["ONE"]=>
- string(2) "un"
- ["TWO"]=>
- string(4) "deux"
- ["THREE"]=>
- string(5) "trois"
-}
-
--- $sort argument is -4 --
-array(3) {
- ["ONE"]=>
- string(2) "un"
- ["TWO"]=>
- string(4) "deux"
- ["THREE"]=>
- string(5) "trois"
-}
-
--- $sort argument is -3 --
-array(3) {
- ["ONE"]=>
- string(2) "un"
- ["TWO"]=>
- string(4) "deux"
- ["THREE"]=>
- string(5) "trois"
-}
-
--- $sort argument is -2 --
-array(3) {
- ["ONE"]=>
- string(2) "un"
- ["TWO"]=>
- string(4) "deux"
- ["THREE"]=>
- string(5) "trois"
-}
-
--- $sort argument is -1 --
-array(3) {
- ["ONE"]=>
- string(2) "un"
- ["TWO"]=>
- string(4) "deux"
- ["THREE"]=>
- string(5) "trois"
-}
-
--- $sort argument is 0 --
-array(3) {
- ["one"]=>
- string(2) "un"
- ["two"]=>
- string(4) "deux"
- ["three"]=>
- string(5) "trois"
-}
-
--- $sort argument is 1 --
-array(3) {
- ["ONE"]=>
- string(2) "un"
- ["TWO"]=>
- string(4) "deux"
- ["THREE"]=>
- string(5) "trois"
-}
-
--- $sort argument is 2 --
-array(3) {
- ["ONE"]=>
- string(2) "un"
- ["TWO"]=>
- string(4) "deux"
- ["THREE"]=>
- string(5) "trois"
-}
-
--- $sort argument is 3 --
-array(3) {
- ["ONE"]=>
- string(2) "un"
- ["TWO"]=>
- string(4) "deux"
- ["THREE"]=>
- string(5) "trois"
-}
-
--- $sort argument is 4 --
-array(3) {
- ["ONE"]=>
- string(2) "un"
- ["TWO"]=>
- string(4) "deux"
- ["THREE"]=>
- string(5) "trois"
-}
-
--- $sort argument is 5 --
-array(3) {
- ["ONE"]=>
- string(2) "un"
- ["TWO"]=>
- string(4) "deux"
- ["THREE"]=>
- string(5) "trois"
-}
-Done
---UEXPECTF--
-*** Testing array_change_key_case() : usage variations ***
-
-- $sort argument is -5 --
array(3) {
[u"ONE"]=>
[u"THREE"]=>
unicode(5) "trois"
}
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing array_change_key_case() : usage variations ***
--- Call array_change_key_case() --
-array(3) {
- ["ONE"]=>
- string(2) "un"
- ["TWO"]=>
- string(4) "deux"
- ["THREE"]=>
- string(5) "trois"
-}
--- Position of Internal Pointer in Result: --
-ONE => un
-
--- Position of Internal Pointer in Original Array: --
-one => un
-Done
---UEXPECTF--
-*** Testing array_change_key_case() : usage variations ***
-
-- Call array_change_key_case() --
array(3) {
[u"ONE"]=>
-- Position of Internal Pointer in Original Array: --
one => un
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing array_change_key_case() : usage variations ***
--- Pass a two-dimensional array as $input argument --
-array(3) {
- ["ENGLISH"]=>
- array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- }
- ["FRENCH"]=>
- array(3) {
- ["un"]=>
- int(1)
- ["deux"]=>
- int(2)
- ["trois"]=>
- int(3)
- }
- ["GERMAN"]=>
- array(3) {
- ["eins"]=>
- int(1)
- ["zwei"]=>
- int(2)
- ["drei"]=>
- int(3)
- }
-}
-
--- Pass a sub-arry as $input argument --
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["THREE"]=>
- int(3)
-}
-Done
---UEXPECTF--
-*** Testing array_change_key_case() : usage variations ***
-
-- Pass a two-dimensional array as $input argument --
array(3) {
[u"ENGLISH"]=>
[u"THREE"]=>
int(3)
}
-Done
\ No newline at end of file
+Done
Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
*** Testing array_change_key_case() : usage variations ***
--- $input argument is a reference to array --
-Result:
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["ABC"]=>
- string(3) "xyz"
-}
-Original:
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["ABC"]=>
- string(3) "xyz"
-}
-Referenced:
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["ABC"]=>
- string(3) "xyz"
-}
-
--- $input is an array passed by reference --
-Result:
-array(3) {
- ["ONE"]=>
- int(1)
- ["TWO"]=>
- int(2)
- ["ABC"]=>
- string(3) "xyz"
-}
-Original:
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["ABC"]=>
- string(3) "xyz"
-}
-Done
---UEXPECTF--
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-*** Testing array_change_key_case() : usage variations ***
-
-- $input argument is a reference to array --
Result:
array(3) {
--EXPECTF--
*** Testing array_change_key_case() : usage variations ***
--- $case = default --
-array(10) {
- [""]=>
- int(2)
- ["\a"]=>
- int(3)
- ["\cx"]=>
- int(4)
- ["\e"]=>
- int(5)
- ["\f"]=>
- int(6)
- ["
-"]=>
- int(7)
- [" "]=>
- int(8)
- ["\xhh"]=>
- int(9)
- ["\ddd"]=>
- int(10)
- ["\v"]=>
- int(11)
-}
--- $case = upper --
-array(10) {
- [""]=>
- int(2)
- ["\A"]=>
- int(3)
- ["\CX"]=>
- int(4)
- ["\E"]=>
- int(5)
- ["\f"]=>
- int(6)
- ["
-"]=>
- int(7)
- [" "]=>
- int(8)
- ["\XHH"]=>
- int(9)
- ["\DDD"]=>
- int(10)
- ["\v"]=>
- int(11)
-}
-
--- $case = default --
-array(9) {
- ["lemon"]=>
- int(1)
- ["orange"]=>
- int(11)
- ["banana"]=>
- int(12)
- ["apple"]=>
- int(4)
- ["test"]=>
- int(5)
- ["tttt"]=>
- int(6)
- ["ttt"]=>
- int(7)
- ["ww"]=>
- int(8)
- ["x"]=>
- int(10)
-}
--- $case = upper --
-array(9) {
- ["LEMON"]=>
- int(1)
- ["ORANGE"]=>
- int(11)
- ["BANANA"]=>
- int(12)
- ["APPLE"]=>
- int(4)
- ["TEST"]=>
- int(5)
- ["TTTT"]=>
- int(6)
- ["TTT"]=>
- int(7)
- ["WW"]=>
- int(8)
- ["X"]=>
- int(10)
-}
-Done
---UEXPECTF--
-*** Testing array_change_key_case() : usage variations ***
-
-- $case = default --
array(10) {
[u""]=>
[u"X"]=>
int(10)
}
-Done
\ No newline at end of file
+Done
}
-===========================================
-array(1) {
- ["a"]=>
- int(1)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- ["a"]=>
- int(1)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
-
-
-===========================================
-array(2) {
- ["b"]=>
- int(1)
- ["c"]=>
- int(2)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- ["b"]=>
- int(1)
- }
- [1]=>
- array(1) {
- ["c"]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-
-[2]
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- ["b"]=>
- int(1)
- ["c"]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
-
-===========================================
-array(6) {
- ["p"]=>
- int(1)
- ["q"]=>
- int(2)
- ["r"]=>
- int(3)
- ["s"]=>
- int(4)
- ["u"]=>
- int(5)
- ["v"]=>
- int(6)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(6) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
- [3]=>
- array(1) {
- [0]=>
- int(4)
- }
- [4]=>
- array(1) {
- [0]=>
- int(5)
- }
- [5]=>
- array(1) {
- [0]=>
- int(6)
- }
-}
-array(6) {
- [0]=>
- array(1) {
- ["p"]=>
- int(1)
- }
- [1]=>
- array(1) {
- ["q"]=>
- int(2)
- }
- [2]=>
- array(1) {
- ["r"]=>
- int(3)
- }
- [3]=>
- array(1) {
- ["s"]=>
- int(4)
- }
- [4]=>
- array(1) {
- ["u"]=>
- int(5)
- }
- [5]=>
- array(1) {
- ["v"]=>
- int(6)
- }
-}
-array(6) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
- [3]=>
- array(1) {
- [0]=>
- int(4)
- }
- [4]=>
- array(1) {
- [0]=>
- int(5)
- }
- [5]=>
- array(1) {
- [0]=>
- int(6)
- }
-}
-
-[2]
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(4)
- }
- [2]=>
- array(2) {
- [0]=>
- int(5)
- [1]=>
- int(6)
- }
-}
-array(3) {
- [0]=>
- array(2) {
- ["p"]=>
- int(1)
- ["q"]=>
- int(2)
- }
- [1]=>
- array(2) {
- ["r"]=>
- int(3)
- ["s"]=>
- int(4)
- }
- [2]=>
- array(2) {
- ["u"]=>
- int(5)
- ["v"]=>
- int(6)
- }
-}
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(4)
- }
- [2]=>
- array(2) {
- [0]=>
- int(5)
- [1]=>
- int(6)
- }
-}
-
-[3]
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [1]=>
- array(3) {
- [0]=>
- int(4)
- [1]=>
- int(5)
- [2]=>
- int(6)
- }
-}
-array(2) {
- [0]=>
- array(3) {
- ["p"]=>
- int(1)
- ["q"]=>
- int(2)
- ["r"]=>
- int(3)
- }
- [1]=>
- array(3) {
- ["s"]=>
- int(4)
- ["u"]=>
- int(5)
- ["v"]=>
- int(6)
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [1]=>
- array(3) {
- [0]=>
- int(4)
- [1]=>
- int(5)
- [2]=>
- int(6)
- }
-}
-
-[4]
-array(2) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
- [1]=>
- array(2) {
- [0]=>
- int(5)
- [1]=>
- int(6)
- }
-}
-array(2) {
- [0]=>
- array(4) {
- ["p"]=>
- int(1)
- ["q"]=>
- int(2)
- ["r"]=>
- int(3)
- ["s"]=>
- int(4)
- }
- [1]=>
- array(2) {
- ["u"]=>
- int(5)
- ["v"]=>
- int(6)
- }
-}
-array(2) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
- [1]=>
- array(2) {
- [0]=>
- int(5)
- [1]=>
- int(6)
- }
-}
-
-[5]
-array(2) {
- [0]=>
- array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- }
- [1]=>
- array(1) {
- [0]=>
- int(6)
- }
-}
-array(2) {
- [0]=>
- array(5) {
- ["p"]=>
- int(1)
- ["q"]=>
- int(2)
- ["r"]=>
- int(3)
- ["s"]=>
- int(4)
- ["u"]=>
- int(5)
- }
- [1]=>
- array(1) {
- ["v"]=>
- int(6)
- }
-}
-array(2) {
- [0]=>
- array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- }
- [1]=>
- array(1) {
- [0]=>
- int(6)
- }
-}
-
-[6]
-array(1) {
- [0]=>
- array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- }
-}
-array(1) {
- [0]=>
- array(6) {
- ["p"]=>
- int(1)
- ["q"]=>
- int(2)
- ["r"]=>
- int(3)
- ["s"]=>
- int(4)
- ["u"]=>
- int(5)
- ["v"]=>
- int(6)
- }
-}
-array(1) {
- [0]=>
- array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- }
-}
-
-
-===========================================
-array(1) {
- ["a"]=>
- string(1) "A"
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- string(1) "A"
- }
-}
-array(1) {
- [0]=>
- array(1) {
- ["a"]=>
- string(1) "A"
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- string(1) "A"
- }
-}
-
-
-===========================================
-array(6) {
- ["p"]=>
- string(1) "A"
- ["q"]=>
- string(1) "B"
- ["r"]=>
- string(1) "C"
- ["s"]=>
- string(1) "D"
- ["u"]=>
- string(1) "E"
- ["v"]=>
- string(1) "F"
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(6) {
- [0]=>
- array(1) {
- [0]=>
- string(1) "A"
- }
- [1]=>
- array(1) {
- [0]=>
- string(1) "B"
- }
- [2]=>
- array(1) {
- [0]=>
- string(1) "C"
- }
- [3]=>
- array(1) {
- [0]=>
- string(1) "D"
- }
- [4]=>
- array(1) {
- [0]=>
- string(1) "E"
- }
- [5]=>
- array(1) {
- [0]=>
- string(1) "F"
- }
-}
-array(6) {
- [0]=>
- array(1) {
- ["p"]=>
- string(1) "A"
- }
- [1]=>
- array(1) {
- ["q"]=>
- string(1) "B"
- }
- [2]=>
- array(1) {
- ["r"]=>
- string(1) "C"
- }
- [3]=>
- array(1) {
- ["s"]=>
- string(1) "D"
- }
- [4]=>
- array(1) {
- ["u"]=>
- string(1) "E"
- }
- [5]=>
- array(1) {
- ["v"]=>
- string(1) "F"
- }
-}
-array(6) {
- [0]=>
- array(1) {
- [0]=>
- string(1) "A"
- }
- [1]=>
- array(1) {
- [0]=>
- string(1) "B"
- }
- [2]=>
- array(1) {
- [0]=>
- string(1) "C"
- }
- [3]=>
- array(1) {
- [0]=>
- string(1) "D"
- }
- [4]=>
- array(1) {
- [0]=>
- string(1) "E"
- }
- [5]=>
- array(1) {
- [0]=>
- string(1) "F"
- }
-}
-
-[2]
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- }
- [1]=>
- array(2) {
- [0]=>
- string(1) "C"
- [1]=>
- string(1) "D"
- }
- [2]=>
- array(2) {
- [0]=>
- string(1) "E"
- [1]=>
- string(1) "F"
- }
-}
-array(3) {
- [0]=>
- array(2) {
- ["p"]=>
- string(1) "A"
- ["q"]=>
- string(1) "B"
- }
- [1]=>
- array(2) {
- ["r"]=>
- string(1) "C"
- ["s"]=>
- string(1) "D"
- }
- [2]=>
- array(2) {
- ["u"]=>
- string(1) "E"
- ["v"]=>
- string(1) "F"
- }
-}
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- }
- [1]=>
- array(2) {
- [0]=>
- string(1) "C"
- [1]=>
- string(1) "D"
- }
- [2]=>
- array(2) {
- [0]=>
- string(1) "E"
- [1]=>
- string(1) "F"
- }
-}
-
-[3]
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- }
- [1]=>
- array(3) {
- [0]=>
- string(1) "D"
- [1]=>
- string(1) "E"
- [2]=>
- string(1) "F"
- }
-}
-array(2) {
- [0]=>
- array(3) {
- ["p"]=>
- string(1) "A"
- ["q"]=>
- string(1) "B"
- ["r"]=>
- string(1) "C"
- }
- [1]=>
- array(3) {
- ["s"]=>
- string(1) "D"
- ["u"]=>
- string(1) "E"
- ["v"]=>
- string(1) "F"
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- }
- [1]=>
- array(3) {
- [0]=>
- string(1) "D"
- [1]=>
- string(1) "E"
- [2]=>
- string(1) "F"
- }
-}
-
-[4]
-array(2) {
- [0]=>
- array(4) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- [3]=>
- string(1) "D"
- }
- [1]=>
- array(2) {
- [0]=>
- string(1) "E"
- [1]=>
- string(1) "F"
- }
-}
-array(2) {
- [0]=>
- array(4) {
- ["p"]=>
- string(1) "A"
- ["q"]=>
- string(1) "B"
- ["r"]=>
- string(1) "C"
- ["s"]=>
- string(1) "D"
- }
- [1]=>
- array(2) {
- ["u"]=>
- string(1) "E"
- ["v"]=>
- string(1) "F"
- }
-}
-array(2) {
- [0]=>
- array(4) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- [3]=>
- string(1) "D"
- }
- [1]=>
- array(2) {
- [0]=>
- string(1) "E"
- [1]=>
- string(1) "F"
- }
-}
-
-[5]
-array(2) {
- [0]=>
- array(5) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- [3]=>
- string(1) "D"
- [4]=>
- string(1) "E"
- }
- [1]=>
- array(1) {
- [0]=>
- string(1) "F"
- }
-}
-array(2) {
- [0]=>
- array(5) {
- ["p"]=>
- string(1) "A"
- ["q"]=>
- string(1) "B"
- ["r"]=>
- string(1) "C"
- ["s"]=>
- string(1) "D"
- ["u"]=>
- string(1) "E"
- }
- [1]=>
- array(1) {
- ["v"]=>
- string(1) "F"
- }
-}
-array(2) {
- [0]=>
- array(5) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- [3]=>
- string(1) "D"
- [4]=>
- string(1) "E"
- }
- [1]=>
- array(1) {
- [0]=>
- string(1) "F"
- }
-}
-
-[6]
-array(1) {
- [0]=>
- array(6) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- [3]=>
- string(1) "D"
- [4]=>
- string(1) "E"
- [5]=>
- string(1) "F"
- }
-}
-array(1) {
- [0]=>
- array(6) {
- ["p"]=>
- string(1) "A"
- ["q"]=>
- string(1) "B"
- ["r"]=>
- string(1) "C"
- ["s"]=>
- string(1) "D"
- ["u"]=>
- string(1) "E"
- ["v"]=>
- string(1) "F"
- }
-}
-array(1) {
- [0]=>
- array(6) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- [3]=>
- string(1) "D"
- [4]=>
- string(1) "E"
- [5]=>
- string(1) "F"
- }
-}
-
-
-end
---UEXPECT--
-===========================================
-array(0) {
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-
-===========================================
-array(1) {
- [0]=>
- int(0)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
-}
-
-
-===========================================
-array(1) {
- [0]=>
- int(1)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
-
-
-===========================================
-array(1) {
- [0]=>
- int(-1)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(-1)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(-1)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(-1)
- }
-}
-
-
-===========================================
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(2)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [1]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-
-[2]
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(2)
- }
-}
-
-
-===========================================
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [1]=>
- int(2)
- }
- [2]=>
- array(1) {
- [2]=>
- int(3)
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-
-[2]
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(1) {
- [2]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-
-[3]
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-
-
-===========================================
-array(1) {
- [1]=>
- int(0)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [1]=>
- int(0)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
-}
-
-
-===========================================
-array(1) {
- [2]=>
- int(1)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [2]=>
- int(1)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
-
-
-===========================================
-array(1) {
- [3]=>
- int(-1)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(-1)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [3]=>
- int(-1)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(-1)
- }
-}
-
-
-===========================================
-array(2) {
- [1]=>
- int(0)
- [2]=>
- int(2)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [1]=>
- int(0)
- }
- [1]=>
- array(1) {
- [2]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-
-[2]
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [1]=>
- int(0)
- [2]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(2)
- }
-}
-
-
-===========================================
-array(3) {
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [1]=>
- int(1)
- }
- [1]=>
- array(1) {
- [2]=>
- int(2)
- }
- [2]=>
- array(1) {
- [3]=>
- int(3)
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-
-[2]
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
- [1]=>
- array(1) {
- [3]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-
-[3]
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-array(1) {
- [0]=>
- array(3) {
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
-}
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-
-
-===========================================
-array(2) {
- [0]=>
- int(0)
- [3]=>
- int(2)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [3]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-
-[2]
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [3]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(2)
- }
-}
-
-
-===========================================
-array(3) {
- [1]=>
- int(1)
- [5]=>
- int(2)
- [8]=>
- int(3)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [1]=>
- int(1)
- }
- [1]=>
- array(1) {
- [5]=>
- int(2)
- }
- [2]=>
- array(1) {
- [8]=>
- int(3)
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-
-[2]
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [1]=>
- int(1)
- [5]=>
- int(2)
- }
- [1]=>
- array(1) {
- [8]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-
-[3]
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-array(1) {
- [0]=>
- array(3) {
- [1]=>
- int(1)
- [5]=>
- int(2)
- [8]=>
- int(3)
- }
-}
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-
-
-===========================================
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [1]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-
-[2]
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
-
-===========================================
-array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(1)
- }
- [2]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [1]=>
- int(1)
- }
- [2]=>
- array(1) {
- [2]=>
- int(2)
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(1)
- }
- [2]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-
-[2]
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- }
- [1]=>
- array(1) {
- [2]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-
-[3]
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
-}
-
-
-===========================================
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [1]=>
- int(2)
- }
- [2]=>
- array(1) {
- [2]=>
- int(3)
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-
-[2]
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(1) {
- [2]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-
-[3]
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-
-
-===========================================
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(4) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(1)
- }
- [2]=>
- array(1) {
- [0]=>
- int(2)
- }
- [3]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-array(4) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [1]=>
- int(1)
- }
- [2]=>
- array(1) {
- [2]=>
- int(2)
- }
- [3]=>
- array(1) {
- [3]=>
- int(3)
- }
-}
-array(4) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(1)
- }
- [2]=>
- array(1) {
- [0]=>
- int(2)
- }
- [3]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-
-[2]
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- }
- [1]=>
- array(2) {
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- }
-}
-
-[3]
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
- [1]=>
- array(1) {
- [3]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-
-[4]
-array(1) {
- [0]=>
- array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
-}
-array(1) {
- [0]=>
- array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
-}
-array(1) {
- [0]=>
- array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
-}
-
-
-===========================================
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(4) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
- [3]=>
- array(1) {
- [0]=>
- int(4)
- }
-}
-array(4) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [1]=>
- int(2)
- }
- [2]=>
- array(1) {
- [2]=>
- int(3)
- }
- [3]=>
- array(1) {
- [3]=>
- int(4)
- }
-}
-array(4) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
- [3]=>
- array(1) {
- [0]=>
- int(4)
- }
-}
-
-[2]
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(4)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(4)
- }
-}
-
-[3]
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [1]=>
- array(1) {
- [0]=>
- int(4)
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [1]=>
- array(1) {
- [3]=>
- int(4)
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [1]=>
- array(1) {
- [0]=>
- int(4)
- }
-}
-
-[4]
-array(1) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
-}
-array(1) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
-}
-array(1) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
-}
-
-
-===========================================
-array(5) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(5) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(1)
- }
- [2]=>
- array(1) {
- [0]=>
- int(2)
- }
- [3]=>
- array(1) {
- [0]=>
- int(3)
- }
- [4]=>
- array(1) {
- [0]=>
- int(4)
- }
-}
-array(5) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [1]=>
- int(1)
- }
- [2]=>
- array(1) {
- [2]=>
- int(2)
- }
- [3]=>
- array(1) {
- [3]=>
- int(3)
- }
- [4]=>
- array(1) {
- [4]=>
- int(4)
- }
-}
-array(5) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(1)
- }
- [2]=>
- array(1) {
- [0]=>
- int(2)
- }
- [3]=>
- array(1) {
- [0]=>
- int(3)
- }
- [4]=>
- array(1) {
- [0]=>
- int(4)
- }
-}
-
-[2]
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- }
- [2]=>
- array(1) {
- [0]=>
- int(4)
- }
-}
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- }
- [1]=>
- array(2) {
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
- [2]=>
- array(1) {
- [4]=>
- int(4)
- }
-}
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- }
- [2]=>
- array(1) {
- [0]=>
- int(4)
- }
-}
-
-[3]
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(4)
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
- [1]=>
- array(2) {
- [3]=>
- int(3)
- [4]=>
- int(4)
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(4)
- }
-}
-
-[4]
-array(2) {
- [0]=>
- array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
- [1]=>
- array(1) {
- [0]=>
- int(4)
- }
-}
-array(2) {
- [0]=>
- array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
- [1]=>
- array(1) {
- [4]=>
- int(4)
- }
-}
-array(2) {
- [0]=>
- array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
- [1]=>
- array(1) {
- [0]=>
- int(4)
- }
-}
-
-[5]
-array(1) {
- [0]=>
- array(5) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- }
-}
-array(1) {
- [0]=>
- array(5) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- }
-}
-array(1) {
- [0]=>
- array(5) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- }
-}
-
-
-===========================================
-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)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(10) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
- [3]=>
- array(1) {
- [0]=>
- int(4)
- }
- [4]=>
- array(1) {
- [0]=>
- int(5)
- }
- [5]=>
- array(1) {
- [0]=>
- int(6)
- }
- [6]=>
- array(1) {
- [0]=>
- int(7)
- }
- [7]=>
- array(1) {
- [0]=>
- int(8)
- }
- [8]=>
- array(1) {
- [0]=>
- int(9)
- }
- [9]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-array(10) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [1]=>
- int(2)
- }
- [2]=>
- array(1) {
- [2]=>
- int(3)
- }
- [3]=>
- array(1) {
- [3]=>
- int(4)
- }
- [4]=>
- array(1) {
- [4]=>
- int(5)
- }
- [5]=>
- array(1) {
- [5]=>
- int(6)
- }
- [6]=>
- array(1) {
- [6]=>
- int(7)
- }
- [7]=>
- array(1) {
- [7]=>
- int(8)
- }
- [8]=>
- array(1) {
- [8]=>
- int(9)
- }
- [9]=>
- array(1) {
- [9]=>
- int(10)
- }
-}
-array(10) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
- [3]=>
- array(1) {
- [0]=>
- int(4)
- }
- [4]=>
- array(1) {
- [0]=>
- int(5)
- }
- [5]=>
- array(1) {
- [0]=>
- int(6)
- }
- [6]=>
- array(1) {
- [0]=>
- int(7)
- }
- [7]=>
- array(1) {
- [0]=>
- int(8)
- }
- [8]=>
- array(1) {
- [0]=>
- int(9)
- }
- [9]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-
-[2]
-array(5) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(4)
- }
- [2]=>
- array(2) {
- [0]=>
- int(5)
- [1]=>
- int(6)
- }
- [3]=>
- array(2) {
- [0]=>
- int(7)
- [1]=>
- int(8)
- }
- [4]=>
- array(2) {
- [0]=>
- int(9)
- [1]=>
- int(10)
- }
-}
-array(5) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
- [2]=>
- array(2) {
- [4]=>
- int(5)
- [5]=>
- int(6)
- }
- [3]=>
- array(2) {
- [6]=>
- int(7)
- [7]=>
- int(8)
- }
- [4]=>
- array(2) {
- [8]=>
- int(9)
- [9]=>
- int(10)
- }
-}
-array(5) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(4)
- }
- [2]=>
- array(2) {
- [0]=>
- int(5)
- [1]=>
- int(6)
- }
- [3]=>
- array(2) {
- [0]=>
- int(7)
- [1]=>
- int(8)
- }
- [4]=>
- array(2) {
- [0]=>
- int(9)
- [1]=>
- int(10)
- }
-}
-
-[3]
-array(4) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [1]=>
- array(3) {
- [0]=>
- int(4)
- [1]=>
- int(5)
- [2]=>
- int(6)
- }
- [2]=>
- array(3) {
- [0]=>
- int(7)
- [1]=>
- int(8)
- [2]=>
- int(9)
- }
- [3]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-array(4) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [1]=>
- array(3) {
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- }
- [2]=>
- array(3) {
- [6]=>
- int(7)
- [7]=>
- int(8)
- [8]=>
- int(9)
- }
- [3]=>
- array(1) {
- [9]=>
- int(10)
- }
-}
-array(4) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [1]=>
- array(3) {
- [0]=>
- int(4)
- [1]=>
- int(5)
- [2]=>
- int(6)
- }
- [2]=>
- array(3) {
- [0]=>
- int(7)
- [1]=>
- int(8)
- [2]=>
- int(9)
- }
- [3]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-
-[4]
-array(3) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
- [1]=>
- array(4) {
- [0]=>
- int(5)
- [1]=>
- int(6)
- [2]=>
- int(7)
- [3]=>
- int(8)
- }
- [2]=>
- array(2) {
- [0]=>
- int(9)
- [1]=>
- int(10)
- }
-}
-array(3) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
- [1]=>
- array(4) {
- [4]=>
- int(5)
- [5]=>
- int(6)
- [6]=>
- int(7)
- [7]=>
- int(8)
- }
- [2]=>
- array(2) {
- [8]=>
- int(9)
- [9]=>
- int(10)
- }
-}
-array(3) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
- [1]=>
- array(4) {
- [0]=>
- int(5)
- [1]=>
- int(6)
- [2]=>
- int(7)
- [3]=>
- int(8)
- }
- [2]=>
- array(2) {
- [0]=>
- int(9)
- [1]=>
- int(10)
- }
-}
-
-[5]
-array(2) {
- [0]=>
- array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- }
- [1]=>
- array(5) {
- [0]=>
- int(6)
- [1]=>
- int(7)
- [2]=>
- int(8)
- [3]=>
- int(9)
- [4]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- }
- [1]=>
- array(5) {
- [5]=>
- int(6)
- [6]=>
- int(7)
- [7]=>
- int(8)
- [8]=>
- int(9)
- [9]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- }
- [1]=>
- array(5) {
- [0]=>
- int(6)
- [1]=>
- int(7)
- [2]=>
- int(8)
- [3]=>
- int(9)
- [4]=>
- int(10)
- }
-}
-
-[6]
-array(2) {
- [0]=>
- array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- }
- [1]=>
- array(4) {
- [0]=>
- int(7)
- [1]=>
- int(8)
- [2]=>
- int(9)
- [3]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- }
- [1]=>
- array(4) {
- [6]=>
- int(7)
- [7]=>
- int(8)
- [8]=>
- int(9)
- [9]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- }
- [1]=>
- array(4) {
- [0]=>
- int(7)
- [1]=>
- int(8)
- [2]=>
- int(9)
- [3]=>
- int(10)
- }
-}
-
-[7]
-array(2) {
- [0]=>
- array(7) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- [6]=>
- int(7)
- }
- [1]=>
- array(3) {
- [0]=>
- int(8)
- [1]=>
- int(9)
- [2]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(7) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- [6]=>
- int(7)
- }
- [1]=>
- array(3) {
- [7]=>
- int(8)
- [8]=>
- int(9)
- [9]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(7) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- [6]=>
- int(7)
- }
- [1]=>
- array(3) {
- [0]=>
- int(8)
- [1]=>
- int(9)
- [2]=>
- int(10)
- }
-}
-
-[8]
-array(2) {
- [0]=>
- array(8) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- [6]=>
- int(7)
- [7]=>
- int(8)
- }
- [1]=>
- array(2) {
- [0]=>
- int(9)
- [1]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(8) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- [6]=>
- int(7)
- [7]=>
- int(8)
- }
- [1]=>
- array(2) {
- [8]=>
- int(9)
- [9]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(8) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- [6]=>
- int(7)
- [7]=>
- int(8)
- }
- [1]=>
- array(2) {
- [0]=>
- int(9)
- [1]=>
- int(10)
- }
-}
-
-[9]
-array(2) {
- [0]=>
- array(9) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- [6]=>
- int(7)
- [7]=>
- int(8)
- [8]=>
- int(9)
- }
- [1]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(9) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- [6]=>
- int(7)
- [7]=>
- int(8)
- [8]=>
- int(9)
- }
- [1]=>
- array(1) {
- [9]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(9) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- [6]=>
- int(7)
- [7]=>
- int(8)
- [8]=>
- int(9)
- }
- [1]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-
-[10]
-array(1) {
- [0]=>
- 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)
- }
-}
-array(1) {
- [0]=>
- 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)
- }
-}
-array(1) {
- [0]=>
- 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)
- }
-}
-
-
-===========================================
-array(11) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- [9]=>
- int(9)
- [10]=>
- int(10)
-}
--------------------------------------------
-[0]
-NULL
-NULL
-NULL
-
-[1]
-array(11) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(1)
- }
- [2]=>
- array(1) {
- [0]=>
- int(2)
- }
- [3]=>
- array(1) {
- [0]=>
- int(3)
- }
- [4]=>
- array(1) {
- [0]=>
- int(4)
- }
- [5]=>
- array(1) {
- [0]=>
- int(5)
- }
- [6]=>
- array(1) {
- [0]=>
- int(6)
- }
- [7]=>
- array(1) {
- [0]=>
- int(7)
- }
- [8]=>
- array(1) {
- [0]=>
- int(8)
- }
- [9]=>
- array(1) {
- [0]=>
- int(9)
- }
- [10]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-array(11) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [1]=>
- int(1)
- }
- [2]=>
- array(1) {
- [2]=>
- int(2)
- }
- [3]=>
- array(1) {
- [3]=>
- int(3)
- }
- [4]=>
- array(1) {
- [4]=>
- int(4)
- }
- [5]=>
- array(1) {
- [5]=>
- int(5)
- }
- [6]=>
- array(1) {
- [6]=>
- int(6)
- }
- [7]=>
- array(1) {
- [7]=>
- int(7)
- }
- [8]=>
- array(1) {
- [8]=>
- int(8)
- }
- [9]=>
- array(1) {
- [9]=>
- int(9)
- }
- [10]=>
- array(1) {
- [10]=>
- int(10)
- }
-}
-array(11) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(1)
- }
- [2]=>
- array(1) {
- [0]=>
- int(2)
- }
- [3]=>
- array(1) {
- [0]=>
- int(3)
- }
- [4]=>
- array(1) {
- [0]=>
- int(4)
- }
- [5]=>
- array(1) {
- [0]=>
- int(5)
- }
- [6]=>
- array(1) {
- [0]=>
- int(6)
- }
- [7]=>
- array(1) {
- [0]=>
- int(7)
- }
- [8]=>
- array(1) {
- [0]=>
- int(8)
- }
- [9]=>
- array(1) {
- [0]=>
- int(9)
- }
- [10]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-
-[2]
-array(6) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- }
- [2]=>
- array(2) {
- [0]=>
- int(4)
- [1]=>
- int(5)
- }
- [3]=>
- array(2) {
- [0]=>
- int(6)
- [1]=>
- int(7)
- }
- [4]=>
- array(2) {
- [0]=>
- int(8)
- [1]=>
- int(9)
- }
- [5]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-array(6) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- }
- [1]=>
- array(2) {
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
- [2]=>
- array(2) {
- [4]=>
- int(4)
- [5]=>
- int(5)
- }
- [3]=>
- array(2) {
- [6]=>
- int(6)
- [7]=>
- int(7)
- }
- [4]=>
- array(2) {
- [8]=>
- int(8)
- [9]=>
- int(9)
- }
- [5]=>
- array(1) {
- [10]=>
- int(10)
- }
-}
-array(6) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- }
- [2]=>
- array(2) {
- [0]=>
- int(4)
- [1]=>
- int(5)
- }
- [3]=>
- array(2) {
- [0]=>
- int(6)
- [1]=>
- int(7)
- }
- [4]=>
- array(2) {
- [0]=>
- int(8)
- [1]=>
- int(9)
- }
- [5]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-
-[3]
-array(4) {
- [0]=>
- array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
- [1]=>
- array(3) {
- [0]=>
- int(3)
- [1]=>
- int(4)
- [2]=>
- int(5)
- }
- [2]=>
- array(3) {
- [0]=>
- int(6)
- [1]=>
- int(7)
- [2]=>
- int(8)
- }
- [3]=>
- array(2) {
- [0]=>
- int(9)
- [1]=>
- int(10)
- }
-}
-array(4) {
- [0]=>
- array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
- [1]=>
- array(3) {
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- }
- [2]=>
- array(3) {
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- }
- [3]=>
- array(2) {
- [9]=>
- int(9)
- [10]=>
- int(10)
- }
-}
-array(4) {
- [0]=>
- array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- }
- [1]=>
- array(3) {
- [0]=>
- int(3)
- [1]=>
- int(4)
- [2]=>
- int(5)
- }
- [2]=>
- array(3) {
- [0]=>
- int(6)
- [1]=>
- int(7)
- [2]=>
- int(8)
- }
- [3]=>
- array(2) {
- [0]=>
- int(9)
- [1]=>
- int(10)
- }
-}
-
-[4]
-array(3) {
- [0]=>
- array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
- [1]=>
- array(4) {
- [0]=>
- int(4)
- [1]=>
- int(5)
- [2]=>
- int(6)
- [3]=>
- int(7)
- }
- [2]=>
- array(3) {
- [0]=>
- int(8)
- [1]=>
- int(9)
- [2]=>
- int(10)
- }
-}
-array(3) {
- [0]=>
- array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
- [1]=>
- array(4) {
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- }
- [2]=>
- array(3) {
- [8]=>
- int(8)
- [9]=>
- int(9)
- [10]=>
- int(10)
- }
-}
-array(3) {
- [0]=>
- array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- }
- [1]=>
- array(4) {
- [0]=>
- int(4)
- [1]=>
- int(5)
- [2]=>
- int(6)
- [3]=>
- int(7)
- }
- [2]=>
- array(3) {
- [0]=>
- int(8)
- [1]=>
- int(9)
- [2]=>
- int(10)
- }
-}
-
-[5]
-array(3) {
- [0]=>
- array(5) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- }
- [1]=>
- array(5) {
- [0]=>
- int(5)
- [1]=>
- int(6)
- [2]=>
- int(7)
- [3]=>
- int(8)
- [4]=>
- int(9)
- }
- [2]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-array(3) {
- [0]=>
- array(5) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- }
- [1]=>
- array(5) {
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- [9]=>
- int(9)
- }
- [2]=>
- array(1) {
- [10]=>
- int(10)
- }
-}
-array(3) {
- [0]=>
- array(5) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- }
- [1]=>
- array(5) {
- [0]=>
- int(5)
- [1]=>
- int(6)
- [2]=>
- int(7)
- [3]=>
- int(8)
- [4]=>
- int(9)
- }
- [2]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-
-[6]
-array(2) {
- [0]=>
- array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- }
- [1]=>
- array(5) {
- [0]=>
- int(6)
- [1]=>
- int(7)
- [2]=>
- int(8)
- [3]=>
- int(9)
- [4]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- }
- [1]=>
- array(5) {
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- [9]=>
- int(9)
- [10]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- }
- [1]=>
- array(5) {
- [0]=>
- int(6)
- [1]=>
- int(7)
- [2]=>
- int(8)
- [3]=>
- int(9)
- [4]=>
- int(10)
- }
-}
-
-[7]
-array(2) {
- [0]=>
- array(7) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- }
- [1]=>
- array(4) {
- [0]=>
- int(7)
- [1]=>
- int(8)
- [2]=>
- int(9)
- [3]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(7) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- }
- [1]=>
- array(4) {
- [7]=>
- int(7)
- [8]=>
- int(8)
- [9]=>
- int(9)
- [10]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(7) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- }
- [1]=>
- array(4) {
- [0]=>
- int(7)
- [1]=>
- int(8)
- [2]=>
- int(9)
- [3]=>
- int(10)
- }
-}
-
-[8]
-array(2) {
- [0]=>
- array(8) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- }
- [1]=>
- array(3) {
- [0]=>
- int(8)
- [1]=>
- int(9)
- [2]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(8) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- }
- [1]=>
- array(3) {
- [8]=>
- int(8)
- [9]=>
- int(9)
- [10]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(8) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- }
- [1]=>
- array(3) {
- [0]=>
- int(8)
- [1]=>
- int(9)
- [2]=>
- int(10)
- }
-}
-
-[9]
-array(2) {
- [0]=>
- array(9) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- }
- [1]=>
- array(2) {
- [0]=>
- int(9)
- [1]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(9) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- }
- [1]=>
- array(2) {
- [9]=>
- int(9)
- [10]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(9) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- }
- [1]=>
- array(2) {
- [0]=>
- int(9)
- [1]=>
- int(10)
- }
-}
-
-[10]
-array(2) {
- [0]=>
- array(10) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- [9]=>
- int(9)
- }
- [1]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(10) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- [9]=>
- int(9)
- }
- [1]=>
- array(1) {
- [10]=>
- int(10)
- }
-}
-array(2) {
- [0]=>
- array(10) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- [9]=>
- int(9)
- }
- [1]=>
- array(1) {
- [0]=>
- int(10)
- }
-}
-
-[11]
-array(1) {
- [0]=>
- array(11) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- [9]=>
- int(9)
- [10]=>
- int(10)
- }
-}
-array(1) {
- [0]=>
- array(11) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- [9]=>
- int(9)
- [10]=>
- int(10)
- }
-}
-array(1) {
- [0]=>
- array(11) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
- [7]=>
- int(7)
- [8]=>
- int(8)
- [9]=>
- int(9)
- [10]=>
- int(10)
- }
-}
-
-
===========================================
array(1) {
[u"a"]=>
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
NULL
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-array(5) {
- [0]=>
- array(1) {
- [0]=>
- string(1) "a"
- }
- [1]=>
- array(1) {
- [0]=>
- string(1) "b"
- }
- [2]=>
- array(1) {
- [0]=>
- string(1) "c"
- }
- [3]=>
- array(1) {
- [0]=>
- string(1) "d"
- }
- [4]=>
- array(1) {
- [0]=>
- string(1) "e"
- }
-}
-array(5) {
- [0]=>
- array(1) {
- [0]=>
- string(1) "a"
- }
- [1]=>
- array(1) {
- [1]=>
- string(1) "b"
- }
- [2]=>
- array(1) {
- [2]=>
- string(1) "c"
- }
- [3]=>
- array(1) {
- [3]=>
- string(1) "d"
- }
- [4]=>
- array(1) {
- [4]=>
- string(1) "e"
- }
-}
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- }
- [1]=>
- array(2) {
- [0]=>
- string(1) "c"
- [1]=>
- string(1) "d"
- }
- [2]=>
- array(1) {
- [0]=>
- string(1) "e"
- }
-}
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- }
- [1]=>
- array(2) {
- [2]=>
- string(1) "c"
- [3]=>
- string(1) "d"
- }
- [2]=>
- array(1) {
- [4]=>
- string(1) "e"
- }
-}
-array(1) {
- [0]=>
- array(5) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- [3]=>
- string(1) "d"
- [4]=>
- string(1) "e"
- }
-}
-array(1) {
- [0]=>
- array(5) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- [3]=>
- string(1) "d"
- [4]=>
- string(1) "e"
- }
-}
---UEXPECTF--
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
NULL
array(5) {
--TEST--
-Test array_chunk() function : basic functionality - defualt 'preserve_keys'
+Test array_chunk() function : basic functionality - default 'preserve_keys'
--FILE--
<?php
/* Prototype : array array_chunk(array $array, int $size [, bool $preserve_keys])
echo "Done"
?>
---EXPECTF--
-*** Testing array_chunk() : basic functionality ***
-
--- Iteration 1 --
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(4)
- }
- [2]=>
- array(1) {
- [0]=>
- int(5)
- }
-}
-
--- Iteration 2 --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- string(6) "value1"
- [1]=>
- string(6) "value2"
- }
- [1]=>
- array(1) {
- [0]=>
- string(6) "value3"
- }
-}
-
--- Iteration 3 --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-
--- Iteration 4 --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- }
- [1]=>
- array(1) {
- [0]=>
- string(5) "three"
- }
-}
-
--- Iteration 5 --
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- }
- [1]=>
- array(2) {
- [0]=>
- string(5) "three"
- [1]=>
- int(4)
- }
- [2]=>
- array(1) {
- [0]=>
- int(5)
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_chunk() : basic functionality ***
-- Iteration 1 --
echo "Done"
?>
---EXPECTF--
-*** Testing array_chunk() : basic functionality ***
-
--- Iteration 1 --
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
- [2]=>
- array(1) {
- [4]=>
- int(5)
- }
-}
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(4)
- }
- [2]=>
- array(1) {
- [0]=>
- int(5)
- }
-}
-
--- Iteration 2 --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- string(6) "value1"
- [1]=>
- string(6) "value2"
- }
- [1]=>
- array(1) {
- [2]=>
- string(6) "value3"
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- string(6) "value1"
- [1]=>
- string(6) "value2"
- }
- [1]=>
- array(1) {
- [0]=>
- string(6) "value3"
- }
-}
-
--- Iteration 3 --
-array(2) {
- [0]=>
- array(2) {
- ["key1"]=>
- int(1)
- ["key2"]=>
- int(2)
- }
- [1]=>
- array(1) {
- ["key3"]=>
- int(3)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-
--- Iteration 4 --
-array(2) {
- [0]=>
- array(2) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- }
- [1]=>
- array(1) {
- [3]=>
- string(5) "three"
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- }
- [1]=>
- array(1) {
- [0]=>
- string(5) "three"
- }
-}
-
--- Iteration 5 --
-array(3) {
- [0]=>
- array(2) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- }
- [1]=>
- array(2) {
- [3]=>
- string(5) "three"
- [4]=>
- int(4)
- }
- [2]=>
- array(1) {
- ["five"]=>
- int(5)
- }
-}
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- }
- [1]=>
- array(2) {
- [0]=>
- string(5) "three"
- [1]=>
- int(4)
- }
- [2]=>
- array(1) {
- [0]=>
- int(5)
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_chunk() : basic functionality ***
-- Iteration 1 --
Warning: array_chunk() expects at least 2 parameters, 1 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_chunk() : error conditions ***
-
--- Testing array_chunk() function with zero arguments --
-
-Warning: array_chunk() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing array_chunk() function with more than expected no. of arguments --
-
-Warning: array_chunk() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
--- Testing array_chunk() function with less than expected no. of arguments --
-
-Warning: array_chunk() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-Done
-- Iteration 16 --
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_chunk() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, string given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_chunk() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 16 --
-
Warning: array_chunk() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
-- Iteration 17 --
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_chunk() expects parameter 2 to be long, object given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, object given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, string given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_chunk() : usage variations ***
-
--- Iteration 1 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 2 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 3 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 4 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
-Warning: array_chunk() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 13 --
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [1]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-
--- Iteration 14 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 15 --
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [1]=>
- int(2)
- }
-}
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-
--- Iteration 16 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Iteration 17 --
-
Warning: array_chunk() expects parameter 2 to be long, Unicode string given in %s on line %d
NULL
}
}
Done
---UEXPECTF--
-*** Testing array_chunk() : usage variations ***
-
--- Iteration 1 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 2 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 3 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 4 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 5 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 6 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 7 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 8 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 9 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 10 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 11 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 12 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 13 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 14 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 15 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 16 --
-
-Warning: array_chunk() expects parameter 3 to be boolean, object given in %s on line %d
-NULL
-
--- Iteration 17 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-
--- Iteration 18 --
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-Done
"array3" => array(1)
);
-echo "\n-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' as defualt --\n";
+echo "\n-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' as default --\n";
var_dump( array_chunk($input_array, $size) );
echo "\n-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' = true --\n";
--EXPECTF--
*** Testing array_chunk() : usage variations ***
--- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' as defualt --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- array(0) {
- }
- [1]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- }
- [1]=>
- array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- }
-}
-
--- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' = true --
-array(2) {
- [0]=>
- array(2) {
- ["array1"]=>
- array(0) {
- }
- ["array2"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- }
- [1]=>
- array(1) {
- ["array3"]=>
- array(1) {
- [0]=>
- int(1)
- }
- }
-}
-
--- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' = false --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- array(0) {
- }
- [1]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- }
- [1]=>
- array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- }
-}
-Done
---UEXPECTF--
-*** Testing array_chunk() : usage variations ***
-
--- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' as defualt --
+-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' as default --
array(2) {
[0]=>
array(2) {
}
}
Done
---UEXPECTF--
-*** Testing array_chunk() : usage variations ***
-
--- Testing array_chunk() when size = -1 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Testing array_chunk() when size = 4 --
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-
--- Testing array_chunk() when size = 0 --
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
-Warning: array_chunk(): Size parameter expected to be greater than 0 in %s on line %d
-NULL
-
--- Testing array_chunk() when size = 1.5 --
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [1]=>
- int(2)
- }
- [2]=>
- array(1) {
- [2]=>
- int(3)
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(3)
- }
-}
-Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_chunk() : usage variations ***
-
--- Testing array_chunk() by supplying various arrays --
-
--- Iteration 1 --
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-
--- Iteration 2 --
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
-array(1) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
-
--- Iteration 3 --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(4)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(5)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- ["a"]=>
- int(4)
- ["b"]=>
- int(2)
- }
- [1]=>
- array(2) {
- ["c"]=>
- int(3)
- ["d"]=>
- int(5)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(4)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(5)
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_chunk() : usage variations ***
-- Testing array_chunk() by supplying various arrays --
--EXPECTF--
*** Testing array_chunk() : usage variations ***
--- Testing array_chunk(), input array containing references
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- &int(1)
- [1]=>
- &int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- &int(3)
- [1]=>
- &int(4)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- ["one"]=>
- &int(1)
- ["two"]=>
- &int(2)
- }
- [1]=>
- array(2) {
- ["three"]=>
- &int(3)
- ["four"]=>
- &int(4)
- }
-}
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- &int(1)
- [1]=>
- &int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- &int(3)
- [1]=>
- &int(4)
- }
-}
-Done
---UEXPECTF--
-*** Testing array_chunk() : usage variations ***
-
-- Testing array_chunk(), input array containing references
array(2) {
[0]=>
echo "Done";
?>
---EXPECTF--
-*** Testing array_combine() : basic functionality ***
-array(2) {
- [1]=>
- int(3)
- [2]=>
- int(4)
-}
-array(2) {
- ["a"]=>
- string(1) "c"
- ["b"]=>
- string(1) "d"
-}
-array(2) {
- [1]=>
- string(1) "c"
- ["b"]=>
- int(4)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_combine() : basic functionality ***
array(2) {
[1]=>
Warning: array_combine() expects exactly 2 parameters, 1 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_combine() : error conditions ***
-
--- Testing array_combine() function with Zero arguments --
-
-Warning: array_combine() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
-
--- Testing array_combine() function with more than expected no. of arguments --
-
-Warning: array_combine() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
--- Testing array_combine() function with less than expected no. of arguments --
-
-Warning: array_combine() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-Done
Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d
bool(false)
Done
---UEXPECTF--
-*** Testing array_combine() : error conditions specific to array_combine() ***
-
--- Testing array_combine() function with empty arrays --
-
-Warning: array_combine(): Both parameters should have at least 1 element in %s on line %d
-bool(false)
-
--- Testing array_combine() function with empty array for $keys argument --
-
-Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d
-bool(false)
-
--- Testing array_combine() function with empty array for $values argument --
-
-Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d
-bool(false)
-
--- Testing array_combine() function by passing array with unequal number of elements --
-
-Warning: array_combine(): Both parameters should have an equal number of elements in %s on line %d
-bool(false)
-Done
NULL
-- Iteration 16 --
-Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_combine() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_combine() expects parameter 1 to be array, object given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: array_combine() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_combine() : Passing non-array values to $keys argument ***
--- Iteration 1 --
-
-Warning: array_combine() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_combine() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_combine() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_combine() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_combine() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_combine() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_combine() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_combine() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_combine() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_combine() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_combine() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_combine() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_combine() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_combine() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 16 --
-
Warning: array_combine() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
-- Iteration 17 --
NULL
-- Iteration 16 --
-Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_combine() expects parameter 2 to be array, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_combine() expects parameter 2 to be array, object given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: array_combine() expects parameter 2 to be array, resource given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_combine() : Passing non-array values to $values argument ***
--- Iteration 1 --
-
-Warning: array_combine() expects parameter 2 to be array, integer given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_combine() expects parameter 2 to be array, integer given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_combine() expects parameter 2 to be array, integer given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_combine() expects parameter 2 to be array, integer given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_combine() expects parameter 2 to be array, double given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_combine() expects parameter 2 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_combine() expects parameter 2 to be array, boolean given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_combine() expects parameter 2 to be array, boolean given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_combine() expects parameter 2 to be array, boolean given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_combine() expects parameter 2 to be array, boolean given in %s on line %d
-NULL
--- Iteration 16 --
-
Warning: array_combine() expects parameter 2 to be array, Unicode string given in %s on line %d
NULL
-- Iteration 17 --
int(2)
}
-- Iteration 2 --
-array(2) {
- ["1.1"]=>
- float(1.1)
- ["2.2"]=>
- float(2.2)
-}
--- Iteration 3 --
-array(2) {
- [""]=>
- bool(false)
- [1]=>
- bool(true)
-}
--- Iteration 4 --
-
-Warning: array_combine(): Both parameters should have at least 1 element in %s on line %d
-bool(false)
--- Iteration 5 --
-array(1) {
- [""]=>
- NULL
-}
--- Iteration 6 --
-array(6) {
- ["a\v\f"]=>
- string(3) "a\v\f"
- ["aaaa
-"]=>
- string(5) "aaaa
-"
- ["b"]=>
- string(1) "b"
- ["b bbb"]=>
- string(5) "b bbb"
- ["c"]=>
- string(1) "c"
- ["\[\]\!\@\#$\%\^\&\*\(\)\{\}"]=>
- string(27) "\[\]\!\@\#$\%\^\&\*\(\)\{\}"
-}
--- Iteration 7 --
-array(6) {
- ["a\v\f"]=>
- string(5) "a\v\f"
- ["aaaa\r"]=>
- string(6) "aaaa\r"
- ["b"]=>
- string(1) "b"
- ["b\tbbb"]=>
- string(6) "b\tbbb"
- ["c"]=>
- string(1) "c"
- ["\[\]\!\@\#\$\%\^\&\*\(\)\{\}"]=>
- string(28) "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"
-}
--- Iteration 8 --
-array(4) {
- ["
-"]=>
- string(1) "
-"
- ["hello world
-The quick brown fox jumped over;
-the lazy dog
-This is a double quoted string"]=>
- string(88) "hello world
-The quick brown fox jumped over;
-the lazy dog
-This is a double quoted string"
- ["hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
- ["11 < 12. 123 >22
-'single quoted string'
-"double quoted string"
-2222 != 1111. 0000 = 0000
-"]=>
- string(90) "11 < 12. 123 >22
-'single quoted string'
-"double quoted string"
-2222 != 1111. 0000 = 0000
-"
-}
--- Iteration 9 --
-array(3) {
- ["one"]=>
- string(3) "one"
- ["two"]=>
- string(3) "two"
- ["three"]=>
- string(5) "three"
-}
--- Iteration 10 --
-array(3) {
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
-}
--- Iteration 11 --
-array(4) {
- [10]=>
- int(10)
- [20]=>
- int(20)
- [40]=>
- int(40)
- [30]=>
- int(30)
-}
--- Iteration 12 --
-array(3) {
- ["ten"]=>
- string(3) "ten"
- ["twenty"]=>
- string(6) "twenty"
- ["thirty"]=>
- string(6) "thirty"
-}
--- Iteration 13 --
-array(3) {
- [1]=>
- int(1)
- ["two"]=>
- string(3) "two"
- ["four"]=>
- string(4) "four"
-}
--- Iteration 14 --
-array(2) {
- ["null"]=>
- string(4) "null"
- [""]=>
- NULL
-}
--- Iteration 15 --
-array(4) {
- ["true"]=>
- string(4) "true"
- ["false"]=>
- string(5) "false"
- [""]=>
- bool(false)
- [1]=>
- bool(true)
-}
--- Iteration 16 --
-array(2) {
- ["emptys"]=>
- string(6) "emptys"
- [""]=>
- string(0) ""
-}
--- Iteration 17 --
-array(2) {
- [""]=>
- bool(false)
- [1]=>
- bool(true)
-}
--- Iteration 18 --
-array(3) {
- [4]=>
- int(4)
- [5]=>
- int(5)
- [6]=>
- int(6)
-}
--- Iteration 19 --
-array(3) {
- [10]=>
- int(10)
- [20]=>
- int(20)
- [3]=>
- int(3)
-}
-Done
---UEXPECTF--
-*** Testing array_combine() : Passing different types of arrays to both $keys and $values argument ***
--- Iteration 1 --
-array(2) {
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
--- Iteration 2 --
array(2) {
[u"1.1"]=>
float(1.1)
Warning: Illegal offset type in %s on line %d
-- Iteration 1 --
-Warning: array_combine(): Both parameters should have at least 1 element in %s on line %d
-bool(false)
--- Iteration 2 --
-array(1) {
- [0]=>
- string(1) "0"
-}
--- Iteration 3 --
-array(1) {
- [1]=>
- string(1) "1"
-}
--- Iteration 4 --
-array(4) {
- [1]=>
- string(1) "1"
- [2]=>
- string(1) "2"
- [3]=>
- string(1) "3"
- [4]=>
- string(1) "4"
-}
--- Iteration 5 --
-array(1) {
- ["float"]=>
- string(5) "float"
-}
--- Iteration 6 --
-array(4) {
- ["f1"]=>
- string(2) "f1"
- ["f2"]=>
- string(2) "f2"
- ["f3"]=>
- string(2) "f3"
- ["f4"]=>
- string(2) "f4"
-}
--- Iteration 7 --
-array(4) {
- [111]=>
- int(111)
- ["color"]=>
- string(5) "color"
- ["2.2"]=>
- float(2.2)
- [33]=>
- int(33)
-}
--- Iteration 8 --
-array(4) {
- [111]=>
- int(111)
- ["color"]=>
- string(5) "color"
- ["2.2"]=>
- float(2.2)
- [33]=>
- int(33)
-}
--- Iteration 9 --
-array(2) {
- ["hello"]=>
- string(5) "hello"
- ["string"]=>
- string(6) "string"
-}
--- Iteration 10 --
-array(1) {
- ["hello"]=>
- string(5) "hello"
-}
--- Iteration 11 --
-array(6) {
- [1]=>
- int(1)
- ["2.2"]=>
- float(2.2)
- ["int"]=>
- string(3) "int"
- ["float"]=>
- string(5) "float"
- ["unset"]=>
- string(5) "unset"
- ["heredoc"]=>
- string(7) "heredoc"
-}
-Done
---UEXPECTF--
-*** Testing array_combine() : assoc array with diff keys to both $keys and $values argument ***
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
--- Iteration 1 --
-
Warning: array_combine(): Both parameters should have at least 1 element in %s on line %d
bool(false)
-- Iteration 2 --
*** Testing array_combine() : assoc array with diff values to both $keys and $values argument ***
-- Iteration 1 --
-Warning: array_combine(): Both parameters should have at least 1 element in %s on line %d
-bool(false)
--- Iteration 2 --
-array(1) {
- [0]=>
- int(0)
-}
--- Iteration 3 --
-array(1) {
- [1]=>
- int(1)
-}
--- Iteration 4 --
-array(4) {
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
-}
--- Iteration 5 --
-array(1) {
- ["2.3333"]=>
- float(2.3333)
-}
--- Iteration 6 --
-array(4) {
- ["1.2"]=>
- float(1.2)
- ["3.33"]=>
- float(3.33)
- ["4.8999992284"]=>
- float(4.8999992284)
- ["33333333.333"]=>
- float(33333333.333)
-}
--- Iteration 7 --
-array(4) {
- [" Hello"]=>
- string(6) " Hello"
- ["col or"]=>
- string(6) "col or"
- ["\v\fworld"]=>
- string(7) "\v\fworld"
- ["pen
-"]=>
- string(4) "pen
-"
-}
--- Iteration 8 --
-array(4) {
- ["\tHello"]=>
- string(7) "\tHello"
- ["col\tor"]=>
- string(7) "col\tor"
- ["\v\fworld"]=>
- string(9) "\v\fworld"
- ["pen\n"]=>
- string(5) "pen\n"
-}
--- Iteration 9 --
-array(2) {
- ["hello"]=>
- string(5) "hello"
- ["Hello world"]=>
- string(11) "Hello world"
-}
--- Iteration 10 --
-array(3) {
- ["Class A object"]=>
- object(classA)#%d (0) {
- }
- [""]=>
- NULL
- ["Resource id #%d"]=>
- resource(%d) of type (stream)
-}
--- Iteration 11 --
-array(8) {
- ["hello"]=>
- string(5) "hello"
- ["Class A object"]=>
- object(classA)#%d (0) {
- }
- ["fruit"]=>
- string(5) "fruit"
- ["Resource id #%d"]=>
- resource(%d) of type (stream)
- [133]=>
- int(133)
- ["444.432"]=>
- float(444.432)
- [""]=>
- NULL
- ["Hello world"]=>
- string(11) "Hello world"
-}
-Done
---UEXPECTF--
-*** Testing array_combine() : assoc array with diff values to both $keys and $values argument ***
--- Iteration 1 --
-
Warning: array_combine(): Both parameters should have at least 1 element in %s on line %d
bool(false)
-- Iteration 2 --
echo "Done";
?>
---EXPECTF--
-*** Testing array_combine() : binary safe checking ***
-array(2) {
- ["hello"]=>
- string(5) "hello"
- ["world"]=>
- string(5) "world"
-}
-array(2) {
- ["hello"]=>
- string(5) "hello"
- ["world"]=>
- string(5) "world"
-}
-array(2) {
- ["hello"]=>
- string(5) "hello"
- ["world"]=>
- string(5) "world"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_combine() : binary safe checking ***
array(2) {
["hello"]=>
int(2)
}
-array(3) {
- [1]=>
- int(2)
- ["hello"]=>
- int(2)
- ["world"]=>
- int(1)
-}
-
-array(2) {
- ["hello"]=>
- int(2)
- ["world"]=>
- int(1)
-}
-
-array(3) {
- [""]=>
- int(2)
- ["world"]=>
- int(3)
- ["hello"]=>
- int(4)
-}
-
-array(1) {
- [0]=>
- int(1)
-}
-
-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)
var_dump(array_count_values($array1));
?>
--EXPECTF--
-Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %s
-
-Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %s
-
-Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %s
-array(8) {
- [1]=>
- int(2)
- ["hello"]=>
- int(2)
- ["world"]=>
- int(1)
- [""]=>
- int(1)
- ["rabbit"]=>
- int(1)
- ["foo"]=>
- int(1)
- ["Foo"]=>
- int(1)
- [0]=>
- int(1)
-}
---UEXPECTF--
Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %d
Warning: array_count_values(): Can only count STRING and INTEGER values! in %s on line %d
echo "Done";
?>
---EXPECTF--
-*** Testing array_diff_assoc() : basic functionality ***
--- Compare Default keys to numeric keys --
-array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- int(2)
- [2]=>
- string(5) "three"
-}
-array(2) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
-}
-
--- Compare Default keys to string keys --
-array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- int(2)
- [2]=>
- string(5) "three"
-}
-array(2) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
-}
-
--- Compare numeric keys to string keys --
-array(3) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- int(4)
-}
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- string(1) "2"
- [3]=>
- string(5) "three"
-}
-Done
-
---UEXPECTF--
+--EXPECT--
*** Testing array_diff_assoc() : basic functionality ***
-- Compare Default keys to numeric keys --
array(3) {
[3]=>
unicode(5) "three"
}
-Done
\ No newline at end of file
+Done
Warning: array_diff_assoc(): at least 2 parameters are required, 1 given in %s on line %d
NULL
-Done
\ No newline at end of file
+Done
Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_diff_assoc() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 26 --
-
-Warning: array_diff_assoc(): Argument #1 is not an array in %s on line %d
-NULL
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
-*** Testing array_diff_assoc() : usage variations ***
-array(3) {
- [0]=>
- string(1) "1"
- ["str1"]=>
- string(5) "hello"
- ["str2"]=>
- string(5) "world"
-}
-array(2) {
- [3]=>
- string(5) "hello"
- [4]=>
- string(4) "test"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_diff_assoc() : usage variations ***
array(3) {
[0]=>
[4]=>
unicode(4) "test"
}
-Done
\ No newline at end of file
+Done
?>
--EXPECTF--
-
*** Testing array_diff_assoc() : usage variations ***
-- Iteration 1 --
Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
NULL
Done
---UEXPECTF--
-
-*** Testing array_diff_assoc() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 26 --
-
-Warning: array_diff_assoc(): Argument #2 is not an array in %s on line %d
-NULL
-Done
\ No newline at end of file
bool(false)
}
--- Iteration 5 --
-array(2) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
-}
-
--- Iteration 6 --
-array(3) {
- [0]=>
- string(6) "string"
- [1]=>
- string(6) "string"
- [2]=>
- string(11) "hello world"
-}
-
--- Iteration 7 --
-array(2) {
- [0]=>
- string(6) "binary"
- [1]=>
- string(6) "binary"
-}
-
--- Iteration 8 --
-array(1) {
- [0]=>
- object(classA)#%d (0) {
- }
-}
-
--- Iteration 9 --
-array(1) {
- [0]=>
- NULL
-}
-
--- Iteration 10 --
-array(1) {
- [0]=>
- NULL
-}
-Done
---UEXPECTF--
-
-*** Testing array_diff_assoc() : usage variations ***
-
--- Iteration 1 --
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(12345)
- [3]=>
- int(-2345)
-}
-
--- Iteration 2 --
-array(5) {
- [0]=>
- float(10.5)
- [1]=>
- float(-10.5)
- [2]=>
- float(123456789000)
- [3]=>
- float(1.23456789E-9)
- [4]=>
- float(0.5)
-}
-
--- Iteration 3 --
-array(2) {
- [0]=>
- NULL
- [1]=>
- NULL
-}
-
--- Iteration 4 --
-array(3) {
- [1]=>
- bool(false)
- [2]=>
- bool(true)
- [3]=>
- bool(false)
-}
-
-- Iteration 5 --
array(2) {
[0]=>
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_diff_assoc() : usage variations ***
--- Iteration 1 --
-array(4) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [12345]=>
- string(8) "positive"
- [-2345]=>
- string(8) "negative"
-}
-
--- Iteration 2 --
-array(3) {
- [10]=>
- string(7) "float 1"
- [-10]=>
- string(7) "float 2"
- [0]=>
- string(7) "float 3"
-}
-
--- Iteration 3 --
-array(1) {
- [""]=>
- string(6) "null 2"
-}
-
--- Iteration 4 --
-array(2) {
- [1]=>
- string(5) "boolT"
- [0]=>
- string(5) "boolF"
-}
-
--- Iteration 5 --
-array(1) {
- [""]=>
- string(6) "emptys"
-}
-
--- Iteration 6 --
-array(2) {
- ["string"]=>
- string(7) "strings"
- ["hello world"]=>
- string(7) "stringh"
-}
-
--- Iteration 7 --
-array(2) {
- ["binary1"]=>
- string(8) "binary 1"
- ["binary2"]=>
- string(8) "binary 2"
-}
-
--- Iteration 8 --
-array(1) {
- [""]=>
- string(9) "undefined"
-}
-
--- Iteration 9 --
-array(1) {
- [""]=>
- string(5) "unset"
-}
-Done
---UEXPECTF--
-*** Testing array_diff_assoc() : usage variations ***
-
-- Iteration 1 --
array(4) {
[0]=>
[u""]=>
unicode(5) "unset"
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
+--EXPECT--
-*** Testing array_diff_assoc() : usage variations ***
--- Result of comparing integers and floating point numbers: --
-array(1) {
- [3]=>
- string(1) "a"
-}
-array(1) {
- [3]=>
- string(1) "b"
-}
--- Result of comparing integers and strings containing an integers : --
-array(1) {
- [3]=>
- string(1) "a"
-}
-array(1) {
- [3]=>
- string(1) "c"
-}
--- Result of comparing integers and strings containing floating points : --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- string(1) "a"
-}
-array(4) {
- [0]=>
- string(4) "1.00"
- ["1.00"]=>
- string(4) "2.00"
- ["2.00"]=>
- string(4) "3.00"
- [1]=>
- string(1) "d"
-}
--- Result of comparing floating points and strings containing integers : --
-array(1) {
- [3]=>
- string(1) "b"
-}
-array(1) {
- [3]=>
- string(1) "c"
-}
--- Result of comparing floating points and strings containing floating point: --
-array(4) {
- [0]=>
- float(1)
- [1]=>
- float(2)
- [2]=>
- float(3)
- [3]=>
- string(1) "b"
-}
-array(4) {
- [0]=>
- string(4) "1.00"
- ["1.00"]=>
- string(4) "2.00"
- ["2.00"]=>
- string(4) "3.00"
- [1]=>
- string(1) "d"
-}
--- Result of comparing strings containing integers and strings containing floating points : --
-array(4) {
- [0]=>
- string(1) "1"
- [1]=>
- string(1) "2"
- [2]=>
- string(1) "3"
- [3]=>
- string(1) "c"
-}
-array(4) {
- [0]=>
- string(4) "1.00"
- ["1.00"]=>
- string(4) "2.00"
- ["2.00"]=>
- string(4) "3.00"
- [1]=>
- string(1) "d"
-}
--- Result of comparing more than two arrays: --
-array(1) {
- [3]=>
- string(1) "a"
-}
-Done
---UEXPECTF--
*** Testing array_diff_assoc() : usage variations ***
-- Result of comparing integers and floating point numbers: --
array(1) {
[3]=>
unicode(1) "a"
}
-Done
\ No newline at end of file
+Done
'1' => 1,
'0' => 0),
-//defualt keys => float values
+//default keys => float values
/*7*/ array(2.00000000000001, 1.00, 0.01E-9),
//numeric keys => float values
};
echo "Done";
?>
---EXPECTF--
-*** Testing array_diff_assoc() : usage variations ***
-
--- Iteration 1 --
-array(2) {
- [0]=>
- string(4) "zero"
- ["two"]=>
- float(2)
-}
-array(3) {
- [0]=>
- string(16) "2.00000000000001"
- [2]=>
- string(4) "zero"
- [3]=>
- string(1) "a"
-}
-
--- Iteration 2 --
-array(1) {
- ["two"]=>
- float(2)
-}
-array(2) {
- [2]=>
- string(16) "2.00000000000001"
- [3]=>
- string(1) "a"
-}
-
--- Iteration 3 --
-array(1) {
- ["two"]=>
- float(2)
-}
-array(2) {
- [2]=>
- string(16) "2.00000000000001"
- [3]=>
- string(1) "a"
-}
-
--- Iteration 4 --
-array(2) {
- [0]=>
- string(4) "zero"
- ["two"]=>
- float(2)
-}
-array(2) {
- [0]=>
- int(2)
- [2]=>
- int(0)
-}
-
--- Iteration 5 --
-array(2) {
- [0]=>
- string(4) "zero"
- ["two"]=>
- float(2)
-}
-array(2) {
- [2]=>
- int(2)
- [0]=>
- int(0)
-}
-
--- Iteration 6 --
-array(1) {
- [0]=>
- string(4) "zero"
-}
-array(1) {
- [0]=>
- int(0)
-}
-
--- Iteration 7 --
-array(2) {
- [0]=>
- string(4) "zero"
- ["two"]=>
- float(2)
-}
-array(2) {
- [0]=>
- float(2)
- [2]=>
- float(1.0E-11)
-}
-
--- Iteration 8 --
-array(2) {
- [0]=>
- string(4) "zero"
- ["two"]=>
- float(2)
-}
-array(2) {
- [2]=>
- float(2)
- [0]=>
- float(1.0E-11)
-}
-
--- Iteration 9 --
-array(1) {
- [0]=>
- string(4) "zero"
-}
-array(1) {
- [0]=>
- float(1.0E-11)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_diff_assoc() : usage variations ***
-- Iteration 1 --
[0]=>
float(1.0E-11)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
+--EXPECT--
-*** Testing array_diff_assoc() : usage variations ***
--- Results when $a = a: --
-array(3) {
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- [3]=>
- string(1) "a"
-}
-array(3) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
-}
--- Results when $a has been changed to 4: --
-array(4) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- [3]=>
- string(1) "a"
-}
-array(4) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
- [0]=>
- &int(4)
-}
--- Results when $arr2 is referenced to $arr1 --
-array(0) {
-}
-array(0) {
-}
--- Results when $arr1 is changed --
-array(0) {
-}
-array(0) {
-}
-Done
---UEXPECTF--
*** Testing array_diff_assoc() : usage variations ***
-- Results when $a = a: --
array(3) {
}
array(0) {
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_diff_assoc() : variation ***
-array(2) {
- [0]=>
- string(1) "d"
- [3]=>
- string(1) "b"
-}
-array(3) {
- [0]=>
- string(1) "a"
- ["b"]=>
- string(1) "3"
- ["c"]=>
- int(2)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_diff_assoc() : variation ***
array(2) {
[0]=>
[u"c"]=>
int(2)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_diff_assoc() : usage variations ***
--- Compare two 2-D arrays --
-array(2) {
- ["sub_array1"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["sub_array2"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
-array(2) {
- ["sub_arraya"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(3)
- [2]=>
- int(5)
- }
- ["sub_arrayb"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "z"
- [2]=>
- string(1) "y"
- }
-}
-
--- Compare subarrays from two 2-D arrays --
-array(2) {
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-array(2) {
- [1]=>
- int(3)
- [2]=>
- int(5)
-}
-array(2) {
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
-}
-array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "z"
- [2]=>
- string(1) "y"
-}
-
--- Compare a subarray from one 2-D array and one 2-D array --
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-array(2) {
- ["sub_array1"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["sub_array2"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_diff_assoc() : usage variations ***
-- Compare two 2-D arrays --
array(2) {
unicode(1) "c"
}
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_diff() : basic functionality ***
--- Test indexed array with integers as elements --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-array(2) {
- [2]=>
- int(5)
- [3]=>
- int(6)
-}
--- Test indexed array with strings as elements --
-array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
-}
-array(2) {
- [2]=>
- string(4) "five"
- [3]=>
- string(3) "six"
-}
--- Test associative array with strings as keys and integers as elements --
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["five"]=>
- int(5)
- ["six"]=>
- int(6)
-}
--- Test associative array with strings as keys and integers as elements --
-array(2) {
- ["one"]=>
- string(2) "un"
- ["two"]=>
- string(4) "deux"
-}
-array(2) {
- ["five"]=>
- string(4) "cinq"
- ["six"]=>
- string(3) "six"
-}
--- Test array_diff with more than 2 arguments --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_diff() : basic functionality ***
-- Test indexed array with integers as elements --
array(2) {
-- Testing array_diff() function with less than expected no. of arguments --
-Warning: array_diff(): at least 2 parameters are required, 1 given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_diff() : error conditions ***
-
--- Testing array_diff() function with zero arguments --
-
-Warning: array_diff(): at least 2 parameters are required, 0 given in %s on line %d
-NULL
-
--- Testing array_diff() function with less than expected no. of arguments --
-
Warning: array_diff(): at least 2 parameters are required, 1 given in %s on line %d
NULL
Done
\ No newline at end of file
}
?>
---EXPECTF--
+--EXPECT--
------ Test 1 --------
array(4) {
[1]=>
?>
--EXPECT--
-array(4) {
- [0]=>
- array(2) {
- ["b"]=>
- string(5) "brown"
- ["c"]=>
- string(4) "blue"
- }
- [1]=>
- array(2) {
- ["b"]=>
- string(5) "brown"
- ["c"]=>
- string(4) "blue"
- }
- [2]=>
- array(1) {
- [2]=>
- bool(true)
- }
- [3]=>
- array(2) {
- ["b"]=>
- string(5) "brown"
- ["c"]=>
- string(4) "blue"
- }
-}
---UEXPECTF--
array(4) {
[0]=>
array(2) {
var_dump(array_diff_key($array1, $array2));
?>
--EXPECT--
-array(2) {
- ["red"]=>
- int(2)
- ["purple"]=>
- int(4)
-}
---UEXPECT--
array(2) {
[u"red"]=>
int(2)
[u"purple"]=>
int(4)
-}
\ No newline at end of file
+}
print_r(array_diff_key($arr3, $arr4));
print_r(array_diff_key($arr4, $arr3));
?>
---EXPECTF--
+--EXPECT--
Result of comparing integers and floating point value:
Array
(
var_dump($result);
?>
--EXPECT--
-array(3) {
- ["b"]=>
- string(5) "brown"
- ["c"]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
-}
---UEXPECT--
array(3) {
[u"b"]=>
unicode(5) "brown"
unicode(4) "blue"
[0]=>
unicode(3) "red"
-}
\ No newline at end of file
+}
var_dump(array_diff_ukey($array1, $array2, 'key_compare_func'));
?>
--EXPECT--
-array(2) {
- ["red"]=>
- int(2)
- ["purple"]=>
- int(4)
-}
---UEXPECT--
array(2) {
[u"red"]=>
int(2)
[u"purple"]=>
int(4)
-}
\ No newline at end of file
+}
Warning: array_diff(): Argument #1 is not an array in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_diff() : usage variations ***
-
--- Iteration 1 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 2 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 3 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 4 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 5 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 6 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 7 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 8 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 9 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 10 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 11 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 12 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 13 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 14 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 15 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 16 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 17 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 18 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 19 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 20 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 21 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 22 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 23 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 24 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 25 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 26 --
-Warning: array_diff(): Argument #1 is not an array in %s on line %d
-NULL
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
-*** Testing array_diff() : usage variations ***
-array(1) {
- [0]=>
- string(1) "1"
-}
-array(1) {
- [4]=>
- string(4) "test"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_diff() : usage variations ***
array(1) {
[0]=>
Warning: array_diff(): Argument #2 is not an array in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_diff() : usage variations ***
-
--- Iteration 1 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 2 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 3 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 4 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 5 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 6 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 7 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 8 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 9 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 10 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 11 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 12 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 13 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 14 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 15 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 16 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 17 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 18 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 19 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 20 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 21 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 22 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 23 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 24 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 25 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 26 --
-Warning: array_diff(): Argument #2 is not an array in %s on line %d
-NULL
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
-*** Testing array_diff() : usage variations ***
-
- Iteration: 1
-array(0) {
-}
-
- Iteration: 2
-array(3) {
- [0]=>
- int(0)
- [2]=>
- int(12345)
- [3]=>
- int(-2345)
-}
-
- Iteration: 3
-array(5) {
- [0]=>
- float(10.5)
- [1]=>
- float(-10.5)
- [2]=>
- float(123456789000)
- [3]=>
- float(1.23456789E-9)
- [4]=>
- float(0.5)
-}
-
- Iteration: 4
-array(2) {
- [0]=>
- NULL
- [1]=>
- NULL
-}
-
- Iteration: 5
-array(2) {
- [1]=>
- bool(false)
- [3]=>
- bool(false)
-}
-
- Iteration: 6
-array(2) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
-}
-
- Iteration: 7
-array(3) {
- [0]=>
- string(6) "string"
- [1]=>
- string(6) "string"
- [2]=>
- string(17) "This is a heredoc"
-}
-
- Iteration: 8
-array(2) {
- [0]=>
- string(6) "binary"
- [1]=>
- string(6) "binary"
-}
-
- Iteration: 9
-array(1) {
- [0]=>
- NULL
-}
-
- Iteration: 10
-array(1) {
- [0]=>
- NULL
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_diff() : usage variations ***
Iteration: 1
[0]=>
NULL
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_diff() : usage variations ***
-
- Iteration: 1
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
- Iteration: 2
-array(1) {
- [1]=>
- int(2)
-}
-
- Iteration: 3
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
- Iteration: 4
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
- Iteration: 5
-array(1) {
- [1]=>
- int(2)
-}
-
- Iteration: 6
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
- Iteration: 7
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
- Iteration: 8
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
- Iteration: 9
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
- Iteration: 10
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_diff() : usage variations ***
Iteration: 1
echo "Done";
?>
---EXPECTF--
-*** Testing array_diff() : usage variations ***
--- Compare integers and floats: --
-array(0) {
-}
-array(0) {
-}
--- Compare integers and strings containing an integers: --
-array(0) {
-}
-array(0) {
-}
--- Compare integers and strings containing floats: --
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-array(3) {
- [0]=>
- string(4) "1.00"
- [1]=>
- string(4) "2.00"
- [2]=>
- string(4) "3.00"
-}
--- Compare floats and strings containing integers: --
-array(0) {
-}
-array(0) {
-}
--- Compare floats and strings containing floats: --
-array(3) {
- [0]=>
- float(1)
- [1]=>
- float(2)
- [2]=>
- float(3)
-}
-array(3) {
- [0]=>
- string(4) "1.00"
- [1]=>
- string(4) "2.00"
- [2]=>
- string(4) "3.00"
-}
--- Compare strings containing integers and strings containing floats: --
-array(3) {
- [0]=>
- string(1) "1"
- [1]=>
- string(1) "2"
- [2]=>
- string(1) "3"
-}
-array(3) {
- [0]=>
- string(4) "1.00"
- [1]=>
- string(4) "2.00"
- [2]=>
- string(4) "3.00"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_diff() : usage variations ***
-- Compare integers and floats: --
array(0) {
[2]=>
unicode(4) "3.00"
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_diff() : usage variations ***
-array(1) {
- [0]=>
- string(1) "d"
-}
-array(3) {
- [0]=>
- string(1) "a"
- ["b"]=>
- string(1) "3"
- ["c"]=>
- int(2)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_diff() : usage variations ***
array(1) {
[0]=>
[u"c"]=>
int(2)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-
-*** Testing array_diff() : usage variations ***
--- Basic Comparison --
-array(3) {
- [0]=>
- string(2) "&a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
-}
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
--- $a changed --
-array(3) {
- [0]=>
- string(2) "&a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
-}
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
--- Arrays referenced to each other --
-array(0) {
-}
-array(0) {
-}
--- $arr1 changed --
-array(0) {
-}
-array(0) {
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_diff() : usage variations ***
-- Basic Comparison --
array(3) {
}
array(0) {
}
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing array_diff() : usage variations ***
-- Iteration 1 --
-array(3) {
- ["a"]=>
- string(1) "1"
- ["b"]=>
- string(1) "2"
- ["c"]=>
- string(1) "3"
-}
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(0)
-}
--- Iteration 2 --
-array(1) {
- ["c"]=>
- string(1) "3"
-}
-array(0) {
-}
--- Iteration 3 --
-array(3) {
- ["a"]=>
- string(1) "1"
- ["b"]=>
- string(1) "2"
- ["c"]=>
- string(1) "3"
-}
-array(2) {
- ["float1"]=>
- float(2.3333)
- ["float2"]=>
- float(2.3333)
-}
--- Iteration 4 --
-array(3) {
- ["a"]=>
- string(1) "1"
- ["b"]=>
- string(1) "2"
- ["c"]=>
- string(1) "3"
-}
-array(4) {
- ["f1"]=>
- float(1.2)
- ["f2"]=>
- float(3.33)
- [3]=>
- float(4.8999992284)
- ["f4"]=>
- float(1.2)
-}
--- Iteration 5 --
-array(3) {
- ["a"]=>
- string(1) "1"
- ["b"]=>
- string(1) "2"
- ["c"]=>
- string(1) "3"
-}
-array(4) {
- [111]=>
- string(6) " Hello"
- ["red"]=>
- string(6) "col or"
- [2]=>
- string(7) "\v\fworld"
- [3]=>
- string(6) " Hello"
-}
--- Iteration 6 --
-array(3) {
- ["a"]=>
- string(1) "1"
- ["b"]=>
- string(1) "2"
- ["c"]=>
- string(1) "3"
-}
-array(4) {
- [111]=>
- string(7) "\tHello"
- ["red"]=>
- string(7) "col\tor"
- [2]=>
- string(9) "\v\fworld"
- [3]=>
- string(7) "\tHello"
-}
--- Iteration 7 --
-array(3) {
- ["a"]=>
- string(1) "1"
- ["b"]=>
- string(1) "2"
- ["c"]=>
- string(1) "3"
-}
-array(3) {
- [1]=>
- string(5) "hello"
- ["heredoc"]=>
- string(11) "Hello world"
- [2]=>
- string(11) "Hello world"
-}
--- Iteration 8 --
-array(3) {
- ["a"]=>
- string(1) "1"
- ["b"]=>
- string(1) "2"
- ["c"]=>
- string(1) "3"
-}
-array(5) {
- [11]=>
- object(classA)#%d (0) {
- }
- ["unset"]=>
- NULL
- ["resource"]=>
- resource(%d) of type (stream)
- [12]=>
- object(classA)#%d (0) {
- }
- [13]=>
- resource(%d) of type (stream)
-}
-Done
---UEXPECTF--
-*** Testing array_diff() : usage variations ***
--- Iteration 1 --
array(3) {
[u"a"]=>
unicode(1) "1"
[13]=>
resource(5) of type (stream)
}
-Done
\ No newline at end of file
+Done
array(0) {
}
--- Compare subarrays from two 2-D arrays --
-array(1) {
- [1]=>
- int(2)
-}
-array(1) {
- [2]=>
- int(5)
-}
-array(2) {
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
-}
-array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "z"
- [2]=>
- string(1) "y"
-}
-
--- Compare a subarray from one 2-D array and one 2-D array --
-
-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(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-
-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
-
-Notice: Array to string conversion in %s on line %d
-
-Notice: Array to string conversion in %s on line %d
-array(2) {
- ["sub_array1"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["sub_array2"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
-Done
---UEXPECTF--
-*** Testing array_diff() : usage variations ***
--- Compare two 2-D arrays --
-
-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
-
-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(0) {
-}
-
-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
-
-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(0) {
-}
-
-- Compare subarrays from two 2-D arrays --
array(1) {
[1]=>
unicode(1) "c"
}
}
-Done
\ No newline at end of file
+Done
===========================
start: 0 num: 0 value: f
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 0 num: 1 value: 1
-array(1) {
- [0]=>
- bool(true)
-}
-===========================
-start: 0 num: 1 value:
-array(1) {
- [0]=>
- bool(false)
-}
-===========================
-start: 0 num: 1 value:
-array(1) {
- [0]=>
- NULL
-}
-===========================
-start: 0 num: 1 value: d
-array(1) {
- [0]=>
- string(1) "d"
-}
-===========================
-start: 0 num: 1 value: e
-array(1) {
- [0]=>
- string(1) "e"
-}
-===========================
-start: 0 num: 1 value: f
-array(1) {
- [0]=>
- string(1) "f"
-}
-===========================
-start: 0 num: 2.5 value: 1
-array(2) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
-}
-===========================
-start: 0 num: 2.5 value:
-array(2) {
- [0]=>
- bool(false)
- [1]=>
- bool(false)
-}
-===========================
-start: 0 num: 2.5 value:
-array(2) {
- [0]=>
- NULL
- [1]=>
- NULL
-}
-===========================
-start: 0 num: 2.5 value: d
-array(2) {
- [0]=>
- string(1) "d"
- [1]=>
- string(1) "d"
-}
-===========================
-start: 0 num: 2.5 value: e
-array(2) {
- [0]=>
- string(1) "e"
- [1]=>
- string(1) "e"
-}
-===========================
-start: 0 num: 2.5 value: f
-array(2) {
- [0]=>
- string(1) "f"
- [1]=>
- string(1) "f"
-}
-===========================
-start: 1 num: 0 value: 1
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 1 num: 0 value:
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 1 num: 0 value:
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 1 num: 0 value: d
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 1 num: 0 value: e
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 1 num: 0 value: f
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 1 num: 1 value: 1
-array(1) {
- [1]=>
- bool(true)
-}
-===========================
-start: 1 num: 1 value:
-array(1) {
- [1]=>
- bool(false)
-}
-===========================
-start: 1 num: 1 value:
-array(1) {
- [1]=>
- NULL
-}
-===========================
-start: 1 num: 1 value: d
-array(1) {
- [1]=>
- string(1) "d"
-}
-===========================
-start: 1 num: 1 value: e
-array(1) {
- [1]=>
- string(1) "e"
-}
-===========================
-start: 1 num: 1 value: f
-array(1) {
- [1]=>
- string(1) "f"
-}
-===========================
-start: 1 num: 2.5 value: 1
-array(2) {
- [1]=>
- bool(true)
- [2]=>
- bool(true)
-}
-===========================
-start: 1 num: 2.5 value:
-array(2) {
- [1]=>
- bool(false)
- [2]=>
- bool(false)
-}
-===========================
-start: 1 num: 2.5 value:
-array(2) {
- [1]=>
- NULL
- [2]=>
- NULL
-}
-===========================
-start: 1 num: 2.5 value: d
-array(2) {
- [1]=>
- string(1) "d"
- [2]=>
- string(1) "d"
-}
-===========================
-start: 1 num: 2.5 value: e
-array(2) {
- [1]=>
- string(1) "e"
- [2]=>
- string(1) "e"
-}
-===========================
-start: 1 num: 2.5 value: f
-array(2) {
- [1]=>
- string(1) "f"
- [2]=>
- string(1) "f"
-}
-===========================
-start: 2.5 num: 0 value: 1
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 2.5 num: 0 value:
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 2.5 num: 0 value:
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 2.5 num: 0 value: d
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 2.5 num: 0 value: e
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 2.5 num: 0 value: f
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 2.5 num: 1 value: 1
-array(1) {
- [2]=>
- bool(true)
-}
-===========================
-start: 2.5 num: 1 value:
-array(1) {
- [2]=>
- bool(false)
-}
-===========================
-start: 2.5 num: 1 value:
-array(1) {
- [2]=>
- NULL
-}
-===========================
-start: 2.5 num: 1 value: d
-array(1) {
- [2]=>
- string(1) "d"
-}
-===========================
-start: 2.5 num: 1 value: e
-array(1) {
- [2]=>
- string(1) "e"
-}
-===========================
-start: 2.5 num: 1 value: f
-array(1) {
- [2]=>
- string(1) "f"
-}
-===========================
-start: 2.5 num: 2.5 value: 1
-array(2) {
- [2]=>
- bool(true)
- [3]=>
- bool(true)
-}
-===========================
-start: 2.5 num: 2.5 value:
-array(2) {
- [2]=>
- bool(false)
- [3]=>
- bool(false)
-}
-===========================
-start: 2.5 num: 2.5 value:
-array(2) {
- [2]=>
- NULL
- [3]=>
- NULL
-}
-===========================
-start: 2.5 num: 2.5 value: d
-array(2) {
- [2]=>
- string(1) "d"
- [3]=>
- string(1) "d"
-}
-===========================
-start: 2.5 num: 2.5 value: e
-array(2) {
- [2]=>
- string(1) "e"
- [3]=>
- string(1) "e"
-}
-===========================
-start: 2.5 num: 2.5 value: f
-array(2) {
- [2]=>
- string(1) "f"
- [3]=>
- string(1) "f"
-}
-== Done =================Done====================
---UEXPECTF--
-===========================
-start: 0 num: 0 value: 1
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 0 num: 0 value:
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 0 num: 0 value:
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 0 num: 0 value: d
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 0 num: 0 value: e
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-===========================
-start: 0 num: 0 value: f
-
Warning: array_fill(): Number of elements must be positive in %s on line %d
bool(false)
===========================
echo "Done";
?>
---EXPECTF--
-*** Testing array_fill() : basic functionality ***
--- Iteration 1 --
-array(2) {
- [0]=>
- NULL
- [1]=>
- NULL
-}
--- Iteration 2 --
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(0)
-}
--- Iteration 3 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(1)
-}
--- Iteration 4 --
-array(2) {
- [0]=>
- float(1.5)
- [1]=>
- float(1.5)
-}
--- Iteration 5 --
-array(2) {
- [0]=>
- string(2) "hi"
- [1]=>
- string(2) "hi"
-}
--- Iteration 6 --
-array(2) {
- [0]=>
- string(2) "hi"
- [1]=>
- string(2) "hi"
-}
--- Iteration 7 --
-array(2) {
- [0]=>
- string(5) "Hello"
- [1]=>
- string(5) "Hello"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_fill() : basic functionality ***
-- Iteration 1 --
array(2) {
[1]=>
unicode(5) "Hello"
}
-Done
\ No newline at end of file
+Done
Warning: array_fill(): Number of elements must be positive in %s on line %d
bool(false)
Done
---UEXPECTF--
-*** Testing array_fill() : error conditions ***
--- Testing array_fill() function with Zero arguments --
-
-Warning: array_fill() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
--- Testing array_fill() function with more than expected no. of arguments --
-
-Warning: array_fill() expects exactly 3 parameters, 4 given in %s on line %d
-NULL
--- Testing array_fill() function with less than expected no. of arguments --
-
-Warning: array_fill() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-Done
?>
--EXPECTF--
-Warning: array_fill_keys() expects parameter 1 to be array, string given in %s on line %d
-NULL
-array(0) {
-}
-array(2) {
- ["foo"]=>
- NULL
- ["bar"]=>
- NULL
-}
-array(4) {
- [5]=>
- int(123)
- ["foo"]=>
- int(123)
- [10]=>
- int(123)
- ["1.23"]=>
- int(123)
-}
-array(4) {
- ["test"]=>
- string(0) ""
- [1]=>
- string(0) ""
- [10]=>
- string(0) ""
- [100]=>
- string(0) ""
-}
---UEXPECTF--
-
Warning: array_fill_keys() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
array(0) {
}
}
-- Iteration 2 --
-array(2) {
- [0]=>
- object(Test1)#%d (3) {
- ["member1"]=>
- int(100)
- ["var1"]=>
- int(30)
- ["var2"]=>
- int(101)
- }
- [1]=>
- object(Test1)#%d (3) {
- ["member1"]=>
- int(100)
- ["var1"]=>
- int(30)
- ["var2"]=>
- int(101)
- }
-}
--- Iteration 3 --
-array(2) {
- [0]=>
- object(Child_test1)#%d (4) {
- ["member2"]=>
- int(102)
- ["member1"]=>
- int(100)
- ["var1"]=>
- int(30)
- ["var2"]=>
- int(101)
- }
- [1]=>
- object(Child_test1)#%d (4) {
- ["member2"]=>
- int(102)
- ["member1"]=>
- int(100)
- ["var1"]=>
- int(30)
- ["var2"]=>
- int(101)
- }
-}
--- Iteration 4 --
-array(2) {
- [0]=>
- object(Test2)#%d (3) {
- ["member1":"Test2":private]=>
- int(100)
- ["var1"]=>
- int(30)
- ["var2"]=>
- int(101)
- }
- [1]=>
- object(Test2)#%d (3) {
- ["member1":"Test2":private]=>
- int(100)
- ["var1"]=>
- int(30)
- ["var2"]=>
- int(101)
- }
-}
--- Iteration 5 --
-array(2) {
- [0]=>
- object(Child_test2)#%d (4) {
- ["member1":"Child_test2":private]=>
- int(102)
- ["member1":"Test2":private]=>
- int(100)
- ["var1"]=>
- int(30)
- ["var2"]=>
- int(101)
- }
- [1]=>
- object(Child_test2)#%d (4) {
- ["member1":"Child_test2":private]=>
- int(102)
- ["member1":"Test2":private]=>
- int(100)
- ["var1"]=>
- int(30)
- ["var2"]=>
- int(101)
- }
-}
--- Iteration 6 --
-array(2) {
- [0]=>
- object(Test3)#%d (3) {
- ["member1":protected]=>
- int(100)
- ["var1"]=>
- int(30)
- ["var2"]=>
- int(101)
- }
- [1]=>
- object(Test3)#%d (3) {
- ["member1":protected]=>
- int(100)
- ["var1"]=>
- int(30)
- ["var2"]=>
- int(101)
- }
-}
--- Iteration 7 --
-array(2) {
- [0]=>
- object(Child_test3)#%d (3) {
- ["member1":protected]=>
- int(102)
- ["var1"]=>
- int(30)
- ["var2"]=>
- int(101)
- }
- [1]=>
- object(Child_test3)#%d (3) {
- ["member1":protected]=>
- int(102)
- ["var1"]=>
- int(30)
- ["var2"]=>
- int(101)
- }
-}
--- Iteration 8 --
-array(2) {
- [0]=>
- object(Test4)#%d (3) {
- ["member1"]=>
- int(100)
- ["member2":"Test4":private]=>
- int(101)
- ["member3":protected]=>
- int(102)
- }
- [1]=>
- object(Test4)#%d (3) {
- ["member1"]=>
- int(100)
- ["member2":"Test4":private]=>
- int(101)
- ["member3":protected]=>
- int(102)
- }
-}
--- Iteration 9 --
-array(2) {
- [0]=>
- object(Child_test4)#%d (4) {
- ["var1"]=>
- int(103)
- ["member1"]=>
- int(100)
- ["member2":"Test4":private]=>
- int(101)
- ["member3":protected]=>
- int(102)
- }
- [1]=>
- object(Child_test4)#%d (4) {
- ["var1"]=>
- int(103)
- ["member1"]=>
- int(100)
- ["member2":"Test4":private]=>
- int(101)
- ["member3":protected]=>
- int(102)
- }
-}
--- Iteration 10 --
-array(2) {
- [0]=>
- object(ConcreteClass1)#%d (4) {
- ["member1"]=>
- NULL
- ["member2":"AbstractClass":private]=>
- NULL
- ["member3":protected]=>
- NULL
- ["var1"]=>
- int(30)
- }
- [1]=>
- object(ConcreteClass1)#%d (4) {
- ["member1"]=>
- NULL
- ["member2":"AbstractClass":private]=>
- NULL
- ["member3":protected]=>
- NULL
- ["var1"]=>
- int(30)
- }
-}
--- Iteration 11 --
-array(2) {
- [0]=>
- object(Template1)#%d (0) {
- }
- [1]=>
- object(Template1)#%d (0) {
- }
-}
-Done
---UEXPECTF--
-*** Testing array_fill() : usage variations ***
---- Testing array_fill() with different object values for 'val' argument ---
--- Iteration 1 --
-array(2) {
- [0]=>
- object(Test)#%d (0) {
- }
- [1]=>
- object(Test)#%d (0) {
- }
-}
--- Iteration 2 --
array(2) {
[0]=>
object(Test1)#%d (3) {
object(Template1)#%d (0) {
}
}
-Done
\ No newline at end of file
+Done
}
-- Iteration 17 --
-Warning: array_fill() expects parameter 1 to be long, string given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_fill() expects parameter 1 to be long, string given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_fill() expects parameter 1 to be long, string given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_fill() expects parameter 1 to be long, string given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_fill() expects parameter 1 to be long, object given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 22 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 23 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 24 --
-
-Warning: array_fill() expects parameter 1 to be long, resource given in %sarray_fill_variation1.php on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_fill() : usage variations ***
---- Testing array_fill() with different values for 'start_key' arg ---
--- Iteration 1 --
-array(2) {
- [10]=>
- int(100)
- [11]=>
- int(100)
-}
--- Iteration 2 --
-array(2) {
- [-10]=>
- int(100)
- [0]=>
- int(100)
-}
--- Iteration 3 --
-array(2) {
- [2147483647]=>
- int(100)
- [-2147483648]=>
- int(100)
-}
--- Iteration 4 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 5 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 6 --
-
-Warning: array_fill() expects parameter 1 to be long, array given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_fill() expects parameter 1 to be long, array given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_fill() expects parameter 1 to be long, array given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_fill() expects parameter 1 to be long, array given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_fill() expects parameter 1 to be long, array given in %sarray_fill_variation1.php on line %d
-NULL
--- Iteration 11 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 12 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 13 --
-array(2) {
- [1]=>
- int(100)
- [2]=>
- int(100)
-}
--- Iteration 14 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 15 --
-array(2) {
- [1]=>
- int(100)
- [2]=>
- int(100)
-}
--- Iteration 16 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 17 --
-
Warning: array_fill() expects parameter 1 to be long, Unicode string given in %sarray_fill_variation1.php on line %d
NULL
-- Iteration 18 --
}
-- Iteration 17 --
-Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_fill() expects parameter 1 to be long, object given in %s on line %d
-NULL
--- Iteration 22 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 23 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 24 --
-
-Warning: array_fill() expects parameter 1 to be long, resource given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_fill() : usage variations ***
---- Testing array_fill() with different values for 'start_key' arg ---
--- Iteration 1 --
-array(2) {
- [10]=>
- int(100)
- [11]=>
- int(100)
-}
--- Iteration 2 --
-array(2) {
- [-10]=>
- int(100)
- [0]=>
- int(100)
-}
--- Iteration 3 --
-array(2) {
- [123456789000]=>
- int(100)
- [123456789001]=>
- int(100)
-}
--- Iteration 4 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 5 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 6 --
-
-Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d
-NULL
--- Iteration 11 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 12 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 13 --
-array(2) {
- [1]=>
- int(100)
- [2]=>
- int(100)
-}
--- Iteration 14 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 15 --
-array(2) {
- [1]=>
- int(100)
- [2]=>
- int(100)
-}
--- Iteration 16 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 17 --
-
Warning: array_fill() expects parameter 1 to be long, Unicode string given in %s on line %d
NULL
-- Iteration 18 --
bool(false)
-- Iteration 17 --
-Warning: array_fill() expects parameter 2 to be long, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_fill() expects parameter 2 to be long, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_fill() expects parameter 2 to be long, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_fill() expects parameter 2 to be long, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_fill() expects parameter 2 to be long, object given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
-Done
---UEXPECTF--
-*** Testing array_fill() : usage variations ***
---- Testing array_fill() with different values for 'num' arg ---
--- Iteration 1 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
--- Iteration 2 --
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
--- Iteration 3 --
-array(5) {
- [0]=>
- int(100)
- [1]=>
- int(100)
- [2]=>
- int(100)
- [3]=>
- int(100)
- [4]=>
- int(100)
-}
--- Iteration 4 --
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
--- Iteration 13 --
-array(1) {
- [0]=>
- int(100)
-}
--- Iteration 14 --
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
--- Iteration 15 --
-array(1) {
- [0]=>
- int(100)
-}
--- Iteration 16 --
-
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
--- Iteration 17 --
-
Warning: array_fill() expects parameter 2 to be long, Unicode string given in %s on line %d
NULL
-- Iteration 18 --
*** Testing array_fill() : usage variations ***
--- Testing array_fill() with different values for 'val' argument ---
-- Iteration 1 --
-array(2) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
-}
--- Iteration 2 --
-array(2) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
-}
--- Iteration 3 --
-array(2) {
- [0]=>
- object(test)#%d (1) {
- ["t"]=>
- int(10)
- }
- [1]=>
- object(test)#%d (1) {
- ["t"]=>
- int(10)
- }
-}
--- Iteration 4 --
-array(2) {
- [0]=>
- NULL
- [1]=>
- NULL
-}
--- Iteration 5 --
-array(2) {
- [0]=>
- NULL
- [1]=>
- NULL
-}
-Done
---UEXPECTF--
-*** Testing array_fill() : usage variations ***
---- Testing array_fill() with different values for 'val' argument ---
--- Iteration 1 --
array(2) {
[0]=>
unicode(0) ""
[1]=>
NULL
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_fill() : variation ***
-*** Filling 2 dimensional array with all basic valid values ***
--- Iteration 1 --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- NULL
- [1]=>
- NULL
- }
- [1]=>
- array(2) {
- [0]=>
- NULL
- [1]=>
- NULL
- }
-}
--- Iteration 2 --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(0)
- }
- [1]=>
- array(2) {
- [0]=>
- int(0)
- [1]=>
- int(0)
- }
-}
--- Iteration 3 --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(1)
- }
-}
--- Iteration 4 --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- float(1)
- [1]=>
- float(1)
- }
- [1]=>
- array(2) {
- [0]=>
- float(1)
- [1]=>
- float(1)
- }
-}
--- Iteration 5 --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- string(2) "hi"
- [1]=>
- string(2) "hi"
- }
- [1]=>
- array(2) {
- [0]=>
- string(2) "hi"
- [1]=>
- string(2) "hi"
- }
-}
--- Iteration 6 --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- string(2) "hi"
- [1]=>
- string(2) "hi"
- }
- [1]=>
- array(2) {
- [0]=>
- string(2) "hi"
- [1]=>
- string(2) "hi"
- }
-}
--- Iteration 7 --
-array(2) {
- [0]=>
- array(2) {
- [0]=>
- string(5) "Hello"
- [1]=>
- string(5) "Hello"
- }
- [1]=>
- array(2) {
- [0]=>
- string(5) "Hello"
- [1]=>
- string(5) "Hello"
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_fill() : variation ***
*** Filling 2 dimensional array with all basic valid values ***
-- Iteration 1 --
unicode(5) "Hello"
}
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_fill() : usage variations ***
---- Testing array_fill() with different types of array values for 'val' argument ---
--- Iteration 1 --
-array(2) {
- [0]=>
- array(0) {
- }
- [1]=>
- array(0) {
- }
-}
--- Iteration 2 --
-array(2) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
- [1]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
-}
--- Iteration 3 --
-array(2) {
- [0]=>
- array(2) {
- [1]=>
- string(2) "Hi"
- [2]=>
- string(5) "Hello"
- }
- [1]=>
- array(2) {
- [1]=>
- string(2) "Hi"
- [2]=>
- string(5) "Hello"
- }
-}
--- Iteration 4 --
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(7) "Saffron"
- [1]=>
- string(5) "White"
- [2]=>
- string(5) "Green"
- }
- [1]=>
- array(3) {
- [0]=>
- string(7) "Saffron"
- [1]=>
- string(5) "White"
- [2]=>
- string(5) "Green"
- }
-}
--- Iteration 5 --
-array(2) {
- [0]=>
- array(2) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- }
- [1]=>
- array(2) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- }
-}
--- Iteration 6 --
-array(2) {
- [0]=>
- array(2) {
- ["color"]=>
- string(3) "red"
- [2]=>
- string(6) "green "
- }
- [1]=>
- array(2) {
- ["color"]=>
- string(3) "red"
- [2]=>
- string(6) "green "
- }
-}
--- Iteration 7 --
-array(2) {
- [0]=>
- array(2) {
- ["colour"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- }
- [1]=>
- array(2) {
- ["colour"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- }
-}
--- Iteration 8 --
-array(2) {
- [0]=>
- array(2) {
- [1]=>
- string(3) "red"
- [0]=>
- string(5) "green"
- }
- [1]=>
- array(2) {
- [1]=>
- string(3) "red"
- [0]=>
- string(5) "green"
- }
-}
--- Iteration 9 --
-array(2) {
- [0]=>
- array(2) {
- [1]=>
- string(3) "red"
- [0]=>
- string(5) "green"
- }
- [1]=>
- array(2) {
- [1]=>
- string(3) "red"
- [0]=>
- string(5) "green"
- }
-}
--- Iteration 10 --
-array(2) {
- [0]=>
- array(3) {
- [1]=>
- string(2) "Hi"
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- }
- [1]=>
- array(3) {
- [1]=>
- string(2) "Hi"
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- }
-}
--- Iteration 11 --
-array(2) {
- [0]=>
- array(2) {
- [""]=>
- string(2) "Hi"
- [1]=>
- string(5) "Green"
- }
- [1]=>
- array(2) {
- [""]=>
- string(2) "Hi"
- [1]=>
- string(5) "Green"
- }
-}
--- Iteration 12 --
-array(2) {
- [0]=>
- array(2) {
- [""]=>
- int(1)
- ["color"]=>
- string(5) "green"
- }
- [1]=>
- array(2) {
- [""]=>
- int(1)
- ["color"]=>
- string(5) "green"
- }
-}
--- Iteration 13 --
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- string(7) "Saffron"
- [1]=>
- string(5) "White"
- [2]=>
- string(5) "Green"
- }
- [1]=>
- array(3) {
- [0]=>
- string(7) "Saffron"
- [1]=>
- string(5) "White"
- [2]=>
- string(5) "Green"
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_fill() : usage variations ***
--- Testing array_fill() with different types of array values for 'val' argument ---
-- Iteration 1 --
unicode(5) "Green"
}
}
-Done
\ No newline at end of file
+Done
?>
--EXPECTF--
Odd :
-array(3) {
- ["a"]=>
- int(1)
- ["c"]=>
- int(3)
- ["e"]=>
- int(5)
-}
-array(3) {
- [1]=>
- int(7)
- [3]=>
- int(9)
- [5]=>
- int(11)
-}
-array(1) {
- [0]=>
- bool(true)
-}
-Even:
-array(2) {
- ["b"]=>
- int(2)
- ["d"]=>
- int(4)
-}
-array(5) {
- [0]=>
- int(6)
- [2]=>
- int(8)
- [4]=>
- int(10)
- [6]=>
- int(12)
- [7]=>
- int(0)
-}
-array(2) {
- [1]=>
- bool(false)
- [2]=>
- NULL
-}
-array(0) {
-}
-
-Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-== DONE ==
---UEXPECTF--
-Odd :
array(3) {
[u"a"]=>
int(1)
Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
NULL
-Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
echo "Done"
?>
---EXPECTF--
-*** Testing array_filter() : basic functionality ***
-array(2) {
- [1]=>
- int(2)
- [3]=>
- int(0)
-}
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [4]=>
- int(-1)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_filter() : basic functionality ***
array(2) {
[1]=>
Warning: array_filter() expects parameter 2 to be a valid callback, function 'even' not found or invalid function name in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_filter() : error conditions ***
--- Testing array_filter() function with Zero arguments --
-Warning: array_filter() expects at least 1 parameter, 0 given in %s on line %d
-NULL
--- Testing array_filter() function with more than expected no. of arguments --
-Warning: array_filter() expects at most 2 parameters, 3 given in %s on line %d
-NULL
--- Testing array_filter() function with incorrect callback --
-Warning: array_filter() expects parameter 2 to be a valid callback, function 'even' not found or invalid function name in %s on line %d
-NULL
-Done
?>
--EXPECTF--
*** Testing array_filter() : object functionality ***
-array(5) {
- [0]=>
- object(SimpleClass)#%d (1) {
- ["var1"]=>
- int(10)
- }
- [1]=>
- object(EmptyClass)#%d (0) {
- }
- [2]=>
- object(ChildClass)#%d (2) {
- ["var3":"ChildClass":private]=>
- NULL
- ["var2":protected]=>
- int(5)
- }
- [3]=>
- object(FinalClass)#%d (1) {
- ["var4":"FinalClass":private]=>
- NULL
- }
- [4]=>
- object(StaticClass)#%d (0) {
- }
-}
-array(5) {
- [0]=>
- object(SimpleClass)#%d (1) {
- ["var1"]=>
- int(10)
- }
- [1]=>
- object(EmptyClass)#%d (0) {
- }
- [2]=>
- object(ChildClass)#%d (2) {
- ["var3":"ChildClass":private]=>
- NULL
- ["var2":protected]=>
- int(5)
- }
- [3]=>
- object(FinalClass)#%d (1) {
- ["var4":"FinalClass":private]=>
- NULL
- }
- [4]=>
- object(StaticClass)#%d (0) {
- }
-}
-array(0) {
-}
-Done
---UEXPECTF--
-*** Testing array_filter() : object functionality ***
array(5) {
[0]=>
object(SimpleClass)#%d (1) {
NULL
-- Iteration 16 --
-Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_filter() expects parameter 1 to be array, object given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_filter() expects parameter 1 to be array, resource given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_filter() : usage variations - unexpected values for 'input'***
--- Iteration 1 --
-
-Warning: array_filter() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_filter() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_filter() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_filter() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_filter() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_filter() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_filter() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_filter() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 16 --
-
Warning: array_filter() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
-- Iteration 17 --
Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_filter() : usage variations - unexpected values for 'callback' function***
--- Iteration 1 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 2 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 3 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 4 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 5 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 6 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 7 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 8 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 9 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 10 --
-Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 11 --
-Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 12 --
-Warning: array_filter() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 13 --
-Warning: array_filter() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
--- Iteration 14 --
-Warning: array_filter() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
--- Iteration 15 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 16 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 17 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 18 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 19 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 20 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 21 --
-Warning: array_filter() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- Iteration 22 --
-Warning: array_filter() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- Iteration 23 --
-Warning: array_filter() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d
-NULL
--- Iteration 24 --
-Warning: array_filter() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d
-NULL
--- Iteration 25 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 26 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 27 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 28 --
-Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-Done
echo "Done"
?>
---EXPECTF--
-*** Testing array_filter() : usage variations - different types of array for 'input' argument***
--- Iteration 1 --
-array(5) {
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(-1)
- [4]=>
- int(28)
- [5]=>
- int(74)
-}
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(-1)
- [4]=>
- int(28)
- [5]=>
- int(74)
-}
-array(0) {
-}
--- Iteration 2 --
-array(3) {
- [1]=>
- float(1.2)
- [2]=>
- float(1200)
- [3]=>
- float(0.0012)
-}
-array(4) {
- [0]=>
- float(0)
- [1]=>
- float(1.2)
- [2]=>
- float(1200)
- [3]=>
- float(0.0012)
-}
-array(0) {
-}
--- Iteration 3 --
-array(3) {
- [0]=>
- string(6) "value1"
- [1]=>
- string(6) "value2"
- [3]=>
- string(1) " "
-}
-array(5) {
- [0]=>
- string(6) "value1"
- [1]=>
- string(6) "value2"
- [2]=>
- string(0) ""
- [3]=>
- string(1) " "
- [4]=>
- string(0) ""
-}
-array(0) {
-}
--- Iteration 4 --
-array(2) {
- [0]=>
- bool(true)
- [2]=>
- bool(true)
-}
-array(4) {
- [0]=>
- bool(true)
- [1]=>
- bool(false)
- [2]=>
- bool(true)
- [3]=>
- bool(false)
-}
-array(0) {
-}
--- Iteration 5 --
-array(0) {
-}
-array(2) {
- [0]=>
- NULL
- [1]=>
- NULL
-}
-array(0) {
-}
--- Iteration 6 --
-array(2) {
- [1]=>
- string(3) "one"
- [-2]=>
- string(5) "value"
-}
-array(3) {
- [1]=>
- string(3) "one"
- ["zero"]=>
- int(0)
- [-2]=>
- string(5) "value"
-}
-array(0) {
-}
--- Iteration 7 --
-array(4) {
- ["one"]=>
- int(1)
- [""]=>
- string(5) "empty"
- [5]=>
- string(5) "float"
- [1]=>
- int(1)
-}
-array(4) {
- ["one"]=>
- int(1)
- [""]=>
- string(5) "empty"
- [5]=>
- string(5) "float"
- [1]=>
- int(1)
-}
-array(0) {
-}
--- Iteration 8 --
-array(3) {
- [1]=>
- string(3) "one"
- [2]=>
- int(2)
- ["key"]=>
- string(5) "value"
-}
-array(3) {
- [1]=>
- string(3) "one"
- [2]=>
- int(2)
- ["key"]=>
- string(5) "value"
-}
-array(0) {
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_filter() : usage variations - different types of array for 'input' argument***
-- Iteration 1 --
array(5) {
echo "Done"
?>
---EXPECTF--
-*** Testing array_filter() : usage variation - different 'callback' functions***
--- Callback function without parameter and with return --
-array(8) {
- [0]=>
- int(0)
- [1]=>
- int(-1)
- [2]=>
- int(2)
- [3]=>
- float(0.0034)
- [4]=>
- string(5) "hello"
- [5]=>
- string(5) "value"
- ["key"]=>
- int(4)
- ["null"]=>
- NULL
-}
--- Callback funciton with parameter and without return --
-array(0) {
-}
--- Callback function without parameter and return --
-array(0) {
-}
--- Callback function with parameter and return --
-array(3) {
- [2]=>
- int(2)
- [3]=>
- float(0.0034)
- ["key"]=>
- int(4)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_filter() : usage variation - different 'callback' functions***
-- Callback function without parameter and with return --
array(8) {
echo "Done"
?>
---EXPECTF--
-*** Testing array_filter() : usage variations - different false elements in 'input' ***
-array(0) {
-}
-array(16) {
- [0]=>
- bool(false)
- [1]=>
- bool(false)
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
- [4]=>
- int(0)
- [5]=>
- float(0)
- [6]=>
- NULL
- [7]=>
- NULL
- [8]=>
- string(1) "0"
- [9]=>
- string(1) "0"
- [10]=>
- array(0) {
- }
- [11]=>
- bool(false)
- [12]=>
- bool(false)
- [13]=>
- string(0) ""
- [14]=>
- NULL
- [15]=>
- NULL
-}
-array(0) {
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_filter() : usage variations - different false elements in 'input' ***
array(0) {
}
echo "Done"
?>
---EXPECTF--
-*** Testing array_filter() : usage variations - 'input' containing references ***
-array(3) {
- [0]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(8)
- }
- [1]=>
- int(10)
- [2]=>
- &array(3) {
- [0]=>
- int(5)
- [1]=>
- int(6)
- [2]=>
- int(4)
- }
-}
-array(4) {
- [0]=>
- &array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(8)
- }
- [1]=>
- int(10)
- [2]=>
- &array(3) {
- [0]=>
- int(5)
- [1]=>
- int(6)
- [2]=>
- int(4)
- }
- [3]=>
- string(5) "value"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_filter() : usage variations - 'input' containing references ***
array(3) {
[0]=>
echo "Done"
?>
---EXPECTF--
-*** Testing array_filter() : usage variations - Anonymous callback functions ***
-Anonymous callback function with regular parameter and statement
-array(3) {
- [3]=>
- int(10)
- [4]=>
- int(100)
- [5]=>
- int(1000)
-}
-Anonymous callback function with reference parameter
-array(4) {
- [0]=>
- int(0)
- [2]=>
- int(-1)
- [6]=>
- string(5) "Hello"
- [7]=>
- NULL
-}
-Anonymous callback funciton with null argument
-array(8) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(-1)
- [3]=>
- int(10)
- [4]=>
- int(100)
- [5]=>
- int(1000)
- [6]=>
- string(5) "Hello"
- [7]=>
- NULL
-}
-Anonymous callback function with regular argument and null statement
-array(0) {
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_filter() : usage variations - Anonymous callback functions ***
Anonymous callback function with regular parameter and statement
array(3) {
echo "Done"
?>
---EXPECTF--
-*** Testing array_filter() : usage variations - callback function with different return values***
-callback function with int return value
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(-1)
- [3]=>
- int(10)
- [4]=>
- int(100)
- [5]=>
- int(1000)
- [6]=>
- string(5) "Hello"
- [7]=>
- NULL
- [8]=>
- bool(true)
-}
-callback function with float return value
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(-1)
- [3]=>
- int(10)
- [4]=>
- int(100)
- [5]=>
- int(1000)
- [6]=>
- string(5) "Hello"
- [7]=>
- NULL
- [8]=>
- bool(true)
-}
-callback function with string return value
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(-1)
- [3]=>
- int(10)
- [4]=>
- int(100)
- [5]=>
- int(1000)
- [6]=>
- string(5) "Hello"
- [7]=>
- NULL
- [8]=>
- bool(true)
-}
-callback function with null return value
-array(0) {
-}
-callback function with array as return value
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(-1)
- [3]=>
- int(10)
- [4]=>
- int(100)
- [5]=>
- int(1000)
- [6]=>
- string(5) "Hello"
- [7]=>
- NULL
- [8]=>
- bool(true)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_filter() : usage variations - callback function with different return values***
callback function with int return value
array(9) {
[5]=>
int(1000)
}
-array(8) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(-1)
- [3]=>
- int(10)
- [4]=>
- int(100)
- [5]=>
- int(1000)
- [6]=>
- string(5) "Hello"
- [7]=>
- NULL
-}
-
-Warning: array_filter() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
-
-Warning: array_filter() expects parameter 2 to be a valid callback, function 'exit' not found or invalid function name in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_filter() : usage variations - built-in functions as 'callback' argument ***
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(-1)
- [3]=>
- int(10)
- [4]=>
- int(100)
- [5]=>
- int(1000)
-}
array(8) {
[0]=>
int(0)
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-array(6) {
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- [0]=>
- string(1) "z"
- ["G"]=>
- int(0)
- ["h"]=>
- int(1)
- ["i"]=>
- int(2)
-}
---UEXPECTF--
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
array(6) {
[1]=>
var_dump( array_flip($input) );
echo "Done"
?>
---EXPECTF--
-*** Testing array_flip() : basic functionality ***
-array(2) {
- [1]=>
- int(0)
- [2]=>
- int(1)
-}
-array(2) {
- ["value1"]=>
- int(0)
- ["value2"]=>
- int(1)
-}
-array(2) {
- [1]=>
- string(4) "key1"
- [2]=>
- string(4) "key2"
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(5) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- string(4) "five"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_flip() : basic functionality ***
array(2) {
[1]=>
Warning: array_flip() expects exactly 1 parameter, 2 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_flip() : error conditions ***
--- Testing array_flip() function with Zero arguments --
-
-Warning: array_flip() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
--- Testing array_flip() function with more than expected no. of arguments --
-
-Warning: array_flip() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-Done
NULL
-- Iteration 16 --
-Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_flip() expects parameter 1 to be array, object given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_flip() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_flip() : usage variations - unexpected values for 'input' ***
--- Iteration 1 --
-
-Warning: array_flip() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_flip() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_flip() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_flip() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_flip() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_flip() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_flip() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_flip() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 16 --
-
Warning: array_flip() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
-- Iteration 17 --
array(0) {
}
Done
---UEXPECTF--
-*** Testing array_flip() : different invalid values in 'input' array argument ***
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-array(0) {
-}
-Done
\ No newline at end of file
echo "Done"
?>
---EXPECTF--
-*** Testing array_flip() : 'input' array with repeatitive keys/values ***
-array(3) {
- ["VaLuE"]=>
- int(1)
- ["VALUE"]=>
- int(2)
- [5]=>
- int(3)
-}
-array(3) {
- ["FOUR"]=>
- string(3) "key"
- ["TWO"]=>
- string(3) "two"
- [3]=>
- string(5) "three"
-}
-array(2) {
- [-1]=>
- int(1)
- [0]=>
- int(0)
-}
-array(1) {
- [0]=>
- string(0) ""
-}
-array(2) {
- [1]=>
- string(5) "index"
- [2]=>
- string(3) "two"
-}
-array(2) {
- ["value1"]=>
- string(4) "key3"
- [2]=>
- string(4) "key2"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_flip() : 'input' array with repeatitive keys/values ***
array(3) {
[u"VaLuE"]=>
)),
);
var_dump(array_uintersect($a, $b, "comp_func_cr"));
-array(3) {
- ["0.1"]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(9)
- ["public_member"]=>
- int(9)
- }
- [1]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(4)
- ["public_member"]=>
- int(4)
- }
- [2]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(-15)
- ["public_member"]=>
- int(-15)
- }
-}
-end ------------ array_uintersect() ---------------------------
-begin ------------ array_uintersect_assoc() ---------------------
-$a=array (
- '0.1' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 12,
- 'public_member' => 12,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 23,
- 'public_member' => 23,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-$b=array (
- '0.2' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 22,
- 'public_member' => 22,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 3,
- 'public_member' => 3,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-var_dump(array_uintersect_assoc($a, $b, "comp_func_cr"));
-array(2) {
- [1]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(4)
- ["public_member"]=>
- int(4)
- }
- [2]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(-15)
- ["public_member"]=>
- int(-15)
- }
-}
-end ------------ array_uintersect_assoc() ---------------------
-begin ------------ array_uintersect_uassoc() with ordinary func -
-$a=array (
- '0.1' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 12,
- 'public_member' => 12,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 23,
- 'public_member' => 23,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-$b=array (
- '0.2' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 22,
- 'public_member' => 22,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 3,
- 'public_member' => 3,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-var_dump(array_uintersect_uassoc($a, $b, "comp_func_cr", "comp_func"));
-array(2) {
- [1]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(4)
- ["public_member"]=>
- int(4)
- }
- [2]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(-15)
- ["public_member"]=>
- int(-15)
- }
-}
-end ------------ array_uintersect_uassoc() with ordinary func -
-begin ------------ array_uintersect_uassoc() with method --------
-$a=array (
- '0.1' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 12,
- 'public_member' => 12,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 23,
- 'public_member' => 23,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-$b=array (
- '0.2' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 22,
- 'public_member' => 22,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 3,
- 'public_member' => 3,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-var_dump(array_uintersect_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func"));
-array(2) {
- [1]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(4)
- ["public_member"]=>
- int(4)
- }
- [2]=>
- object(cr)#%d (2) {
- ["priv_member":"cr":private]=>
- int(-15)
- ["public_member"]=>
- int(-15)
- }
-}
-end ------------ array_uintersect_uassoc() with method --------
---UEXPECTF--
-begin ------------ array_uintersect() ---------------------------
-$a=array (
- '0.1' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 12,
- 'public_member' => 12,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 23,
- 'public_member' => 23,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-$b=array (
- '0.2' =>
- cr::__set_state(array(
- 'priv_member' => 9,
- 'public_member' => 9,
- )),
- '0.5' =>
- cr::__set_state(array(
- 'priv_member' => 22,
- 'public_member' => 22,
- )),
- 0 =>
- cr::__set_state(array(
- 'priv_member' => 3,
- 'public_member' => 3,
- )),
- 1 =>
- cr::__set_state(array(
- 'priv_member' => 4,
- 'public_member' => 4,
- )),
- 2 =>
- cr::__set_state(array(
- 'priv_member' => -15,
- 'public_member' => -15,
- )),
-);
-var_dump(array_uintersect($a, $b, "comp_func_cr"));
array(3) {
[u"0.1"]=>
object(cr)#%d (2) {
?>
--EXPECTF--
*** Testing array_intersect_assoc() : basic functionality ***
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(5) "hello"
- [3]=>
- string(5) "world"
-}
-array(0) {
-}
-array(0) {
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(0) {
-}
-array(0) {
-}
-Done
---UEXPECTF--
-*** Testing array_intersect_assoc() : basic functionality ***
array(4) {
[0]=>
int(1)
Warning: array_intersect_assoc(): at least 2 parameters are required, 1 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_intersect_assoc() : error conditions ***
-
--- Testing array_intersect_assoc() function with Zero arguments --
-
-Warning: array_intersect_assoc(): at least 2 parameters are required, 0 given in %s on line %d
-NULL
-
--- Testing array_intersect_assoc() function with less than expected no. of arguments --
-
-Warning: array_intersect_assoc(): at least 2 parameters are required, 1 given in %s on line %d
-NULL
-Done
-
echo "Done";
?>
---EXPECTF--
-*** Testing array_intersect_assoc() : binary safe checking ***
-array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
-}
-array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
-}
-array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_intersect_assoc() : binary safe checking ***
array(2) {
[0]=>
echo "Done";
?>
---EXPECTF--
-*** Testing array_intersect_assoc() : Passing different types of arrays to $arr1 argument ***
--- Iteration 1 --
-array(1) {
- [0]=>
- int(1)
-}
-array(1) {
- [0]=>
- int(1)
-}
--- Iteration 2 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 3 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 4 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 5 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 6 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 7 --
-array(1) {
- [1]=>
- string(6) "aaaa\r"
-}
-array(1) {
- [1]=>
- string(6) "aaaa\r"
-}
--- Iteration 8 --
-array(1) {
- ["h3"]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
-}
-array(1) {
- ["h3"]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
-}
--- Iteration 9 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 10 --
-array(1) {
- ["two"]=>
- int(2)
-}
-array(1) {
- ["two"]=>
- int(2)
-}
--- Iteration 11 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 12 --
-array(1) {
- ["one"]=>
- string(3) "ten"
-}
-array(1) {
- ["one"]=>
- string(3) "ten"
-}
--- Iteration 13 --
-array(1) {
- [4]=>
- string(4) "four"
-}
-array(1) {
- [4]=>
- string(4) "four"
-}
--- Iteration 14 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 15 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 16 --
-array(2) {
- [""]=>
- string(6) "emptys"
- ["emptyd"]=>
- string(0) ""
-}
-array(2) {
- [""]=>
- string(6) "emptys"
- ["emptyd"]=>
- string(0) ""
-}
--- Iteration 17 --
-array(1) {
- [5]=>
- bool(false)
-}
-array(1) {
- [5]=>
- bool(false)
-}
--- Iteration 18 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 19 --
-array(0) {
-}
-array(0) {
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_intersect_assoc() : Passing different types of arrays to $arr1 argument ***
-- Iteration 1 --
array(1) {
echo "Done";
?>
---EXPECTF--
-*** Testing array_intersect_assoc() : Passing different types of arrays to $arr2 argument ***
--- Iteration 1 --
-array(1) {
- [0]=>
- int(1)
-}
-array(1) {
- [0]=>
- int(1)
-}
--- Iteration 2 --
-array(1) {
- [2]=>
- float(1.3)
-}
-array(1) {
- [2]=>
- float(1.3)
-}
--- Iteration 3 --
-array(1) {
- [1]=>
- bool(true)
-}
-array(1) {
- [1]=>
- bool(true)
-}
--- Iteration 4 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 5 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 6 --
-array(1) {
- [3]=>
- string(5) "b bbb"
-}
-array(1) {
- [3]=>
- string(5) "b bbb"
-}
--- Iteration 7 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 8 --
-array(1) {
- ["h3"]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
-}
-array(1) {
- ["h3"]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
-}
--- Iteration 9 --
-array(1) {
- [6]=>
- string(3) "six"
-}
-array(1) {
- [6]=>
- string(3) "six"
-}
--- Iteration 10 --
-array(1) {
- ["two"]=>
- int(2)
-}
-array(1) {
- ["two"]=>
- int(2)
-}
--- Iteration 11 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 12 --
-array(1) {
- ["one"]=>
- string(3) "ten"
-}
-array(1) {
- ["one"]=>
- string(3) "ten"
-}
--- Iteration 13 --
-array(1) {
- [4]=>
- string(4) "four"
-}
-array(1) {
- [4]=>
- string(4) "four"
-}
--- Iteration 14 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 15 --
-array(1) {
- ["true"]=>
- bool(true)
-}
-array(1) {
- ["true"]=>
- bool(true)
-}
--- Iteration 16 --
-array(1) {
- [""]=>
- string(6) "emptys"
-}
-array(1) {
- [""]=>
- string(6) "emptys"
-}
--- Iteration 17 --
-array(1) {
- [5]=>
- NULL
-}
-array(1) {
- [5]=>
- NULL
-}
--- Iteration 18 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 19 --
-array(0) {
-}
-array(0) {
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_intersect_assoc() : Passing different types of arrays to $arr2 argument ***
-- Iteration 1 --
array(1) {
Warning: Illegal offset type in %s on line %d
-Warning: Illegal offset type in %s on line %d
--- Iteration 1 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 2 --
-array(1) {
- [0]=>
- string(1) "0"
-}
-array(1) {
- [0]=>
- string(1) "0"
-}
--- Iteration 3 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 4 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 5 --
-array(1) {
- [2]=>
- string(5) "float"
-}
-array(1) {
- [2]=>
- string(5) "float"
-}
--- Iteration 6 --
-array(2) {
- [4]=>
- string(2) "f3"
- [33333333]=>
- string(2) "f4"
-}
-array(2) {
- [4]=>
- string(2) "f3"
- [33333333]=>
- string(2) "f4"
-}
--- Iteration 7 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 8 --
-array(2) {
- [" Hello"]=>
- int(111)
- ["pen
-"]=>
- int(33)
-}
-array(2) {
- [" Hello"]=>
- int(111)
- ["pen
-"]=>
- int(33)
-}
--- Iteration 9 --
-array(1) {
- ["Hello world"]=>
- string(6) "string"
-}
-array(1) {
- ["Hello world"]=>
- string(6) "string"
-}
--- Iteration 10 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 11 --
-array(1) {
- [133]=>
- string(3) "int"
-}
-array(1) {
- [133]=>
- string(3) "int"
-}
-Done
---UEXPECTF--
-*** Testing array_intersect_assoc() : assoc array with diff keys to $arr1 argument ***
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
Warning: Illegal offset type in %s on line %d
-- Iteration 1 --
array(0) {
Warning: Illegal offset type in %s on line %d
-Warning: Illegal offset type in %s on line %d
--- Iteration 1 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 2 --
-array(1) {
- [0]=>
- int(0)
-}
-array(1) {
- [0]=>
- int(0)
-}
--- Iteration 3 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 4 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 5 --
-array(1) {
- [2]=>
- string(5) "float"
-}
-array(1) {
- [2]=>
- string(5) "float"
-}
--- Iteration 6 --
-array(2) {
- [4]=>
- string(2) "f3"
- [33333333]=>
- string(2) "f4"
-}
-array(2) {
- [4]=>
- string(2) "f3"
- [33333333]=>
- string(2) "f4"
-}
--- Iteration 7 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 8 --
-array(2) {
- [" Hello"]=>
- int(111)
- ["pen
-"]=>
- int(33)
-}
-array(2) {
- [" Hello"]=>
- int(111)
- ["pen
-"]=>
- int(33)
-}
--- Iteration 9 --
-array(1) {
- ["Hello world"]=>
- string(6) "string"
-}
-array(1) {
- ["Hello world"]=>
- string(6) "string"
-}
--- Iteration 10 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 11 --
-array(1) {
- [133]=>
- string(3) "int"
-}
-array(1) {
- [133]=>
- string(3) "int"
-}
-Done
---UEXPECTF--
-*** Testing array_intersect_assoc() : assoc array with diff keys to $arr2 argument ***
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
Warning: Illegal offset type in %s on line %d
-- Iteration 1 --
array(0) {
int(1)
}
-- Iteration 4 --
-array(1) {
- ["two"]=>
- int(2)
-}
-array(1) {
- ["two"]=>
- int(2)
-}
--- Iteration 5 --
-array(1) {
- ["float"]=>
- float(2.3333)
-}
-array(1) {
- ["float"]=>
- float(2.3333)
-}
--- Iteration 6 --
-array(2) {
- ["f1"]=>
- float(1.2)
- ["f4"]=>
- float(33333333.333)
-}
-array(2) {
- ["f1"]=>
- float(1.2)
- ["f4"]=>
- float(33333333.333)
-}
--- Iteration 7 --
-array(1) {
- [111]=>
- string(6) " Hello"
-}
-array(1) {
- [111]=>
- string(6) " Hello"
-}
--- Iteration 8 --
-array(1) {
- [3]=>
- string(5) "pen\n"
-}
-array(1) {
- [3]=>
- string(5) "pen\n"
-}
--- Iteration 9 --
-array(1) {
- ["heredoc"]=>
- string(11) "Hello world"
-}
-array(1) {
- ["heredoc"]=>
- string(11) "Hello world"
-}
--- Iteration 10 --
-array(2) {
- [11]=>
- object(classA)#%d (0) {
- }
- ["resource"]=>
- resource(%d) of type (stream)
-}
-array(2) {
- [11]=>
- object(classA)#%d (0) {
- }
- ["resource"]=>
- resource(%d) of type (stream)
-}
--- Iteration 11 --
-array(4) {
- [222]=>
- string(5) "fruit"
- ["resource"]=>
- resource(%d) of type (stream)
- ["int"]=>
- int(133)
- ["heredoc"]=>
- string(11) "Hello world"
-}
-array(4) {
- [222]=>
- string(5) "fruit"
- ["resource"]=>
- resource(%d) of type (stream)
- ["int"]=>
- int(133)
- ["heredoc"]=>
- string(11) "Hello world"
-}
-Done
---UEXPECTF--
-*** Testing array_intersect_assoc() : assoc array with diff values to $arr1 argument ***
--- Iteration 1 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 2 --
-array(1) {
- [0]=>
- int(0)
-}
-array(1) {
- [0]=>
- int(0)
-}
--- Iteration 3 --
-array(1) {
- [1]=>
- int(1)
-}
-array(1) {
- [1]=>
- int(1)
-}
--- Iteration 4 --
array(1) {
[u"two"]=>
int(2)
array(0) {
}
-- Iteration 2 --
-array(1) {
- [0]=>
- string(1) "0"
-}
-array(1) {
- [0]=>
- string(1) "0"
-}
--- Iteration 3 --
-array(1) {
- [1]=>
- int(1)
-}
-array(1) {
- [1]=>
- int(1)
-}
--- Iteration 4 --
-array(1) {
- ["two"]=>
- int(2)
-}
-array(1) {
- ["two"]=>
- int(2)
-}
--- Iteration 5 --
-array(1) {
- ["float"]=>
- float(2.3333)
-}
-array(1) {
- ["float"]=>
- float(2.3333)
-}
--- Iteration 6 --
-array(2) {
- ["f1"]=>
- float(1.2)
- ["f4"]=>
- float(33333333.333)
-}
-array(2) {
- ["f1"]=>
- float(1.2)
- ["f4"]=>
- float(33333333.333)
-}
--- Iteration 7 --
-array(1) {
- [111]=>
- string(6) " Hello"
-}
-array(1) {
- [111]=>
- string(6) " Hello"
-}
--- Iteration 8 --
-array(1) {
- [3]=>
- string(5) "pen\n"
-}
-array(1) {
- [3]=>
- string(5) "pen\n"
-}
--- Iteration 9 --
-array(1) {
- ["heredoc"]=>
- string(11) "Hello world"
-}
-array(1) {
- ["heredoc"]=>
- string(11) "Hello world"
-}
--- Iteration 10 --
-array(2) {
- [11]=>
- object(classA)#%d (0) {
- }
- ["resource"]=>
- resource(%d) of type (stream)
-}
-array(2) {
- [11]=>
- object(classA)#%d (0) {
- }
- ["resource"]=>
- resource(%d) of type (stream)
-}
--- Iteration 11 --
-array(4) {
- ["heredoc"]=>
- string(11) "Hello world"
- ["resource"]=>
- resource(%d) of type (stream)
- ["int"]=>
- int(133)
- [222]=>
- string(5) "fruit"
-}
-array(4) {
- ["heredoc"]=>
- string(11) "Hello world"
- ["resource"]=>
- resource(%d) of type (stream)
- ["int"]=>
- int(133)
- [222]=>
- string(5) "fruit"
-}
-Done
---UEXPECTF--
-*** Testing array_intersect_assoc() : assoc array with diff values to $arr2 argument ***
--- Iteration 1 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 2 --
array(1) {
[0]=>
unicode(1) "0"
Notice: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s on line %d
-array(2) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(5) "hello"
- [3]=>
- string(5) "world"
- }
- [1]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
-}
-- With more arguments -
-
-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
-
-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(2) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(5) "hello"
- [3]=>
- string(5) "world"
- }
- [1]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
-}
--- Passing the sub-array to $arr1 and $arr2 --
-- With default arguments -
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-- With more arguments -
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-Done
---UEXPECTF--
-*** Testing array_intersect_assoc() : passing two dimensional array to both $arr1 and $arr2 arguments ***
--- Passing the entire 2-D array to $arr1 and $arr2 --
-- With default arguments -
-
-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(2) {
[0]=>
echo "Done";
?>
---EXPECTF--
-*** Testing array_intersect() : basic functionality ***
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(5) "hello"
- [3]=>
- string(5) "world"
-}
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(1) {
- [1]=>
- int(2)
-}
-array(1) {
- ["two"]=>
- int(2)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_intersect() : basic functionality ***
array(4) {
[0]=>
Warning: array_intersect(): at least 2 parameters are required, 1 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_intersect() : error conditions ***
-
--- Testing array_intersect() function with Zero arguments --
-
-Warning: array_intersect(): at least 2 parameters are required, 0 given in %s on line %d
-NULL
-
--- Testing array_intersect() function with less than expected no. of arguments --
-
-Warning: array_intersect(): at least 2 parameters are required, 1 given in %s on line %d
-NULL
-Done
}
?>
---EXPECTF--
+--EXPECT--
array(3) {
[2]=>
int(4)
var_dump(array_intersect_key($array1, $array2));
?>
--EXPECT--
-array(2) {
- ["blue"]=>
- int(1)
- ["green"]=>
- int(3)
-}
---UEXPECT--
array(2) {
[u"blue"]=>
int(1)
[u"green"]=>
int(3)
-}
\ No newline at end of file
+}
var_dump($result);
?>
--EXPECT--
-array(1) {
- ["a"]=>
- string(5) "green"
-}
---UEXPECT--
array(1) {
[u"a"]=>
unicode(5) "green"
-}
\ No newline at end of file
+}
var_dump(array_intersect_ukey($array1, $array2, 'key_compare_func'));
?>
--EXPECT--
-array(2) {
- ["blue"]=>
- int(1)
- ["green"]=>
- int(3)
-}
---UEXPECT--
array(2) {
[u"blue"]=>
int(1)
Warning: array_intersect(): Argument #1 is not an array in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_intersect() : Passing non-array values to $arr1 argument ***
-
--- Iterator 1 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 2 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 3 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 4 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 5 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 6 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 7 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 8 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 9 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 10 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 11 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 12 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 13 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 14 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 15 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 16 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 17 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 18 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 19 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 20 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 21 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 22 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 23 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iterator 24 --
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #1 is not an array in %s on line %d
-NULL
-Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_intersect() : binary safe checking ***
-array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
-}
-array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
-}
-array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_intersect() : binary safe checking ***
array(2) {
[0]=>
Warning: array_intersect(): Argument #2 is not an array in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_intersect() : Passing non-array values to $arr2 argument ***
-
--- Iterator 1 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 2 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 3 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 4 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 5 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 6 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 7 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 8 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 9 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 10 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 11 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 12 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 13 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 14 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 15 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 16 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 17 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 18 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 19 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 20 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 21 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 22 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 23 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iterator 24 --
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_intersect(): Argument #2 is not an array in %s on line %d
-NULL
-Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_intersect() : Passing different types of arrays to $arr1 argument ***
--- Iterator 1 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iterator 2 --
-array(1) {
- [0]=>
- float(1.1)
-}
-array(1) {
- [0]=>
- float(1.1)
-}
--- Iterator 3 --
-array(2) {
- [0]=>
- bool(false)
- [1]=>
- bool(true)
-}
-array(2) {
- [0]=>
- bool(false)
- [1]=>
- bool(true)
-}
--- Iterator 4 --
-array(0) {
-}
-array(0) {
-}
--- Iterator 5 --
-array(1) {
- [0]=>
- NULL
-}
-array(1) {
- [0]=>
- NULL
-}
--- Iterator 6 --
-array(1) {
- [1]=>
- string(5) "aaaa
-"
-}
-array(1) {
- [1]=>
- string(5) "aaaa
-"
-}
--- Iterator 7 --
-array(1) {
- [1]=>
- string(6) "aaaa\r"
-}
-array(1) {
- [1]=>
- string(6) "aaaa\r"
-}
--- Iterator 8 --
-array(2) {
- [2]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
- [3]=>
- string(90) "11 < 12. 123 >22
-'single quoted string'
-"double quoted string"
-2222 != 1111. 0000 = 0000
-"
-}
-array(2) {
- [2]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
- [3]=>
- string(90) "11 < 12. 123 >22
-'single quoted string'
-"double quoted string"
-2222 != 1111. 0000 = 0000
-"
-}
--- Iterator 9 --
-array(2) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
-}
-array(2) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
-}
--- Iterator 10 --
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
--- Iterator 11 --
-array(0) {
-}
-array(0) {
-}
--- Iterator 12 --
-array(1) {
- ["one"]=>
- string(3) "ten"
-}
-array(1) {
- ["one"]=>
- string(3) "ten"
-}
--- Iterator 13 --
-array(3) {
- ["one"]=>
- int(1)
- [2]=>
- string(3) "two"
- [4]=>
- string(4) "four"
-}
-array(3) {
- ["one"]=>
- int(1)
- [2]=>
- string(3) "two"
- [4]=>
- string(4) "four"
-}
--- Iterator 14 --
-array(2) {
- ["NULL"]=>
- NULL
- ["null"]=>
- NULL
-}
-array(2) {
- ["NULL"]=>
- NULL
- ["null"]=>
- NULL
-}
--- Iterator 15 --
-array(2) {
- ["false"]=>
- bool(false)
- ["true"]=>
- bool(true)
-}
-array(2) {
- ["false"]=>
- bool(false)
- ["true"]=>
- bool(true)
-}
--- Iterator 16 --
-array(3) {
- [""]=>
- string(6) "emptys"
- ["emptyd"]=>
- string(0) ""
- ["emptys"]=>
- string(0) ""
-}
-array(3) {
- [""]=>
- string(6) "emptys"
- ["emptyd"]=>
- string(0) ""
- ["emptys"]=>
- string(0) ""
-}
--- Iterator 17 --
-array(6) {
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- NULL
- [4]=>
- NULL
- [5]=>
- bool(false)
- [6]=>
- bool(true)
-}
-array(6) {
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- NULL
- [4]=>
- NULL
- [5]=>
- bool(false)
- [6]=>
- bool(true)
-}
--- Iterator 18 --
-array(1) {
- [0]=>
- int(5)
-}
-array(1) {
- [0]=>
- int(5)
-}
--- Iterator 19 --
-array(0) {
-}
-array(0) {
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_intersect() : Passing different types of arrays to $arr1 argument ***
-- Iterator 1 --
array(2) {
Warning: Illegal offset type in %s on line %d
-Warning: Illegal offset type in %s on line %d
--- Iterator 1 --
-array(0) {
-}
-array(0) {
-}
--- Iterator 2 --
-array(0) {
-}
-array(0) {
-}
--- Iterator 3 --
-array(1) {
- [1]=>
- string(1) "1"
-}
-array(1) {
- [1]=>
- string(1) "1"
-}
--- Iterator 4 --
-array(1) {
- [1]=>
- string(1) "1"
-}
-array(1) {
- [1]=>
- string(1) "1"
-}
--- Iterator 5 --
-array(1) {
- [2]=>
- string(5) "float"
-}
-array(1) {
- [2]=>
- string(5) "float"
-}
--- Iterator 6 --
-array(1) {
- [33333333]=>
- string(2) "f4"
-}
-array(1) {
- [33333333]=>
- string(2) "f4"
-}
--- Iterator 7 --
-array(2) {
- ["re\td"]=>
- string(5) "color"
- ["\v\fworld"]=>
- float(2.2)
-}
-array(2) {
- ["re\td"]=>
- string(5) "color"
- ["\v\fworld"]=>
- float(2.2)
-}
--- Iterator 8 --
-array(2) {
- ["re d"]=>
- string(5) "color"
- ["\v\fworld"]=>
- float(2.2)
-}
-array(2) {
- ["re d"]=>
- string(5) "color"
- ["\v\fworld"]=>
- float(2.2)
-}
--- Iterator 9 --
-array(2) {
- [0]=>
- string(5) "hello"
- ["Hello world"]=>
- string(6) "string"
-}
-array(2) {
- [0]=>
- string(5) "hello"
- ["Hello world"]=>
- string(6) "string"
-}
--- Iterator 10 --
-array(1) {
- [""]=>
- string(5) "hello"
-}
-array(1) {
- [""]=>
- string(5) "hello"
-}
--- Iterator 11 --
-array(3) {
- ["hello"]=>
- int(1)
- ["fruit"]=>
- float(2.2)
- [444]=>
- string(5) "float"
-}
-array(3) {
- ["hello"]=>
- int(1)
- ["fruit"]=>
- float(2.2)
- [444]=>
- string(5) "float"
-}
-Done
---UEXPECTF--
-*** Testing array_intersect() : assoc array with diff keys to $arr1 argument ***
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
Warning: Illegal offset type in %s on line %d
-- Iterator 1 --
array(0) {
Warning: Illegal offset type in %s on line %d
-Warning: Illegal offset type in %s on line %d
--- Iterator 1 --
-array(0) {
-}
-array(0) {
-}
--- Iterator 2 --
-array(0) {
-}
-array(0) {
-}
--- Iterator 3 --
-array(1) {
- [0]=>
- int(1)
-}
-array(1) {
- [0]=>
- int(1)
-}
--- Iterator 4 --
-array(1) {
- [0]=>
- int(1)
-}
-array(1) {
- [0]=>
- int(1)
-}
--- Iterator 5 --
-array(1) {
- [1]=>
- string(5) "float"
-}
-array(1) {
- [1]=>
- string(5) "float"
-}
--- Iterator 6 --
-array(1) {
- [2]=>
- string(2) "f4"
-}
-array(1) {
- [2]=>
- string(2) "f4"
-}
--- Iterator 7 --
-array(2) {
- [4]=>
- float(2.2)
- [5]=>
- string(5) "color"
-}
-array(2) {
- [4]=>
- float(2.2)
- [5]=>
- string(5) "color"
-}
--- Iterator 8 --
-array(2) {
- [4]=>
- float(2.2)
- [5]=>
- string(5) "color"
-}
-array(2) {
- [4]=>
- float(2.2)
- [5]=>
- string(5) "color"
-}
--- Iterator 9 --
-array(2) {
- [3]=>
- string(5) "hello"
- [6]=>
- string(6) "string"
-}
-array(2) {
- [3]=>
- string(5) "hello"
- [6]=>
- string(6) "string"
-}
--- Iterator 10 --
-array(1) {
- [3]=>
- string(5) "hello"
-}
-array(1) {
- [3]=>
- string(5) "hello"
-}
--- Iterator 11 --
-array(3) {
- [0]=>
- int(1)
- [1]=>
- string(5) "float"
- [4]=>
- float(2.2)
-}
-array(3) {
- [0]=>
- int(1)
- [1]=>
- string(5) "float"
- [4]=>
- float(2.2)
-}
-Done
---UEXPECTF--
-*** Testing array_intersect() : assoc array with diff keys to $arr2 argument ***
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
Warning: Illegal offset type in %s on line %d
-- Iterator 1 --
array(0) {
int(1)
}
-- Iterator 4 --
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
--- Iterator 5 --
-array(1) {
- ["float"]=>
- float(2.3333)
-}
-array(1) {
- ["float"]=>
- float(2.3333)
-}
--- Iterator 6 --
-array(1) {
- ["f1"]=>
- float(1.2)
-}
-array(1) {
- ["f1"]=>
- float(1.2)
-}
--- Iterator 7 --
-array(1) {
- ["red"]=>
- string(6) "col or"
-}
-array(1) {
- ["red"]=>
- string(6) "col or"
-}
--- Iterator 8 --
-array(1) {
- [2]=>
- string(9) "\v\fworld"
-}
-array(1) {
- [2]=>
- string(9) "\v\fworld"
-}
--- Iterator 9 --
-array(1) {
- ["heredoc"]=>
- string(11) "Hello world"
-}
-array(1) {
- ["heredoc"]=>
- string(11) "Hello world"
-}
--- Iterator 10 --
-array(2) {
- [11]=>
- object(classA)#%d (0) {
- }
- ["resource"]=>
- resource(%d) of type (stream)
-}
-array(2) {
- [11]=>
- object(classA)#%d (0) {
- }
- ["resource"]=>
- resource(%d) of type (stream)
-}
--- Iterator 11 --
-array(5) {
- [2]=>
- object(classA)#%d (0) {
- }
- [222]=>
- string(5) "fruit"
- ["resource"]=>
- resource(%d) of type (stream)
- ["float"]=>
- float(444.432)
- ["heredoc"]=>
- string(11) "Hello world"
-}
-array(5) {
- [2]=>
- object(classA)#%d (0) {
- }
- [222]=>
- string(5) "fruit"
- ["resource"]=>
- resource(%d) of type (stream)
- ["float"]=>
- float(444.432)
- ["heredoc"]=>
- string(11) "Hello world"
-}
-Done
---UEXPECTF--
-*** Testing array_intersect() : assoc array with diff values to $arr1 argument ***
--- Iterator 1 --
-array(0) {
-}
-array(0) {
-}
--- Iterator 2 --
-array(0) {
-}
-array(0) {
-}
--- Iterator 3 --
-array(1) {
- [1]=>
- int(1)
-}
-array(1) {
- [1]=>
- int(1)
-}
--- Iterator 4 --
array(2) {
[u"one"]=>
int(1)
float(1.2)
}
-- Iterator 7 --
-array(1) {
- [4]=>
- string(6) "col or"
-}
-array(1) {
- [4]=>
- string(6) "col or"
-}
--- Iterator 8 --
-array(1) {
- [5]=>
- string(9) "\v\fworld"
-}
-array(1) {
- [5]=>
- string(9) "\v\fworld"
-}
--- Iterator 9 --
-array(2) {
- [7]=>
- string(11) "Hello world"
- [8]=>
- string(11) "Hello world"
-}
-array(2) {
- [7]=>
- string(11) "Hello world"
- [8]=>
- string(11) "Hello world"
-}
--- Iterator 10 --
-array(2) {
- [6]=>
- resource(%d) of type (stream)
- [9]=>
- object(classA)#%d (0) {
- }
-}
-array(2) {
- [6]=>
- resource(%d) of type (stream)
- [9]=>
- object(classA)#%d (0) {
- }
-}
--- Iterator 11 --
-array(6) {
- [6]=>
- resource(%d) of type (stream)
- [7]=>
- string(11) "Hello world"
- [8]=>
- string(11) "Hello world"
- [9]=>
- object(classA)#%d (0) {
- }
- [10]=>
- float(444.432)
- [11]=>
- string(5) "fruit"
-}
-array(6) {
- [6]=>
- resource(%d) of type (stream)
- [7]=>
- string(11) "Hello world"
- [8]=>
- string(11) "Hello world"
- [9]=>
- object(classA)#%d (0) {
- }
- [10]=>
- float(444.432)
- [11]=>
- string(5) "fruit"
-}
-Done
---UEXPECTF--
-*** Testing array_intersect() : assoc array with diff values to $arr2 argument ***
--- Iterator 1 --
-array(0) {
-}
-array(0) {
-}
--- Iterator 2 --
-array(0) {
-}
-array(0) {
-}
--- Iterator 3 --
-array(1) {
- [0]=>
- int(1)
-}
-array(1) {
- [0]=>
- int(1)
-}
--- Iterator 4 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iterator 5 --
-array(1) {
- [3]=>
- float(2.3333)
-}
-array(1) {
- [3]=>
- float(2.3333)
-}
--- Iterator 6 --
-array(1) {
- [2]=>
- float(1.2)
-}
-array(1) {
- [2]=>
- float(1.2)
-}
--- Iterator 7 --
array(1) {
[4]=>
unicode(6) "col or"
Notice: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s on line %d
-array(4) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(5) "hello"
- [3]=>
- string(5) "world"
- }
- [1]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
- [2]=>
- array(3) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- string(5) "three"
- }
- [3]=>
- array(3) {
- ["ten"]=>
- int(10)
- ["twenty"]=>
- float(20)
- ["thirty"]=>
- int(30)
- }
-}
-- With more arguments -
-
-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
-
-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
-
-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
-
-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
-
-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
-
-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(4) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(5) "hello"
- [3]=>
- string(5) "world"
- }
- [1]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- }
- [2]=>
- array(3) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- string(5) "three"
- }
- [3]=>
- array(3) {
- ["ten"]=>
- int(10)
- ["twenty"]=>
- float(20)
- ["thirty"]=>
- int(30)
- }
-}
--- Passing the sub-array to $arr1 and $arr2 --
-- With default arguments -
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-- With more arguments -
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-Done
---UEXPECTF--
-*** Testing array_intersect() : passing two dimensional array to both $arr1 and $arr2 arguments ***
--- Passing the entire 2-D array to $arr1 and $arr2 --
-- With default arguments -
-
-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
-
-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
-
-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
-
-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(4) {
[0]=>
var_dump( array_key_exists($key_check_obj, $key_check_obj) );
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
*** Testing basic functionalities ***
-- Iteration 1 --
bool(true)
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_key_exists() : basic functionality ***
bool(true)
bool(false)
Done
---UEXPECTF--
-*** Testing array_key_exists() : basic functionality ***
-bool(true)
-bool(false)
-Done
\ No newline at end of file
Warning: array_key_exists() expects exactly 2 parameters, 1 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_key_exists() : error conditions ***
-
--- Testing array_key_exists() function with more than expected no. of arguments --
-
-Warning: array_key_exists() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-
--- Testing array_key_exists() function with less than expected no. of arguments --
-
-Warning: array_key_exists() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
-Done
\ No newline at end of file
--EXPECTF--
*** Testing array_key_exists() : object functionality ***
--- Do not assign a value to $class1->var3 --
-$key = var1:
-bool(true)
-$key = var3:
-bool(true)
-$class1:
-object(myClass)#%d (3) {
- ["var1"]=>
- string(1) "a"
- ["var2"]=>
- string(1) "b"
- ["var3"]=>
- NULL
-}
-
--- Assign a value to $class2->var3 --
-$key = var3:
-bool(true)
-$class2:
-object(myClass)#%d (3) {
- ["var1"]=>
- string(1) "x"
- ["var2"]=>
- string(1) "y"
- ["var3"]=>
- string(1) "z"
-}
-Done
---UEXPECTF--
-*** Testing array_key_exists() : object functionality ***
-
-- Do not assign a value to $class1->var3 --
$key = var1:
bool(true)
[u"var3"]=>
unicode(1) "z"
}
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing array_key_exists() : object functionality ***
--- Do not assign a value to $class1->var3 --
-$key = var1:
-bool(true)
-$key = var2:
-bool(false)
-$key = var3:
-bool(false)
-$class1:
-object(myClass)#%d (3) {
- ["var1"]=>
- string(1) "a"
- ["var2":protected]=>
- string(1) "b"
- ["var3":"myClass":private]=>
- NULL
-}
-
--- Assign a value to $class2->var3 --
-$key = var3:
-bool(false)
-$class2:
-object(myClass)#%d (3) {
- ["var1"]=>
- string(1) "x"
- ["var2":protected]=>
- string(1) "y"
- ["var3":"myClass":private]=>
- string(1) "z"
-}
-Done
---UEXPECTF--
-*** Testing array_key_exists() : object functionality ***
-
-- Do not assign a value to $class1->var3 --
$key = var1:
bool(true)
[u"var3":u"myClass":private]=>
unicode(1) "z"
}
-Done
\ No newline at end of file
+Done
Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
bool(false)
Done
---UEXPECTF--
-*** Testing array_key_exists() : usage variations ***
-
--- Iteration 1 --
-bool(true)
-
--- Iteration 2 --
-bool(true)
-
--- Iteration 3 --
-bool(false)
-
--- Iteration 4 --
-bool(false)
-
--- Iteration 5 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-
--- Iteration 10 --
-bool(false)
-
--- Iteration 11 --
-bool(false)
-
--- Iteration 12 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-
--- Iteration 16 --
-bool(false)
-
--- Iteration 17 --
-bool(false)
-
--- Iteration 18 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-
--- Iteration 19 --
-bool(true)
-
--- Iteration 20 --
-bool(true)
-
--- Iteration 21 --
-bool(true)
-
--- Iteration 22 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-
--- Iteration 23 --
-bool(false)
-
--- Iteration 24 --
-bool(false)
-
--- Iteration 25 --
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-Done
\ No newline at end of file
Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
bool(false)
Done
---UEXPECTF--
-*** Testing array_key_exists() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-
--- Iteration 25 --
-
-Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
-bool(false)
-Done
\ No newline at end of file
Cast float to int:
bool(true)
Done
---UEXPECTF--
-*** Testing array_key_exists() : usage variations ***
-
--- Iteration 1 --
-Pass float as $key:
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-Cast float to int:
-bool(true)
-
--- Iteration 1 --
-Pass float as $key:
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-Cast float to int:
-bool(true)
-
--- Iteration 1 --
-Pass float as $key:
-
-Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
-bool(false)
-Cast float to int:
-bool(true)
-Done
\ No newline at end of file
-- Both arguments are referenced variables --
bool(true)
Done
---UEXPECTF--
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-*** Testing array_key_exists() : usage variations ***
-
--- $search is a reference to $array --
-bool(true)
-
--- $key is a referenced variable --
-bool(true)
-
--- Both arguments are referenced variables --
-bool(true)
-Done
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_key_exists() : usage variations ***
-- Attempt to match key in sub-array --
-- $search arg points to sub-array --
bool(true)
Done
---UEXPECTF--
-*** Testing array_key_exists() : usage variations ***
-
--- Attempt to match key in sub-array --
-bool(false)
-
--- $search arg points to sub-array --
-bool(true)
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_key_exists() : usage variations ***
-- Key in $search array is : null --
Iteration 5: bool(true)
Iteration 6: bool(true)
Done
---UEXPECTF--
-*** Testing array_key_exists() : usage variations ***
-
--- Key in $search array is : null --
-Iteration 1: bool(true)
-Iteration 2: bool(true)
-Iteration 3: bool(true)
-Iteration 4: bool(true)
-Iteration 5: bool(true)
-Iteration 6: bool(true)
-
--- Key in $search array is : NULL --
-Iteration 1: bool(true)
-Iteration 2: bool(true)
-Iteration 3: bool(true)
-Iteration 4: bool(true)
-Iteration 5: bool(true)
-Iteration 6: bool(true)
-
--- Key in $search array is : empty single quoted string --
-Iteration 1: bool(true)
-Iteration 2: bool(true)
-Iteration 3: bool(true)
-Iteration 4: bool(true)
-Iteration 5: bool(true)
-Iteration 6: bool(true)
-
--- Key in $search array is : empty double quoted string --
-Iteration 1: bool(true)
-Iteration 2: bool(true)
-Iteration 3: bool(true)
-Iteration 4: bool(true)
-Iteration 5: bool(true)
-Iteration 6: bool(true)
-
--- Key in $search array is : undefined variable --
-Iteration 1: bool(true)
-Iteration 2: bool(true)
-Iteration 3: bool(true)
-Iteration 4: bool(true)
-Iteration 5: bool(true)
-Iteration 6: bool(true)
-
--- Key in $search array is : unset variable --
-Iteration 1: bool(true)
-Iteration 2: bool(true)
-Iteration 3: bool(true)
-Iteration 4: bool(true)
-Iteration 5: bool(true)
-Iteration 6: bool(true)
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_key_exists() : usage variations ***
-- Call array_key_exists() --
-- Position of Internal Pointer in Original Array: --
one => un
Done
---UEXPECTF--
-*** Testing array_key_exists() : usage variations ***
-
--- Call array_key_exists() --
-bool(true)
-
--- Position of Internal Pointer in Original Array: --
-one => un
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_key_exists() : usage variations ***
-- Iteration 1: int data --
-- $key arguments are unset data:
bool(true)
Done
---UEXPECTF--
-*** Testing array_key_exists() : usage variations ***
-
--- Iteration 1: int data --
--- $key arguments are int data:
-bool(true)
-bool(true)
-bool(true)
-bool(true)
--- $key arguments are float data:
-bool(false)
-bool(false)
-bool(true)
--- $key arguments are extreme floats data:
-bool(false)
-bool(true)
--- $key arguments are null uppercase data:
-bool(false)
--- $key arguments are null lowercase data:
-bool(false)
--- $key arguments are bool lowercase data:
-bool(true)
-bool(true)
--- $key arguments are bool uppercase data:
-bool(true)
-bool(true)
--- $key arguments are empty double quotes data:
-bool(false)
--- $key arguments are empty single quotes data:
-bool(false)
--- $key arguments are string data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are undefined data:
-bool(false)
--- $key arguments are unset data:
-bool(false)
-
--- Iteration 2: float data --
--- $key arguments are int data:
-bool(true)
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are float data:
-bool(true)
-bool(true)
-bool(true)
--- $key arguments are extreme floats data:
-bool(false)
-bool(true)
--- $key arguments are null uppercase data:
-bool(false)
--- $key arguments are null lowercase data:
-bool(false)
--- $key arguments are bool lowercase data:
-bool(false)
-bool(true)
--- $key arguments are bool uppercase data:
-bool(false)
-bool(true)
--- $key arguments are empty double quotes data:
-bool(false)
--- $key arguments are empty single quotes data:
-bool(false)
--- $key arguments are string data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are undefined data:
-bool(false)
--- $key arguments are unset data:
-bool(false)
-
--- Iteration 3: extreme floats data --
--- $key arguments are int data:
-bool(true)
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are float data:
-bool(false)
-bool(false)
-bool(true)
--- $key arguments are extreme floats data:
-bool(true)
-bool(true)
--- $key arguments are null uppercase data:
-bool(false)
--- $key arguments are null lowercase data:
-bool(false)
--- $key arguments are bool lowercase data:
-bool(false)
-bool(true)
--- $key arguments are bool uppercase data:
-bool(false)
-bool(true)
--- $key arguments are empty double quotes data:
-bool(false)
--- $key arguments are empty single quotes data:
-bool(false)
--- $key arguments are string data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are undefined data:
-bool(false)
--- $key arguments are unset data:
-bool(false)
-
--- Iteration 4: null uppercase data --
--- $key arguments are int data:
-bool(false)
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are float data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are extreme floats data:
-bool(false)
-bool(false)
--- $key arguments are null uppercase data:
-bool(true)
--- $key arguments are null lowercase data:
-bool(true)
--- $key arguments are bool lowercase data:
-bool(false)
-bool(false)
--- $key arguments are bool uppercase data:
-bool(false)
-bool(false)
--- $key arguments are empty double quotes data:
-bool(true)
--- $key arguments are empty single quotes data:
-bool(true)
--- $key arguments are string data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are undefined data:
-bool(true)
--- $key arguments are unset data:
-bool(true)
-
--- Iteration 5: null lowercase data --
--- $key arguments are int data:
-bool(false)
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are float data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are extreme floats data:
-bool(false)
-bool(false)
--- $key arguments are null uppercase data:
-bool(true)
--- $key arguments are null lowercase data:
-bool(true)
--- $key arguments are bool lowercase data:
-bool(false)
-bool(false)
--- $key arguments are bool uppercase data:
-bool(false)
-bool(false)
--- $key arguments are empty double quotes data:
-bool(true)
--- $key arguments are empty single quotes data:
-bool(true)
--- $key arguments are string data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are undefined data:
-bool(true)
--- $key arguments are unset data:
-bool(true)
-
--- Iteration 6: bool lowercase data --
--- $key arguments are int data:
-bool(true)
-bool(true)
-bool(false)
-bool(false)
--- $key arguments are float data:
-bool(false)
-bool(false)
-bool(true)
--- $key arguments are extreme floats data:
-bool(false)
-bool(true)
--- $key arguments are null uppercase data:
-bool(false)
--- $key arguments are null lowercase data:
-bool(false)
--- $key arguments are bool lowercase data:
-bool(true)
-bool(true)
--- $key arguments are bool uppercase data:
-bool(true)
-bool(true)
--- $key arguments are empty double quotes data:
-bool(false)
--- $key arguments are empty single quotes data:
-bool(false)
--- $key arguments are string data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are undefined data:
-bool(false)
--- $key arguments are unset data:
-bool(false)
-
--- Iteration 7: bool uppercase data --
--- $key arguments are int data:
-bool(true)
-bool(true)
-bool(false)
-bool(false)
--- $key arguments are float data:
-bool(false)
-bool(false)
-bool(true)
--- $key arguments are extreme floats data:
-bool(false)
-bool(true)
--- $key arguments are null uppercase data:
-bool(false)
--- $key arguments are null lowercase data:
-bool(false)
--- $key arguments are bool lowercase data:
-bool(true)
-bool(true)
--- $key arguments are bool uppercase data:
-bool(true)
-bool(true)
--- $key arguments are empty double quotes data:
-bool(false)
--- $key arguments are empty single quotes data:
-bool(false)
--- $key arguments are string data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are undefined data:
-bool(false)
--- $key arguments are unset data:
-bool(false)
-
--- Iteration 8: empty double quotes data --
--- $key arguments are int data:
-bool(false)
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are float data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are extreme floats data:
-bool(false)
-bool(false)
--- $key arguments are null uppercase data:
-bool(true)
--- $key arguments are null lowercase data:
-bool(true)
--- $key arguments are bool lowercase data:
-bool(false)
-bool(false)
--- $key arguments are bool uppercase data:
-bool(false)
-bool(false)
--- $key arguments are empty double quotes data:
-bool(true)
--- $key arguments are empty single quotes data:
-bool(true)
--- $key arguments are string data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are undefined data:
-bool(true)
--- $key arguments are unset data:
-bool(true)
-
--- Iteration 9: empty single quotes data --
--- $key arguments are int data:
-bool(false)
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are float data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are extreme floats data:
-bool(false)
-bool(false)
--- $key arguments are null uppercase data:
-bool(true)
--- $key arguments are null lowercase data:
-bool(true)
--- $key arguments are bool lowercase data:
-bool(false)
-bool(false)
--- $key arguments are bool uppercase data:
-bool(false)
-bool(false)
--- $key arguments are empty double quotes data:
-bool(true)
--- $key arguments are empty single quotes data:
-bool(true)
--- $key arguments are string data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are undefined data:
-bool(true)
--- $key arguments are unset data:
-bool(true)
-
--- Iteration 10: string data --
--- $key arguments are int data:
-bool(false)
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are float data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are extreme floats data:
-bool(false)
-bool(false)
--- $key arguments are null uppercase data:
-bool(false)
--- $key arguments are null lowercase data:
-bool(false)
--- $key arguments are bool lowercase data:
-bool(false)
-bool(false)
--- $key arguments are bool uppercase data:
-bool(false)
-bool(false)
--- $key arguments are empty double quotes data:
-bool(false)
--- $key arguments are empty single quotes data:
-bool(false)
--- $key arguments are string data:
-bool(true)
-bool(true)
-bool(true)
--- $key arguments are undefined data:
-bool(false)
--- $key arguments are unset data:
-bool(false)
-
--- Iteration 11: undefined data --
--- $key arguments are int data:
-bool(false)
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are float data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are extreme floats data:
-bool(false)
-bool(false)
--- $key arguments are null uppercase data:
-bool(true)
--- $key arguments are null lowercase data:
-bool(true)
--- $key arguments are bool lowercase data:
-bool(false)
-bool(false)
--- $key arguments are bool uppercase data:
-bool(false)
-bool(false)
--- $key arguments are empty double quotes data:
-bool(true)
--- $key arguments are empty single quotes data:
-bool(true)
--- $key arguments are string data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are undefined data:
-bool(true)
--- $key arguments are unset data:
-bool(true)
-
--- Iteration 12: unset data --
--- $key arguments are int data:
-bool(false)
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are float data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are extreme floats data:
-bool(false)
-bool(false)
--- $key arguments are null uppercase data:
-bool(true)
--- $key arguments are null lowercase data:
-bool(true)
--- $key arguments are bool lowercase data:
-bool(false)
-bool(false)
--- $key arguments are bool uppercase data:
-bool(false)
-bool(false)
--- $key arguments are empty double quotes data:
-bool(true)
--- $key arguments are empty single quotes data:
-bool(true)
--- $key arguments are string data:
-bool(false)
-bool(false)
-bool(false)
--- $key arguments are undefined data:
-bool(true)
--- $key arguments are unset data:
-bool(true)
-Done
\ No newline at end of file
echo "Done\n";
?>
---EXPECTF--
-*** Testing array_keys() on basic array operation ***
-array(5) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- int(2)
- [3]=>
- int(-23)
- [4]=>
- int(3)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_keys() on basic array operation ***
array(5) {
[0]=>
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, 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
---UEXPECTF--
-*** 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
echo "Done\n";
?>
---EXPECTF--
-*** 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]=>
- string(5) "Hello"
-}
-
--- Iteration 4 --
-array(1) {
- [0]=>
- string(0) ""
-}
-
--- Iteration 5 --
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- string(1) "d"
-}
-
--- Iteration 6 --
-array(4) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- [3]=>
- string(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]=>
- string(1) "a"
- [3]=>
- int(3)
- [4]=>
- int(5)
-}
-
--- Iteration 9 --
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(0)
- [2]=>
- string(0) ""
- [3]=>
- int(2)
- [4]=>
- int(3)
-}
-
--- Iteration 10 --
-array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(2) "ab"
- [2]=>
- string(2) "cd"
-}
-
--- Iteration 11 --
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- string(0) ""
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_keys() on various arrays ***
-- Iteration 0 --
array(0) {
echo "Done\n";
?>
---EXPECTF--
-*** 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]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
-}
-array(0) {
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_keys() on range of values ***
array(4) {
[0]=>
echo "Done\n";
?>
---EXPECTF--
-*** Testing array_keys() on range of values ***
-array(6) {
- [0]=>
- int(2147483647)
- [1]=>
- int(2147483648)
- [2]=>
- int(-2147483647)
- [3]=>
- int(-2147483648)
- [4]=>
- int(-2147483649)
- [5]=>
- int(0)
-}
-
-*** Testing array_keys() on an array created on the fly ***
-array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
-}
-array(0) {
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_keys() on range of values ***
array(6) {
[0]=>
echo "Done\n";
?>
---EXPECTF--
-*** Testing array_keys() on all the types other than arrays ***
-bool(true)
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(-1)
- [2]=>
- string(3) "php"
-}
-bool(false)
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- string(0) ""
-}
-int(1)
-array(1) {
- [0]=>
- int(1)
-}
-int(0)
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(2)
- [2]=>
- string(3) "php"
- [3]=>
- string(0) ""
-}
-int(-1)
-array(1) {
- [0]=>
- int(-1)
-}
-string(1) "1"
-array(1) {
- [0]=>
- int(1)
-}
-string(1) "0"
-array(1) {
- [0]=>
- int(0)
-}
-string(2) "-1"
-array(1) {
- [0]=>
- int(-1)
-}
-NULL
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- [2]=>
- string(0) ""
-}
-array(0) {
-}
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-string(3) "php"
-array(1) {
- [0]=>
- string(3) "php"
-}
-string(0) ""
-array(2) {
- [0]=>
- int(2)
- [1]=>
- string(0) ""
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_keys() on all the types other than arrays ***
bool(true)
array(3) {
echo "Done\n";
?>
---EXPECTF--
-*** Testing array_keys() on all the types other than arrays ***
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(1) {
- [0]=>
- int(1)
-}
-array(1) {
- [0]=>
- int(0)
-}
-array(1) {
- [0]=>
- int(-1)
-}
-array(1) {
- [0]=>
- int(2)
-}
-array(1) {
- [0]=>
- int(3)
-}
-array(1) {
- [0]=>
- string(3) "php"
-}
-array(1) {
- [0]=>
- string(0) ""
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_keys() on all the types other than arrays ***
array(0) {
}
closedir( $resource2 );
?>
---EXPECTF--
+--EXPECT--
*** Testing array_keys() with resource type ***
array(1) {
[0]=>
echo "Done\n";
?>
---EXPECTF--
-Warning: array_map(): An error occurred while invoking the map callback in %s on line %d
-string(17) "exception caught!"
-Done
---UEXPECTF--
+--EXPECTF--
Warning: array_map(): An error occurred while invoking the map callback in %s on line %d
unicode(17) "exception caught!"
Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_map() : basic functionality ***
--- With two integer array --
-array(3) {
- [0]=>
- int(4)
- [1]=>
- int(10)
- [2]=>
- int(18)
-}
--- With single integer array --
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(4)
- [2]=>
- int(9)
-}
--- With string array --
-array(2) {
- [0]=>
- string(12) "one = single"
- [1]=>
- string(12) "two = double"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_map() : basic functionality ***
-- With two integer array --
array(3) {
[1]=>
unicode(12) "two = double"
}
-Done
\ No newline at end of file
+Done
-- Testing array_map() function with Zero arguments --
-Warning: array_map() expects at least 2 parameters, 0 given in %s on line %d%d
-NULL
-
--- Testing array_map() function with one less than expected no. of arguments --
-
-Warning: array_map() expects at least 2 parameters, 1 given in %s on line %d%d
-NULL
-
--- Testing array_map() function with less no. of arrays than callback function arguments --
-
-Warning: Missing argument 2 for callback2() in %s on line %d%d
-
-Notice: Undefined variable: q in %s on line %d%d
-
-Warning: Missing argument 2 for callback2() in %s on line %d%d
-
-Notice: Undefined variable: q in %s on line %d%d
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(0)
-}
-
--- Testing array_map() function with more no. of arrays than callback function arguments --
-array(2) {
- [0]=>
- int(3)
- [1]=>
- int(8)
-}
-Done
---UEXPECTF--
-*** Testing array_map() : error conditions ***
-
--- Testing array_map() function with Zero arguments --
-
Warning: array_map() expects at least 2 parameters, 0 given in %s on line %d
NULL
Warning: array_map() expects parameter 1 to be a valid callback, class 'SimpleClass' does not have a method 'non-existent' in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_map() : with non-existent class and method ***
--- with non-existent class --
-
-Warning: array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name in %s on line %d
-NULL
--- with existent class and non-existent method --
-
-Warning: array_map() expects parameter 1 to be a valid callback, class 'SimpleClass' does not have a method 'non-existent' in %s on line %d
-NULL
-Done
Warning: array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticchild' in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_map() : class methods as callback function ***
--- accessing parent method from child class --
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(7)
-}
--- accessing child method from parent class --
-
-Warning: array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticchild' in %s on line %d
-NULL
--- accessing parent method using child class object --
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(7)
-}
--- accessing child method using parent class object --
-
-Warning: array_map() expects parameter 1 to be a valid callback, class 'ParentClass' does not have a method 'staticchild' in %s on line %d
-NULL
-Done
?>
--EXPECT--
*** Testing array_map() : string keys ***
-array(1) {
- ["stringkey"]=>
- array(1) {
- [0]=>
- string(5) "value"
- }
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- string(5) "value"
- [1]=>
- string(5) "value"
- }
-}
-array(1) {
- ["stringkey"]=>
- string(5) "value"
-}
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- string(5) "value"
- [1]=>
- string(5) "value"
- }
-}
-Done
---UEXPECT--
-*** Testing array_map() : string keys ***
array(1) {
[u"stringkey"]=>
array(1) {
unicode(5) "value"
}
}
-Done
\ No newline at end of file
+Done
Warning: array_map(): Argument #2 should be an array in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_map() : anonymous callback function ***
--- anonymous function with all parameters and body --
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(3)
- }
- [1]=>
- array(2) {
- [0]=>
- int(2)
- [1]=>
- int(4)
- }
- [2]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- int(5)
- }
-}
--- anonymous function with two parameters and passing one array --
-
-Warning: Missing argument 2 for __lambda_func() in %s(20) : runtime-created function on line %d
-
-Notice: Undefined variable: b in %s(20) : runtime-created function on line %d
-
-Warning: Missing argument 2 for __lambda_func() in %s(20) : runtime-created function on line %d
-
-Notice: Undefined variable: b in %s(20) : runtime-created function on line %d
-
-Warning: Missing argument 2 for __lambda_func() in %s(20) : runtime-created function on line %d
-
-Notice: Undefined variable: b in %s(20) : runtime-created function on line %d
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- NULL
- }
- [1]=>
- array(2) {
- [0]=>
- int(2)
- [1]=>
- NULL
- }
- [2]=>
- array(2) {
- [0]=>
- int(3)
- [1]=>
- NULL
- }
-}
--- anonymous function with NULL parameter --
-array(3) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- NULL
-}
--- anonymous function with NULL body --
-array(3) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- NULL
-}
--- passing NULL as 'arr1' --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d
-NULL
-Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_map() : recursive callback function ***
-array(3) {
- [0]=>
- int(1)
- [1]=>
- array(3) {
- [0]=>
- int(4)
- [1]=>
- int(9)
- [2]=>
- array(1) {
- [0]=>
- int(25)
- }
- }
- [2]=>
- array(1) {
- [0]=>
- int(16)
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_map() : recursive callback function ***
array(3) {
[0]=>
Warning: array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_map() : built-in function ***
--- with built-in function 'pow' and two parameters --
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(16)
- [2]=>
- int(243)
-}
--- with built-in function 'pow' and one parameter --
-
-Warning: pow() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: pow() expects exactly 2 parameters, 1 given in %s on line %d
-
-Warning: pow() expects exactly 2 parameters, 1 given in %s on line %d
-array(3) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- NULL
-}
--- with language construct --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
-Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_map() : callback with diff return value ***
--- with integer return value --
-array(3) {
- [0]=>
- int(4)
- [1]=>
- int(6)
- [2]=>
- int(8)
-}
--- with string return value --
-array(3) {
- [0]=>
- string(2) "13"
- [1]=>
- string(2) "24"
- [2]=>
- string(2) "35"
-}
--- with bool return value --
-array(3) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- bool(true)
-}
--- with null return value --
-array(3) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- NULL
-}
--- with no return value --
-callback_without_ret called
-callback_without_ret called
-callback_without_ret called
-array(3) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- NULL
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_map() : callback with diff return value ***
-- with integer return value --
array(3) {
--EXPECTF--
*** Testing array_map() : null value for 'callback' argument ***
-- with null --
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- string(3) "one"
- [2]=>
- float(1.1)
- }
- [1]=>
- array(3) {
- [0]=>
- int(2)
- [1]=>
- string(3) "two"
- [2]=>
- float(2.2)
- }
-}
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- string(3) "one"
- [2]=>
- float(1.1)
- }
- [1]=>
- array(3) {
- [0]=>
- int(2)
- [1]=>
- string(3) "two"
- [2]=>
- float(2.2)
- }
-}
--- with unset variable --
-array(2) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- string(3) "one"
- [2]=>
- float(1.1)
- }
- [1]=>
- array(3) {
- [0]=>
- int(2)
- [1]=>
- string(3) "two"
- [2]=>
- float(2.2)
- }
-}
--- with undefined variable --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- with empty string --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- with empty array --
-
-Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_map() : null value for 'callback' argument ***
--- with null --
array(2) {
[0]=>
array(3) {
Warning: array_map() expects parameter 1 to be a valid callback, function 'non_existent' not found or invalid function name in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_map() : non existent 'callback' function ***
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'non_existent' not found or invalid function name in %s on line %d
-NULL
-Done
Warning: array_map() expects parameter 1 to be a valid callback, function 'print' not found or invalid function name in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_map() : non-permmited built-in functions ***
--- Iteration 1 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'array' not found or invalid function name in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'empty' not found or invalid function name in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'eval' not found or invalid function name in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'exit' not found or invalid function name in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'isset' not found or invalid function name in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'list' not found or invalid function name in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_map() expects parameter 1 to be a valid callback, function 'print' not found or invalid function name in %s on line %d
-NULL
-Done
Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_map() : unexpected values for 'callback' argument ***
-
--- Iteration 1 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 2 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 3 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 4 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 5 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 6 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 7 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 8 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 9 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 10 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 11 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 12 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 13 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 14 --
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
-
--- Iteration 15 --
-Warning: array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
-
--- Iteration 16 --
-Warning: array_map() expects parameter 1 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
--- Iteration 17 --
-Warning: array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
-
--- Iteration 18 --
-Warning: array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
-
--- Iteration 19 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-
--- Iteration 20 --
-Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on line %d
-NULL
-Done
*** Testing array_map() : unexpected values for 'arr1' ***
-- Iteration 1 --
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 2 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 3 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 4 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 5 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 6 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 7 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 8 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 9 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 10 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 11 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 12 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 13 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 14 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 15 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 16 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 17 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 18 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 19 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 20 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 21 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 22 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 23 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 24 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
--- Iteration 25 --
-
-Warning: array_map(): Argument #2 should be an array in %s on line %d%d
-NULL
-Done
---UEXPECTF--
-*** Testing array_map() : unexpected values for 'arr1' ***
--- Iteration 1 --
-
Warning: array_map(): Argument #2 should be an array in %s on line %d
NULL
-- Iteration 2 --
?>
--EXPECT--
*** Testing array_map() : references ***
-string(2) "v1"
-string(2) "v2"
-string(2) "v1"
-array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- *RECURSION*
- }
- }
-}
-array(4) {
- ["k1"]=>
- array(1) {
- [0]=>
- string(2) "v1"
- }
- ["k2"]=>
- array(1) {
- [0]=>
- string(2) "v2"
- }
- [0]=>
- array(1) {
- [0]=>
- string(2) "v1"
- }
- [1]=>
- array(1) {
- [0]=>
- array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- *RECURSION*
- }
- }
- }
- }
-}
-string(2) "v1"
-string(2) "v2"
-string(2) "v1"
-array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- *RECURSION*
- }
- }
-}
-array(4) {
- [0]=>
- array(1) {
- [0]=>
- &string(2) "v1"
- }
- [1]=>
- array(1) {
- [0]=>
- string(2) "v2"
- }
- [2]=>
- array(1) {
- [0]=>
- &string(2) "v1"
- }
- [3]=>
- array(1) {
- [0]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- *RECURSION*
- }
- }
- }
-}
-array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- *RECURSION*
- }
- }
-}
-array(4) {
- [0]=>
- array(2) {
- [0]=>
- &string(2) "v1"
- [1]=>
- &string(2) "v1"
- }
- [1]=>
- array(2) {
- [0]=>
- string(2) "v2"
- [1]=>
- string(2) "v2"
- }
- [2]=>
- array(2) {
- [0]=>
- &string(2) "v1"
- [1]=>
- &string(2) "v1"
- }
- [3]=>
- array(2) {
- [0]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- *RECURSION*
- }
- }
- [1]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- &array(4) {
- ["k1"]=>
- &string(2) "v1"
- ["k2"]=>
- string(2) "v2"
- [0]=>
- &string(2) "v1"
- [1]=>
- *RECURSION*
- }
- }
- }
-}
-Done
---UEXPECT--
-*** Testing array_map() : references ***
unicode(2) "v1"
unicode(2) "v2"
unicode(2) "v1"
echo "Done";
?>
---EXPECTF--
-*** Testing array_map() : different arrays for 'arr1' argument ***
--- Iteration 1 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 2 --
-array(2) {
- [0]=>
- float(1.1)
- [1]=>
- float(2.2)
-}
--- Iteration 3 --
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(2)
- }
- [1]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
--- Iteration 4 --
-array(2) {
- [0]=>
- bool(false)
- [1]=>
- bool(true)
-}
--- Iteration 5 --
-array(0) {
-}
--- Iteration 6 --
-array(1) {
- [0]=>
- NULL
-}
--- Iteration 7 --
-array(6) {
- [0]=>
- string(1) "a"
- [1]=>
- string(4) "aaaa"
- [2]=>
- string(1) "b"
- [3]=>
- string(4) "bbbb"
- [4]=>
- string(1) "c"
- [5]=>
- string(5) "ccccc"
-}
--- Iteration 8 --
-array(3) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- string(5) "three"
-}
--- Iteration 9 --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
--- Iteration 10 --
-array(4) {
- [1]=>
- int(10)
- [2]=>
- int(20)
- [4]=>
- int(40)
- [3]=>
- int(30)
-}
--- Iteration 11 --
-array(3) {
- ["one"]=>
- string(3) "ten"
- ["two"]=>
- string(6) "twenty"
- ["three"]=>
- string(6) "thirty"
-}
--- Iteration 12 --
-array(3) {
- ["one"]=>
- int(1)
- [2]=>
- string(3) "two"
- [4]=>
- string(4) "four"
-}
--- Iteration 13 --
-array(3) {
- [""]=>
- string(4) "null"
- ["NULL"]=>
- NULL
- ["null"]=>
- NULL
-}
--- Iteration 14 --
-array(4) {
- [1]=>
- string(4) "true"
- [0]=>
- string(5) "false"
- ["false"]=>
- bool(false)
- ["true"]=>
- bool(true)
-}
--- Iteration 15 --
-array(3) {
- [""]=>
- string(6) "emptys"
- ["emptyd"]=>
- string(0) ""
- ["emptys"]=>
- string(0) ""
-}
--- Iteration 16 --
-array(6) {
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- NULL
- [4]=>
- NULL
- [5]=>
- bool(false)
- [6]=>
- bool(true)
-}
--- Iteration 17 --
-array(3) {
- [""]=>
- int(4)
- [0]=>
- int(5)
- [1]=>
- int(6)
-}
--- Iteration 18 --
-array(3) {
- ["One"]=>
- int(10)
- ["two"]=>
- int(20)
- ["three"]=>
- int(3)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_map() : different arrays for 'arr1' argument ***
-- Iteration 1 --
array(2) {
[u"three"]=>
int(3)
}
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing array_map() : associative array with diff. keys for 'arr1' argument ***
-Warning: Illegal offset type in %s on line %d%d
-
-Warning: Illegal offset type in %s on line %d%d
-
-Warning: Illegal offset type in %s on line %d%d
-
-Warning: Illegal offset type in %s on line %d%d
--- Iteration 1 --
-array(0) {
-}
--- Iteration 2 --
-array(1) {
- [0]=>
- string(1) "0"
-}
--- Iteration 3 --
-array(1) {
- [1]=>
- string(1) "1"
-}
--- Iteration 4 --
-array(4) {
- [1]=>
- string(1) "1"
- [2]=>
- string(1) "2"
- [3]=>
- string(1) "3"
- [4]=>
- string(1) "4"
-}
--- Iteration 5 --
-array(1) {
- [2]=>
- string(5) "float"
-}
--- Iteration 6 --
-array(4) {
- [1]=>
- string(2) "f1"
- [3]=>
- string(2) "f2"
- [4]=>
- string(2) "f3"
- [33333333]=>
- string(2) "f4"
-}
--- Iteration 7 --
-array(4) {
- ["\tHello"]=>
- int(111)
- ["re\td"]=>
- string(5) "color"
- ["\v\fworld"]=>
- float(2.2)
- ["pen\n"]=>
- int(33)
-}
--- Iteration 8 --
-array(4) {
- [" Hello"]=>
- int(111)
- ["re d"]=>
- string(5) "color"
- ["\v\fworld"]=>
- float(2.2)
- ["pen
-"]=>
- int(33)
-}
--- Iteration 9 --
-array(2) {
- [0]=>
- string(5) "hello"
- ["Hello world"]=>
- string(6) "string"
-}
--- Iteration 10 --
-array(1) {
- [""]=>
- string(5) "hello"
-}
--- Iteration 11 --
-array(6) {
- ["hello"]=>
- int(1)
- ["fruit"]=>
- float(2.2)
- [133]=>
- string(3) "int"
- [444]=>
- string(5) "float"
- [""]=>
- string(5) "unset"
- ["Hello world"]=>
- string(7) "heredoc"
-}
-Done
---UEXPECTF--
-*** Testing array_map() : associative array with diff. keys for 'arr1' argument ***
-
Warning: Illegal offset type in %s on line %d
Warning: Illegal offset type in %s on line %d
int(1)
}
-- Iteration 4 --
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- [4]=>
- int(4)
-}
--- Iteration 5 --
-array(1) {
- ["float"]=>
- float(2.3333)
-}
--- Iteration 6 --
-array(4) {
- ["f1"]=>
- float(1.2)
- ["f2"]=>
- float(3.33)
- [3]=>
- float(4.8999992284)
- ["f4"]=>
- float(33333333.3333)
-}
--- Iteration 7 --
-array(4) {
- [111]=>
- string(6) " Hello"
- ["red"]=>
- string(6) "col or"
- [2]=>
- string(7) "\v\fworld"
- [3]=>
- string(4) "pen
-"
-}
--- Iteration 8 --
-array(4) {
- [111]=>
- string(7) "\tHello"
- ["red"]=>
- string(7) "col\tor"
- [2]=>
- string(9) "\v\fworld"
- [3]=>
- string(5) "pen\n"
-}
--- Iteration 9 --
-array(2) {
- [1]=>
- string(5) "hello"
- ["heredoc"]=>
- string(11) "Hello world"
-}
--- Iteration 10 --
-array(3) {
- [11]=>
- object(classA)#%d (0) {
- }
- ["unset"]=>
- NULL
- ["resource"]=>
- resource(%d) of type (stream)
-}
--- Iteration 11 --
-array(8) {
- [1]=>
- string(5) "hello"
- [2]=>
- object(classA)#%d (0) {
- }
- [222]=>
- string(5) "fruit"
- ["resource"]=>
- resource(%d) of type (stream)
- ["int"]=>
- int(133)
- ["float"]=>
- float(444.432)
- ["unset"]=>
- NULL
- ["heredoc"]=>
- string(11) "Hello world"
-}
-Done
---UEXPECTF--
-*** Testing array_map() : associative array with diff. values for 'arr1' argument ***
--- Iteration 1 --
-array(0) {
-}
--- Iteration 2 --
-array(1) {
- [0]=>
- int(0)
-}
--- Iteration 3 --
-array(1) {
- [1]=>
- int(1)
-}
--- Iteration 4 --
array(4) {
[u"one"]=>
int(1)
var_dump( array_map('callback', $arr1));
echo "Done";
?>
---EXPECTF--
-*** Testing array_map() : array having subarrays ***
-array(5) {
- [0]=>
- array(0) {
- }
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [2]=>
- array(2) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- }
- [3]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(1) "a"
- [3]=>
- string(1) "b"
- }
- [4]=>
- array(2) {
- [1]=>
- string(1) "a"
- ["b"]=>
- int(2)
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_map() : array having subarrays ***
array(5) {
[0]=>
int(2)
}
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_map() : arrays with diff. size ***
-array(3) {
- [0]=>
- array(1) {
- [1]=>
- NULL
- }
- [1]=>
- array(1) {
- [2]=>
- NULL
- }
- [2]=>
- array(1) {
- [3]=>
- NULL
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [""]=>
- string(1) "a"
- }
- [1]=>
- array(1) {
- [""]=>
- string(1) "b"
- }
- [2]=>
- array(1) {
- [""]=>
- string(1) "c"
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [1]=>
- string(1) "a"
- }
- [1]=>
- array(1) {
- [2]=>
- string(1) "b"
- }
- [2]=>
- array(1) {
- [3]=>
- NULL
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [10]=>
- float(2.3)
- }
- [1]=>
- array(1) {
- [47]=>
- float(1240)
- }
- [2]=>
- array(1) {
- [26]=>
- NULL
- }
-}
-array(3) {
- [0]=>
- array(1) {
- [""]=>
- int(1)
- }
- [1]=>
- array(1) {
- [""]=>
- int(2)
- }
- [2]=>
- array(1) {
- [""]=>
- int(3)
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_map() : arrays with diff. size ***
array(3) {
[0]=>
int(3)
}
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_map() : array with references for 'arr1' argument ***
--- with one array --
-array(6) {
- [0]=>
- int(0)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "hello"
- [3]=>
- string(5) "hello"
- [4]=>
- int(0)
- ["hello"]=>
- string(5) "hello"
-}
--- with two arrays --
-array(6) {
- [0]=>
- string(2) "00"
- [1]=>
- string(10) "hellohello"
- [2]=>
- string(10) "hellohello"
- [3]=>
- string(10) "hellohello"
- [4]=>
- string(2) "00"
- [5]=>
- string(10) "hellohello"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_map() : array with references for 'arr1' argument ***
-- with one array --
array(6) {
[5]=>
unicode(10) "hellohello"
}
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing array_map() : array with binary data for 'arr1' argument ***
-- checking binary safe array with one parameter callback function --
-array(4) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- [2]=>
- string(1) "1"
- [3]=>
- string(5) "22.22"
-}
--- checking binary safe array with two parameter callback function --
-
-Warning: Missing argument 2 for callback2() in %s on line %d%d
-
-Notice: Undefined variable: b in %s on line %d%d
-
-Warning: Missing argument 2 for callback2() in %s on line %d%d
-
-Notice: Undefined variable: b in %s on line %d%d
-
-Warning: Missing argument 2 for callback2() in %s on line %d%d
-
-Notice: Undefined variable: b in %s on line %d%d
-
-Warning: Missing argument 2 for callback2() in %s on line %d%d
-
-Notice: Undefined variable: b in %s on line %d%d
-array(4) {
- [0]=>
- array(1) {
- ["hello"]=>
- NULL
- }
- [1]=>
- array(1) {
- ["world"]=>
- NULL
- }
- [2]=>
- array(1) {
- [1]=>
- NULL
- }
- [3]=>
- array(1) {
- ["22.22"]=>
- NULL
- }
-}
-Done
---UEXPECTF--
-*** Testing array_map() : array with binary data for 'arr1' argument ***
--- checking binary safe array with one parameter callback function --
array(4) {
[0]=>
string(5) "hello"
)
-*** Testing array_merge() with three or more arrays ***
-array(12) {
- [0]=>
- int(1)
- [1]=>
- string(6) "string"
- [2]=>
- NULL
- [3]=>
- float(-2.344)
- ["a"]=>
- int(1)
- ["b"]=>
- string(6) "string"
- ["c"]=>
- NULL
- ["d"]=>
- float(-2.344)
- [4]=>
- NULL
- [5]=>
- string(2) "Hi"
- ["string"]=>
- string(5) "hello"
- [6]=>
- array(3) {
- [""]=>
- string(5) "World"
- ["-2.34"]=>
- string(1) "a"
- [0]=>
- string(1) "b"
- }
-}
-array(6) {
- [0]=>
- int(1)
- [1]=>
- string(6) "string"
- [2]=>
- NULL
- [3]=>
- float(-2.344)
- [4]=>
- string(12) "array on fly"
- ["nullarray"]=>
- array(0) {
- }
-}
-
-*** Testing single array argument ***
-array(0) {
-}
-array(4) {
- ["a"]=>
- int(1)
- ["b"]=>
- string(6) "string"
- ["c"]=>
- NULL
- ["d"]=>
- float(-2.344)
-}
-array(4) {
- [0]=>
- int(1)
- [1]=>
- string(6) "string"
- [2]=>
- NULL
- [3]=>
- float(-2.344)
-}
-array(4) {
- [0]=>
- NULL
- [1]=>
- string(2) "Hi"
- ["string"]=>
- string(5) "hello"
- [2]=>
- array(3) {
- [""]=>
- string(5) "World"
- ["-2.34"]=>
- string(1) "a"
- [0]=>
- string(1) "b"
- }
-}
-
-*** Testing array_merge() with typecasting non-array to array ***
-array(7) {
- ["a"]=>
- int(1)
- ["b"]=>
- string(6) "string"
- ["c"]=>
- NULL
- ["d"]=>
- float(-2.344)
- [0]=>
- string(5) "type1"
- [1]=>
- int(10)
- [2]=>
- float(12.34)
-}
-
-*** Testing error conditions ***
-Warning: Wrong parameter count for array_merge() in %s on line %d
-NULL
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
-Warning: array_merge(): Argument #3 is not an array in %s on line %d
-NULL
-
-Notice: Undefined variable: arr4 in %s on line %d
-
-Warning: array_merge(): Argument #3 is not an array in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_merge() basic functionality ***
-
---- Iteration 0 ---
--- Inner iteration 0 of Iteration 0 --
-Array
-(
-)
-
--- Inner iteration 1 of Iteration 0 --
-Array
-(
- [0] => string
-)
-
--- Inner iteration 2 of Iteration 0 --
-Array
-(
- [] => string
-)
-
--- Inner iteration 3 of Iteration 0 --
-Array
-(
- [0] => 12
-)
-
--- Inner iteration 4 of Iteration 0 --
-Array
-(
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
-)
-
--- Inner iteration 5 of Iteration 0 --
-Array
-(
- [0] => 1
- [1] => string
- [2] =>
- [3] => -2.344
-)
-
--- Inner iteration 6 of Iteration 0 --
-Array
-(
- [0] =>
- [1] => Hi
- [string] => hello
- [2] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
-)
-
-
---- Iteration 1 ---
--- Inner iteration 0 of Iteration 1 --
-Array
-(
- [0] => string
-)
-
--- Inner iteration 1 of Iteration 1 --
-Array
-(
- [0] => string
- [1] => string
-)
-
--- Inner iteration 2 of Iteration 1 --
-Array
-(
- [0] => string
- [] => string
-)
-
--- Inner iteration 3 of Iteration 1 --
-Array
-(
- [0] => string
- [1] => 12
-)
-
--- Inner iteration 4 of Iteration 1 --
-Array
-(
- [0] => string
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
-)
-
--- Inner iteration 5 of Iteration 1 --
-Array
-(
- [0] => string
- [1] => 1
- [2] => string
- [3] =>
- [4] => -2.344
-)
-
--- Inner iteration 6 of Iteration 1 --
-Array
-(
- [0] => string
- [1] =>
- [2] => Hi
- [string] => hello
- [3] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
-)
-
-
---- Iteration 2 ---
--- Inner iteration 0 of Iteration 2 --
-Array
-(
- [] => string
-)
-
--- Inner iteration 1 of Iteration 2 --
-Array
-(
- [] => string
- [0] => string
-)
-
--- Inner iteration 2 of Iteration 2 --
-Array
-(
- [] => string
-)
-
--- Inner iteration 3 of Iteration 2 --
-Array
-(
- [] => string
- [0] => 12
-)
-
--- Inner iteration 4 of Iteration 2 --
-Array
-(
- [] => string
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
-)
-
--- Inner iteration 5 of Iteration 2 --
-Array
-(
- [] => string
- [0] => 1
- [1] => string
- [2] =>
- [3] => -2.344
-)
-
--- Inner iteration 6 of Iteration 2 --
-Array
-(
- [] => string
- [0] =>
- [1] => Hi
- [string] => hello
- [2] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
-)
-
-
---- Iteration 3 ---
--- Inner iteration 0 of Iteration 3 --
-Array
-(
- [0] => 12
-)
-
--- Inner iteration 1 of Iteration 3 --
-Array
-(
- [0] => 12
- [1] => string
-)
-
--- Inner iteration 2 of Iteration 3 --
-Array
-(
- [0] => 12
- [] => string
-)
-
--- Inner iteration 3 of Iteration 3 --
-Array
-(
- [0] => 12
- [1] => 12
-)
-
--- Inner iteration 4 of Iteration 3 --
-Array
-(
- [0] => 12
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
-)
-
--- Inner iteration 5 of Iteration 3 --
-Array
-(
- [0] => 12
- [1] => 1
- [2] => string
- [3] =>
- [4] => -2.344
-)
-
--- Inner iteration 6 of Iteration 3 --
-Array
-(
- [0] => 12
- [1] =>
- [2] => Hi
- [string] => hello
- [3] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
-)
-
-
---- Iteration 4 ---
--- Inner iteration 0 of Iteration 4 --
-Array
-(
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
-)
-
--- Inner iteration 1 of Iteration 4 --
-Array
-(
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
- [0] => string
-)
-
--- Inner iteration 2 of Iteration 4 --
-Array
-(
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
- [] => string
-)
-
--- Inner iteration 3 of Iteration 4 --
-Array
-(
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
- [0] => 12
-)
-
--- Inner iteration 4 of Iteration 4 --
-Array
-(
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
-)
-
--- Inner iteration 5 of Iteration 4 --
-Array
-(
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
- [0] => 1
- [1] => string
- [2] =>
- [3] => -2.344
-)
-
--- Inner iteration 6 of Iteration 4 --
-Array
-(
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
- [0] =>
- [1] => Hi
- [string] => hello
- [2] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
-)
-
-
---- Iteration 5 ---
--- Inner iteration 0 of Iteration 5 --
-Array
-(
- [0] => 1
- [1] => string
- [2] =>
- [3] => -2.344
-)
-
--- Inner iteration 1 of Iteration 5 --
-Array
-(
- [0] => 1
- [1] => string
- [2] =>
- [3] => -2.344
- [4] => string
-)
-
--- Inner iteration 2 of Iteration 5 --
-Array
-(
- [0] => 1
- [1] => string
- [2] =>
- [3] => -2.344
- [] => string
-)
-
--- Inner iteration 3 of Iteration 5 --
-Array
-(
- [0] => 1
- [1] => string
- [2] =>
- [3] => -2.344
- [4] => 12
-)
-
--- Inner iteration 4 of Iteration 5 --
-Array
-(
- [0] => 1
- [1] => string
- [2] =>
- [3] => -2.344
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
-)
-
--- Inner iteration 5 of Iteration 5 --
-Array
-(
- [0] => 1
- [1] => string
- [2] =>
- [3] => -2.344
- [4] => 1
- [5] => string
- [6] =>
- [7] => -2.344
-)
-
--- Inner iteration 6 of Iteration 5 --
-Array
-(
- [0] => 1
- [1] => string
- [2] =>
- [3] => -2.344
- [4] =>
- [5] => Hi
- [string] => hello
- [6] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
-)
-
-
---- Iteration 6 ---
--- Inner iteration 0 of Iteration 6 --
-Array
-(
- [0] =>
- [1] => Hi
- [string] => hello
- [2] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
-)
-
--- Inner iteration 1 of Iteration 6 --
-Array
-(
- [0] =>
- [1] => Hi
- [string] => hello
- [2] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
- [3] => string
-)
-
--- Inner iteration 2 of Iteration 6 --
-Array
-(
- [0] =>
- [1] => Hi
- [string] => hello
- [2] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
- [] => string
-)
-
--- Inner iteration 3 of Iteration 6 --
-Array
-(
- [0] =>
- [1] => Hi
- [string] => hello
- [2] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
- [3] => 12
-)
-
--- Inner iteration 4 of Iteration 6 --
-Array
-(
- [0] =>
- [1] => Hi
- [string] => hello
- [2] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
- [a] => 1
- [b] => string
- [c] =>
- [d] => -2.344
-)
-
--- Inner iteration 5 of Iteration 6 --
-Array
-(
- [0] =>
- [1] => Hi
- [string] => hello
- [2] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
- [3] => 1
- [4] => string
- [5] =>
- [6] => -2.344
-)
-
--- Inner iteration 6 of Iteration 6 --
-Array
-(
- [0] =>
- [1] => Hi
- [string] => hello
- [2] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
- [3] =>
- [4] => Hi
- [5] => Array
- (
- [] => World
- [-2.34] => a
- [0] => b
- )
-
-)
-
*** Testing array_merge() with three or more arrays ***
array(12) {
[0]=>
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge() : basic functionality ***
-array(6) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
-}
-array(6) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_merge() : basic functionality ***
array(6) {
[0]=>
[2]=>
unicode(3) "two"
}
-Done
\ No newline at end of file
+Done
Warning: Wrong parameter count for array_merge() in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_merge() : error conditions ***
-
--- Testing array_merge() function with less than expected no. of arguments --
-
-Warning: Wrong parameter count for array_merge() in %s on line %d
-NULL
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge_recursive() : array with default keys ***
--- With default argument --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
--- With more arguments --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [2]=>
- int(3)
- [3]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
-}
-array(6) {
- [0]=>
- int(1)
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [2]=>
- int(3)
- [3]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
- [4]=>
- array(2) {
- [0]=>
- int(6)
- [1]=>
- int(7)
- }
- [5]=>
- array(2) {
- [0]=>
- string(4) "str1"
- [1]=>
- string(4) "str2"
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_merge_recursive() : array with default keys ***
-- With default argument --
array(2) {
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge_recursive() : associative arrays ***
--- With default argument --
-array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
--- With more arguments --
-array(4) {
- [0]=>
- string(3) "one"
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [2]=>
- string(5) "three"
- ["four"]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
-}
-array(5) {
- [0]=>
- string(3) "one"
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [2]=>
- string(5) "three"
- ["four"]=>
- array(4) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- [2]=>
- string(4) "str1"
- [3]=>
- string(4) "str2"
- }
- [3]=>
- array(2) {
- [0]=>
- int(6)
- [1]=>
- int(7)
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_merge_recursive() : associative arrays ***
-- With default argument --
Warning: Wrong parameter count for array_merge_recursive() in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_merge_recursive() : error conditions ***
-
--- Testing array_merge_recursive() function with Zero arguments --
-
-Warning: Wrong parameter count for array_merge_recursive() in %s on line %d
-NULL
-Done
-
echo "Done";
?>
--EXPECTF--
-*** Testing array_merge_recursive() : Passing non array values to $arr1 argument ***
-
--- Iteration 1 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 2 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 3 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 4 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 5 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 6 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 7 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 8 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 9 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 10 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 11 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 12 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 13 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 14 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 15 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 16 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 17 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 18 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 19 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 20 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 21 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 22 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 23 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 24 --
--- With default argument --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
--- With more arguments --
-Warning: array_merge_recursive(): Argument #1 is not an array in %s on line %d
-NULL
-Done
---UEXPECTF--
*** Testing array_merge_recursive() : Passing non array values to $arr1 argument ***
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge_recursive() : two dimensional array for $arr1 argument ***
--- Passing the entire 2-d array --
--- With default argument --
-array(4) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(1)
- }
- ["array"]=>
- array(4) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- ["str1"]=>
- string(5) "hello"
- ["str2"]=>
- string(5) "world"
- }
- [1]=>
- array(4) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- string(3) "one"
- [4]=>
- string(3) "two"
- }
- [2]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(1)
- }
-}
--- With more arguments --
-array(6) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(1)
- }
- ["array"]=>
- array(6) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- ["str1"]=>
- string(5) "hello"
- ["str2"]=>
- string(5) "world"
- [2]=>
- string(5) "hello"
- [3]=>
- string(5) "world"
- }
- [1]=>
- array(4) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- string(3) "one"
- [4]=>
- string(3) "two"
- }
- [2]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(1)
- }
- [3]=>
- int(1)
- [4]=>
- string(5) "hello"
-}
--- Passing the sub-array --
--- With default argument --
-array(4) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- ["str1"]=>
- string(5) "hello"
- ["str2"]=>
- string(5) "world"
-}
--- With more arguments --
-array(6) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- ["str1"]=>
- string(5) "hello"
- ["str2"]=>
- string(5) "world"
- [2]=>
- string(5) "hello"
- [3]=>
- string(5) "world"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_merge_recursive() : two dimensional array for $arr1 argument ***
-- Passing the entire 2-d array --
Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_merge_recursive() : Passing non array values to $arr2 argument ***
-
--- Iteration 1 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 2 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 3 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 4 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 5 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 6 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 7 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 8 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 9 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 10 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 11 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 12 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 13 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 14 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 15 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 16 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 17 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 18 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 19 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 20 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 21 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 22 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 23 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 24 --
-Warning: array_merge_recursive(): Argument #2 is not an array in %s on line %d
-NULL
-Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge_recursive() : Passing different arrays to $arr1 argument ***
--- Iteration 1 --
--- With default argument --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- With more arguments --
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 2 --
--- With default argument --
-array(2) {
- [0]=>
- float(1.1)
- [1]=>
- float(2.2)
-}
--- With more arguments --
-array(6) {
- [0]=>
- float(1.1)
- [1]=>
- float(2.2)
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 3 --
--- With default argument --
-array(2) {
- [0]=>
- bool(false)
- [1]=>
- bool(true)
-}
--- With more arguments --
-array(6) {
- [0]=>
- bool(false)
- [1]=>
- bool(true)
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 4 --
--- With default argument --
-array(0) {
-}
--- With more arguments --
-array(4) {
- [0]=>
- string(3) "one"
- [1]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 5 --
--- With default argument --
-array(1) {
- [0]=>
- NULL
-}
--- With more arguments --
-array(5) {
- [0]=>
- NULL
- [1]=>
- string(3) "one"
- [2]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 6 --
--- With default argument --
-array(4) {
- [0]=>
- string(3) "a\v\f"
- [1]=>
- string(5) "aaaa
-"
- [2]=>
- string(1) "b"
- [3]=>
- string(27) "\[\]\!\@\#$\%\^\&\*\(\)\{\}"
-}
--- With more arguments --
-array(8) {
- [0]=>
- string(3) "a\v\f"
- [1]=>
- string(5) "aaaa
-"
- [2]=>
- string(1) "b"
- [3]=>
- string(27) "\[\]\!\@\#$\%\^\&\*\(\)\{\}"
- [4]=>
- string(3) "one"
- [5]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 7 --
--- With default argument --
-array(4) {
- [0]=>
- string(5) "a\v\f"
- [1]=>
- string(6) "aaaa\r"
- [2]=>
- string(1) "b"
- [3]=>
- string(28) "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"
-}
--- With more arguments --
-array(8) {
- [0]=>
- string(5) "a\v\f"
- [1]=>
- string(6) "aaaa\r"
- [2]=>
- string(1) "b"
- [3]=>
- string(28) "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"
- [4]=>
- string(3) "one"
- [5]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 8 --
--- With default argument --
-array(3) {
- ["h1"]=>
- string(1) "
-"
- ["h2"]=>
- string(88) "hello world
-The quick brown fox jumped over;
-the lazy dog
-This is a double quoted string"
- ["h3"]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
-}
--- With more arguments --
-array(7) {
- ["h1"]=>
- string(1) "
-"
- ["h2"]=>
- string(88) "hello world
-The quick brown fox jumped over;
-the lazy dog
-This is a double quoted string"
- ["h3"]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
- [0]=>
- string(3) "one"
- [1]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 9 --
--- With default argument --
-array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
-}
--- With more arguments --
-array(6) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 10 --
--- With default argument --
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [0]=>
- int(1)
-}
--- With more arguments --
-array(7) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [0]=>
- int(1)
- [1]=>
- string(3) "one"
- [2]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 11 --
--- With default argument --
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(40)
-}
--- With more arguments --
-array(7) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(40)
- [3]=>
- string(3) "one"
- [4]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 12 --
--- With default argument --
-array(2) {
- ["one"]=>
- string(3) "ten"
- ["two"]=>
- string(6) "twenty"
-}
--- With more arguments --
-array(6) {
- ["one"]=>
- string(3) "ten"
- ["two"]=>
- string(6) "twenty"
- [0]=>
- string(3) "one"
- [1]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 13 --
--- With default argument --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- string(3) "two"
- [1]=>
- string(4) "four"
-}
--- With more arguments --
-array(7) {
- ["one"]=>
- int(1)
- [0]=>
- string(3) "two"
- [1]=>
- string(4) "four"
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 14 --
--- With default argument --
-array(3) {
- [""]=>
- string(4) "null"
- ["NULL"]=>
- NULL
- ["null"]=>
- NULL
-}
--- With more arguments --
-array(7) {
- [""]=>
- string(4) "null"
- ["NULL"]=>
- NULL
- ["null"]=>
- NULL
- [0]=>
- string(3) "one"
- [1]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 15 --
--- With default argument --
-array(4) {
- [0]=>
- string(4) "true"
- [1]=>
- string(5) "false"
- ["false"]=>
- bool(false)
- ["true"]=>
- bool(true)
-}
--- With more arguments --
-array(8) {
- [0]=>
- string(4) "true"
- [1]=>
- string(5) "false"
- ["false"]=>
- bool(false)
- ["true"]=>
- bool(true)
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 16 --
--- With default argument --
-array(3) {
- [""]=>
- string(6) "emptys"
- ["emptyd"]=>
- string(0) ""
- ["emptys"]=>
- string(0) ""
-}
--- With more arguments --
-array(7) {
- [""]=>
- string(6) "emptys"
- ["emptyd"]=>
- string(0) ""
- ["emptys"]=>
- string(0) ""
- [0]=>
- string(3) "one"
- [1]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 17 --
--- With default argument --
-array(6) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
- [2]=>
- NULL
- [3]=>
- NULL
- [4]=>
- bool(false)
- [5]=>
- bool(true)
-}
--- With more arguments --
-array(10) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
- [2]=>
- NULL
- [3]=>
- NULL
- [4]=>
- bool(false)
- [5]=>
- bool(true)
- [6]=>
- string(3) "one"
- [7]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 18 --
--- With default argument --
-array(3) {
- [""]=>
- int(4)
- [0]=>
- int(5)
- [1]=>
- int(6)
-}
--- With more arguments --
-array(7) {
- [""]=>
- int(4)
- [0]=>
- int(5)
- [1]=>
- int(6)
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 19 --
--- With default argument --
-array(3) {
- [0]=>
- string(4) "str1"
- ["array"]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
--- With more arguments --
-array(6) {
- [0]=>
- string(4) "str1"
- ["array"]=>
- array(5) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- [2]=>
- string(1) "a"
- [3]=>
- string(1) "b"
- [4]=>
- string(1) "c"
- }
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_merge_recursive() : Passing different arrays to $arr1 argument ***
-- Iteration 1 --
Warning: Illegal offset type in %s on line %d
-Warning: Illegal offset type in %s on line %d
--- Iteration 1 --
--- With default argument --
-array(2) {
- [0]=>
- string(1) "0"
- [1]=>
- array(1) {
- [1]=>
- string(3) "one"
- }
-}
--- With more arguments --
-array(6) {
- [0]=>
- string(1) "0"
- [1]=>
- array(1) {
- [1]=>
- string(3) "one"
- }
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 2 --
--- With default argument --
-array(2) {
- [0]=>
- string(1) "1"
- [1]=>
- array(4) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- int(1)
- [4]=>
- string(1) "4"
- }
-}
--- With more arguments --
-array(6) {
- [0]=>
- string(1) "1"
- [1]=>
- array(4) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- int(1)
- [4]=>
- string(1) "4"
- }
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 3 --
--- With default argument --
-array(2) {
- [0]=>
- string(5) "float"
- [1]=>
- array(1) {
- [1]=>
- string(5) "float"
- }
-}
--- With more arguments --
-array(6) {
- [0]=>
- string(5) "float"
- [1]=>
- array(1) {
- [1]=>
- string(5) "float"
- }
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 4 --
--- With default argument --
-array(4) {
- [0]=>
- string(2) "f1"
- [1]=>
- string(2) "f2"
- [2]=>
- array(1) {
- [1]=>
- string(2) "f1"
- }
- [3]=>
- string(2) "f4"
-}
--- With more arguments --
-array(8) {
- [0]=>
- string(2) "f1"
- [1]=>
- string(2) "f2"
- [2]=>
- array(1) {
- [1]=>
- string(2) "f1"
- }
- [3]=>
- string(2) "f4"
- [4]=>
- string(3) "one"
- [5]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 5 --
--- With default argument --
-array(3) {
- ["\tHello"]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
- ["\v\fworld"]=>
- float(2.2)
- ["pen\n"]=>
- int(111)
-}
--- With more arguments --
-array(7) {
- ["\tHello"]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
- ["\v\fworld"]=>
- float(2.2)
- ["pen\n"]=>
- int(111)
- [0]=>
- string(3) "one"
- [1]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 6 --
--- With default argument --
-array(3) {
- [" Hello"]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
- ["\v\fworld"]=>
- float(2.2)
- ["pen
-"]=>
- int(111)
-}
--- With more arguments --
-array(7) {
- [" Hello"]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
- ["\v\fworld"]=>
- float(2.2)
- ["pen
-"]=>
- int(111)
- [0]=>
- string(3) "one"
- [1]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 7 --
--- With default argument --
-array(3) {
- [0]=>
- string(5) "hello"
- ["Hello world"]=>
- array(2) {
- [0]=>
- string(7) "heredoc"
- [1]=>
- string(6) "string"
- }
- [1]=>
- string(6) "string"
-}
--- With more arguments --
-array(7) {
- [0]=>
- string(5) "hello"
- ["Hello world"]=>
- array(2) {
- [0]=>
- string(7) "heredoc"
- [1]=>
- string(6) "string"
- }
- [1]=>
- string(6) "string"
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 8 --
--- With default argument --
-array(3) {
- [""]=>
- array(1) {
- [0]=>
- string(5) "unset"
- }
- [0]=>
- int(11)
- [1]=>
- string(5) "hello"
-}
--- With more arguments --
-array(7) {
- [""]=>
- array(1) {
- [0]=>
- string(5) "unset"
- }
- [0]=>
- int(11)
- [1]=>
- string(5) "hello"
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
-Done
---UEXPECTF--
-
-*** Testing array_merge_recursive() : assoc. array with diff. keys to $arr1 argument ***
-
-Warning: Illegal offset type in %s on line %d
-
Warning: Illegal offset type in %s on line %d
-- Iteration 1 --
-- With default argument --
echo "Done";
?>
--EXPECTF--
-*** Testing array_merge_recursive() : assoc. array with diff. values to $arr1 argument ***
--- Iteration 1 --
--- With default argument --
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(0)
-}
--- With more arguments --
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(0)
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 2 --
--- With default argument --
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(1)
- [0]=>
- int(1)
-}
--- With more arguments --
-array(8) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(1)
- [0]=>
- int(1)
- [1]=>
- string(3) "one"
- [2]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 3 --
--- With default argument --
-array(3) {
- ["f1"]=>
- float(2.3333)
- ["f2"]=>
- float(2.3333)
- ["f3"]=>
- array(2) {
- [0]=>
- float(1.1)
- [1]=>
- float(2.22)
- }
-}
--- With more arguments --
-array(7) {
- ["f1"]=>
- float(2.3333)
- ["f2"]=>
- float(2.3333)
- ["f3"]=>
- array(2) {
- [0]=>
- float(1.1)
- [1]=>
- float(2.22)
- }
- [0]=>
- string(3) "one"
- [1]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 4 --
--- With default argument --
-array(4) {
- ["f1"]=>
- float(1.2)
- ["f2"]=>
- float(3.33)
- [0]=>
- float(4.8999992284)
- ["f4"]=>
- array(2) {
- [0]=>
- float(1.2)
- ["f4"]=>
- float(1.2)
- }
-}
--- With more arguments --
-array(8) {
- ["f1"]=>
- float(1.2)
- ["f2"]=>
- float(3.33)
- [0]=>
- float(4.8999992284)
- ["f4"]=>
- array(2) {
- [0]=>
- float(1.2)
- ["f4"]=>
- float(1.2)
- }
- [1]=>
- string(3) "one"
- [2]=>
- int(2)
- ["string"]=>
- string(5) "hello"
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 5 --
--- With default argument --
-array(4) {
- [0]=>
- string(6) " Hello"
- ["array"]=>
- string(6) "col or"
- [1]=>
- string(7) "\v\fworld"
- [2]=>
- string(6) " Hello"
-}
--- With more arguments --
-array(7) {
- [0]=>
- string(6) " Hello"
- ["array"]=>
- array(4) {
- [0]=>
- string(6) "col or"
- [1]=>
- string(1) "a"
- [2]=>
- string(1) "b"
- [3]=>
- string(1) "c"
- }
- [1]=>
- string(7) "\v\fworld"
- [2]=>
- string(6) " Hello"
- [3]=>
- string(3) "one"
- [4]=>
- int(2)
- ["string"]=>
- string(5) "hello"
-}
--- Iteration 6 --
--- With default argument --
-array(4) {
- [0]=>
- string(7) "\tHello"
- ["array"]=>
- string(7) "col\tor"
- [1]=>
- string(9) "\v\fworld"
- [2]=>
- string(7) "\tHello"
-}
--- With more arguments --
-array(7) {
- [0]=>
- string(7) "\tHello"
- ["array"]=>
- array(4) {
- [0]=>
- string(7) "col\tor"
- [1]=>
- string(1) "a"
- [2]=>
- string(1) "b"
- [3]=>
- string(1) "c"
- }
- [1]=>
- string(9) "\v\fworld"
- [2]=>
- string(7) "\tHello"
- [3]=>
- string(3) "one"
- [4]=>
- int(2)
- ["string"]=>
- string(5) "hello"
-}
--- Iteration 7 --
--- With default argument --
-array(3) {
- [0]=>
- string(5) "hello"
- ["string"]=>
- string(11) "Hello world"
- [1]=>
- string(11) "Hello world"
-}
--- With more arguments --
-array(6) {
- [0]=>
- string(5) "hello"
- ["string"]=>
- array(2) {
- [0]=>
- string(11) "Hello world"
- [1]=>
- string(5) "hello"
- }
- [1]=>
- string(11) "Hello world"
- [2]=>
- string(3) "one"
- [3]=>
- int(2)
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
--- Iteration 8 --
--- With default argument --
-array(5) {
- [0]=>
- object(classA)#%d (0) {
- }
- ["string"]=>
- NULL
- ["resource"]=>
- resource(%d) of type (stream)
- [1]=>
- object(classA)#%d (0) {
- }
- [2]=>
- resource(%d) of type (stream)
-}
--- With more arguments --
-array(8) {
- [0]=>
- object(classA)#%d (0) {
- }
- ["string"]=>
- array(2) {
- [0]=>
- NULL
- [1]=>
- string(5) "hello"
- }
- ["resource"]=>
- resource(%d) of type (stream)
- [1]=>
- object(classA)#%d (0) {
- }
- [2]=>
- resource(%d) of type (stream)
- [3]=>
- string(3) "one"
- [4]=>
- int(2)
- ["array"]=>
- array(3) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- }
-}
-Done
---UEXPECTF--
-
*** Testing array_merge_recursive() : assoc. array with diff. values to $arr1 argument ***
-- Iteration 1 --
-- With default argument --
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge_recursive() : array with duplicate keys for $arr1 argument ***
--- With default argument --
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- string(9) "duplicate"
- [1]=>
- string(7) "strings"
- }
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [2]=>
- string(5) "three"
-}
-array(2) {
- ["str1"]=>
- string(5) "world"
- ["str2"]=>
- float(111.111)
-}
--- With more arguments --
-array(6) {
- [0]=>
- array(2) {
- [0]=>
- string(9) "duplicate"
- [1]=>
- string(7) "strings"
- }
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [2]=>
- string(5) "three"
- [3]=>
- string(3) "one"
- ["str1"]=>
- string(3) "two"
- [4]=>
- array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- }
-}
-array(4) {
- ["str1"]=>
- array(2) {
- [0]=>
- string(5) "world"
- [1]=>
- string(3) "two"
- }
- ["str2"]=>
- float(111.111)
- [0]=>
- string(3) "one"
- [1]=>
- array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- }
-}
-Done
---UEXPECTF--
-
+--EXPECT--
*** Testing array_merge_recursive() : array with duplicate keys for $arr1 argument ***
-- With default argument --
array(3) {
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge_recursive() : array with reference variables for $arr1 argument ***
--- With default argument --
-array(6) {
- [0]=>
- int(0)
- [1]=>
- &string(5) "hello"
- [2]=>
- &string(5) "hello"
- [3]=>
- string(5) "hello"
- [4]=>
- &int(0)
- ["hello"]=>
- &string(5) "hello"
-}
--- With more arguments --
-array(7) {
- [0]=>
- int(0)
- [1]=>
- &string(5) "hello"
- [2]=>
- &string(5) "hello"
- [3]=>
- string(5) "hello"
- [4]=>
- &int(0)
- ["hello"]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "hello"
- }
- [5]=>
- &string(5) "hello"
-}
-Done
---UEXPECTF--
-
+--EXPECT--
*** Testing array_merge_recursive() : array with reference variables for $arr1 argument ***
-- With default argument --
array(6) {
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge_recursive() : array with binary data for $arr1 argument ***
--- With default argument --
-array(5) {
- [0]=>
- string(1) "1"
- ["hello"]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- ["str1"]=>
- string(5) "hello"
- ["str2"]=>
- string(5) "world"
-}
--- With more arguments --
-array(5) {
- [0]=>
- string(1) "1"
- ["hello"]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(6) "binary"
- }
- [1]=>
- string(5) "world"
- ["str1"]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(6) "binary"
- }
- ["str2"]=>
- array(2) {
- [0]=>
- string(5) "world"
- [1]=>
- string(6) "binary"
- }
-}
-Done
---UEXPECTF--
-
+--EXPECT--
*** Testing array_merge_recursive() : array with binary data for $arr1 argument ***
-- With default argument --
array(5) {
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge_recursive() : arrays with common key and value ***
--- Integer values --
-array(3) {
- ["a"]=>
- int(1)
- ["b"]=>
- array(2) {
- [0]=>
- int(2)
- [1]=>
- int(2)
- }
- ["c"]=>
- int(4)
-}
--- Float values --
-array(3) {
- ["a"]=>
- float(1.1)
- ["b"]=>
- array(2) {
- [0]=>
- float(2.2)
- [1]=>
- float(2.2)
- }
- ["c"]=>
- float(3.3)
-}
--- String values --
-array(3) {
- ["a"]=>
- string(5) "hello"
- ["b"]=>
- array(2) {
- [0]=>
- string(5) "world"
- [1]=>
- string(5) "world"
- }
- ["c"]=>
- string(6) "string"
-}
--- Boolean values --
-array(2) {
- ["a"]=>
- bool(true)
- ["b"]=>
- array(2) {
- [0]=>
- bool(false)
- [1]=>
- bool(false)
- }
-}
--- Null values --
-array(1) {
- ["a"]=>
- array(2) {
- [0]=>
- NULL
- [1]=>
- NULL
- }
-}
-Done
---UEXPECTF--
-
+--EXPECT--
*** Testing array_merge_recursive() : arrays with common key and value ***
-- Integer values --
array(3) {
Warning: array_merge(): Argument #1 is not an array in %s on line %d
NULL
Done
-
---UEXPECTF--
-*** Testing array_merge() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 18 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
--- Iteration 19 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_merge(): Argument #1 is not an array in %s on line %d
-NULL
-Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge() : usage variations ***
-
--- Call array_merge() --
-array(9) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- string(4) "zero"
- [4]=>
- string(2) "un"
- [5]=>
- string(4) "deux"
- [6]=>
- string(4) "null"
- [7]=>
- string(4) "eins"
- [8]=>
- string(4) "zwei"
-}
-
--- Position of Internal Pointer in Result: --
-0 => zero
-
--- Position of Internal Pointer in Original Array: --
-$arr1: 0 => zero
-$arr2: 0 => zero
-$arr3: 0 => null
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_merge() : usage variations ***
-- Call array_merge() --
$arr1: 0 => zero
$arr2: 0 => zero
$arr3: 0 => null
-Done
\ No newline at end of file
+Done
Warning: array_merge(): Argument #2 is not an array in %s on line %d
NULL
Done
-
---UEXPECTF--
-*** Testing array_merge() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 18 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
--- Iteration 19 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_merge(): Argument #2 is not an array in %s on line %d
-NULL
-Done
bool(false)
}
--- Iteration 5: empty string data --
-array(4) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
-}
-
--- Iteration 6: empty array data --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
--- Iteration 7: string data --
-array(5) {
- [0]=>
- string(6) "string"
- [1]=>
- string(6) "string"
- [2]=>
- string(11) "hello world"
- [3]=>
- int(1)
- [4]=>
- int(2)
-}
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(6) "string"
- [3]=>
- string(6) "string"
- [4]=>
- string(11) "hello world"
-}
-
--- Iteration 8: object data --
-array(3) {
- [0]=>
- object(classA)#%d (0) {
- }
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- object(classA)#%d (0) {
- }
-}
-
--- Iteration 9: undefined data --
-array(3) {
- [0]=>
- NULL
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- NULL
-}
-
--- Iteration 10: unset data --
-array(3) {
- [0]=>
- NULL
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- NULL
-}
-
--- Iteration 11: resource data --
-array(3) {
- [0]=>
- resource(%d) of type (stream)
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- resource(%d) of type (stream)
-}
-Done
---UEXPECTF--
-*** Testing array_merge() : usage variations ***
-
--- Iteration 1: int data --
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(12345)
- [3]=>
- int(-2345)
- [4]=>
- int(1)
- [5]=>
- int(2)
-}
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(0)
- [3]=>
- int(1)
- [4]=>
- int(12345)
- [5]=>
- int(-2345)
-}
-
--- Iteration 2: float data --
-array(7) {
- [0]=>
- float(10.5)
- [1]=>
- float(-10.5)
- [2]=>
- float(123456789000)
- [3]=>
- float(1.23456789E-9)
- [4]=>
- float(0.5)
- [5]=>
- int(1)
- [6]=>
- int(2)
-}
-array(7) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- float(10.5)
- [3]=>
- float(-10.5)
- [4]=>
- float(123456789000)
- [5]=>
- float(1.23456789E-9)
- [6]=>
- float(0.5)
-}
-
--- Iteration 3: null data --
-array(4) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- NULL
- [3]=>
- NULL
-}
-
--- Iteration 4: bool data --
-array(6) {
- [0]=>
- bool(true)
- [1]=>
- bool(false)
- [2]=>
- bool(true)
- [3]=>
- bool(false)
- [4]=>
- int(1)
- [5]=>
- int(2)
-}
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- bool(true)
- [3]=>
- bool(false)
- [4]=>
- bool(true)
- [5]=>
- bool(false)
-}
-
-- Iteration 5: empty string data --
array(4) {
[0]=>
[2]=>
resource(%d) of type (stream)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge() : usage variations ***
-
--- Iteration 1: int data --
-array(6) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- string(8) "positive"
- [3]=>
- string(8) "negative"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(6) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- string(8) "positive"
- [3]=>
- string(8) "negative"
-}
-
--- Iteration 2: float data --
-array(5) {
- [0]=>
- string(8) "positive"
- [1]=>
- string(8) "negative"
- [2]=>
- string(4) "half"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(5) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [0]=>
- string(8) "positive"
- [1]=>
- string(8) "negative"
- [2]=>
- string(4) "half"
-}
-
--- Iteration 3: extreme floats data --
-array(4) {
- [0]=>
- string(5) "large"
- [1]=>
- string(5) "small"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [0]=>
- string(5) "large"
- [1]=>
- string(5) "small"
-}
-
--- Iteration 4: null uppercase data --
-array(3) {
- [""]=>
- string(6) "null 1"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [""]=>
- string(6) "null 1"
-}
-
--- Iteration 5: null lowercase data --
-array(3) {
- [""]=>
- string(6) "null 2"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [""]=>
- string(6) "null 2"
-}
-
--- Iteration 6: bool lowercase data --
-array(4) {
- [0]=>
- string(6) "lowert"
- [1]=>
- string(6) "lowerf"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [0]=>
- string(6) "lowert"
- [1]=>
- string(6) "lowerf"
-}
-
--- Iteration 7: bool uppercase data --
-array(4) {
- [0]=>
- string(6) "uppert"
- [1]=>
- string(6) "upperf"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [0]=>
- string(6) "uppert"
- [1]=>
- string(6) "upperf"
-}
-
--- Iteration 8: empty double quotes data --
-array(3) {
- [""]=>
- string(6) "emptyd"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [""]=>
- string(6) "emptyd"
-}
-
--- Iteration 9: empty single quotes data --
-array(3) {
- [""]=>
- string(6) "emptys"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [""]=>
- string(6) "emptys"
-}
-
--- Iteration 10: string data --
-array(5) {
- ["stringd"]=>
- string(7) "stringd"
- ["strings"]=>
- string(7) "strings"
- ["hello world"]=>
- string(7) "stringh"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(5) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["stringd"]=>
- string(7) "stringd"
- ["strings"]=>
- string(7) "strings"
- ["hello world"]=>
- string(7) "stringh"
-}
-
--- Iteration 11: undefined data --
-array(3) {
- [""]=>
- string(9) "undefined"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [""]=>
- string(9) "undefined"
-}
-
--- Iteration 12: unset data --
-array(3) {
- [""]=>
- string(5) "unset"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
-array(3) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- [""]=>
- string(5) "unset"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_merge() : usage variations ***
-- Iteration 1: int data --
[u""]=>
unicode(5) "unset"
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge() : usage variations ***
-array(7) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- string(5) "three"
- [4]=>
- string(3) "one"
- [5]=>
- string(6) "twenty"
- [6]=>
- string(6) "thirty"
-}
-array(7) {
- [0]=>
- string(3) "one"
- [1]=>
- string(6) "twenty"
- [2]=>
- string(6) "thirty"
- [3]=>
- string(4) "zero"
- [4]=>
- string(3) "one"
- [5]=>
- string(3) "two"
- [6]=>
- string(5) "three"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_merge() : usage variations ***
array(7) {
[0]=>
[6]=>
unicode(5) "three"
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge() : usage variations ***
-array(5) {
- ["zero"]=>
- string(4) "zero"
- ["one"]=>
- string(2) "un"
- ["two"]=>
- string(4) "deux"
- ["un"]=>
- string(4) "eins"
- ["deux"]=>
- string(4) "zwei"
-}
-array(5) {
- ["zero"]=>
- string(4) "zero"
- ["un"]=>
- string(4) "eins"
- ["deux"]=>
- string(4) "zwei"
- ["one"]=>
- string(2) "un"
- ["two"]=>
- string(4) "deux"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_merge() : usage variations ***
array(5) {
[u"zero"]=>
[u"two"]=>
unicode(4) "deux"
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge() : usage variations ***
-array(8) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(6) "twenty"
- ["thirty"]=>
- int(30)
- [2]=>
- string(4) "bool"
- [3]=>
- string(5) "float"
- [4]=>
- int(1)
- [5]=>
- int(2)
- [""]=>
- string(4) "null"
-}
-array(8) {
- [0]=>
- string(5) "float"
- [1]=>
- int(1)
- [2]=>
- int(2)
- [""]=>
- string(4) "null"
- [3]=>
- string(4) "zero"
- [4]=>
- string(6) "twenty"
- ["thirty"]=>
- int(30)
- [5]=>
- string(4) "bool"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_merge() : usage variations ***
array(8) {
[0]=>
[5]=>
unicode(4) "bool"
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_merge() : usage variations ***
-
--- Merge a two-dimensional and a one-dimensional array --
-array(7) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- array(1) {
- [0]=>
- int(0)
- }
- [4]=>
- int(1)
- [5]=>
- int(2)
- [6]=>
- int(3)
-}
-
--- Merge an array and a sub-array --
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
-}
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(0)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_merge() : usage variations ***
-- Merge a two-dimensional and a one-dimensional array --
[3]=>
int(0)
}
-Done
\ No newline at end of file
+Done
Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
*** Testing array_merge() : usage variations ***
--- Merge an array made up of referenced variables to an assoc. array --
-array(6) {
- [0]=>
- &string(3) "foo"
- [1]=>
- &string(3) "bar"
- [2]=>
- &string(3) "baz"
- ["key1"]=>
- string(4) "val1"
- ["key2"]=>
- string(4) "val2"
- ["key3"]=>
- string(4) "val3"
-}
-array(6) {
- ["key1"]=>
- string(4) "val1"
- ["key2"]=>
- string(4) "val2"
- ["key3"]=>
- string(4) "val3"
- [0]=>
- &string(3) "foo"
- [1]=>
- &string(3) "bar"
- [2]=>
- &string(3) "baz"
-}
-
--- Change $val2 --
-array(6) {
- [0]=>
- &string(3) "foo"
- [1]=>
- &string(11) "hello world"
- [2]=>
- &string(3) "baz"
- ["key1"]=>
- string(4) "val1"
- ["key2"]=>
- string(4) "val2"
- ["key3"]=>
- string(4) "val3"
-}
-array(6) {
- ["key1"]=>
- string(4) "val1"
- ["key2"]=>
- string(4) "val2"
- ["key3"]=>
- string(4) "val3"
- [0]=>
- &string(3) "foo"
- [1]=>
- &string(11) "hello world"
- [2]=>
- &string(3) "baz"
-}
-
--- Merge an array and a reference to the first array --
-array(3) {
- ["key1"]=>
- string(4) "val1"
- ["key2"]=>
- string(4) "val2"
- ["key3"]=>
- string(4) "val3"
-}
-Done
---UEXPECTF--
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-*** Testing array_merge() : usage variations ***
-
-- Merge an array made up of referenced variables to an assoc. array --
array(6) {
[0]=>
echo "Done\n";
?>
---EXPECTF--
-Warning: array_pad() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_pad() expects exactly 3 parameters, 1 given in %s on line %d
-NULL
-
-Warning: array_pad() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
-array(1) {
- [0]=>
- int(0)
-}
-array(0) {
-}
-array(1) {
- [0]=>
- int(0)
-}
-array(5) {
- [0]=>
- string(0) ""
- [1]=>
- int(-1)
- [2]=>
- float(2)
- [3]=>
- int(0)
- [4]=>
- int(0)
-}
-array(5) {
- [0]=>
- string(0) ""
- [1]=>
- int(-1)
- [2]=>
- float(2)
- [3]=>
- array(0) {
- }
- [4]=>
- array(0) {
- }
-}
-array(3) {
- [0]=>
- string(0) ""
- [1]=>
- int(-1)
- [2]=>
- float(2)
-}
-array(3) {
- [0]=>
- string(0) ""
- [1]=>
- int(-1)
- [2]=>
- float(2)
-}
-array(4) {
- [0]=>
- array(0) {
- }
- [1]=>
- string(0) ""
- [2]=>
- int(-1)
- [3]=>
- float(2)
-}
-
-Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d
-bool(false)
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-Done
---UEXPECTF--
+--EXPECTF--
Warning: array_pad() expects exactly 3 parameters, 0 given in %s on line %d
NULL
echo "Done";
?>
---EXPECTF--
-*** Testing array_pad() : basic functionality ***
--- Positive pad_size --
-array(8) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(-3)
- [4]=>
- int(-3)
- [5]=>
- int(-3)
- [6]=>
- int(-3)
- [7]=>
- int(-3)
-}
--- Negative pad_size --
-array(8) {
- [0]=>
- int(-3)
- [1]=>
- int(-3)
- [2]=>
- int(-3)
- [3]=>
- int(-3)
- [4]=>
- int(-3)
- [5]=>
- int(1)
- [6]=>
- int(2)
- [7]=>
- int(3)
-}
--- Pad_size lesser than array_size --
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
--- Pad_size equal to array_size --
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_pad() : basic functionality ***
-- Positive pad_size --
array(8) {
Warning: array_pad() expects exactly 3 parameters, 1 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_pad() : error conditions ***
-
--- Testing array_pad() function with Zero arguments --
-
-Warning: array_pad() expects exactly 3 parameters, 0 given in %s on line %d
-NULL
-
--- Testing array_pad() function with more than expected no. of arguments --
-
-Warning: array_pad() expects exactly 3 parameters, 4 given in %s on line %d
-NULL
-
--- Testing array_pad() function with less than expected no. of arguments --
-
-Warning: array_pad() expects exactly 3 parameters, 2 given in %s on line %d
-NULL
-
-Warning: array_pad() expects exactly 3 parameters, 1 given in %s on line %d
-NULL
-Done
Warning: array_pad() expects parameter 1 to be array, boolean given in %s on line %d
NULL
--- Iteration 16 --
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-Warning: array_pad() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 23 --
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-Warning: array_pad() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_pad() : passing non array values to $input argument ***
-
--- Iteration 1 --
-Warning: array_pad() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-Warning: array_pad() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-Warning: array_pad() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-Warning: array_pad() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-Warning: array_pad() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-Warning: array_pad() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-Warning: array_pad() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-Warning: array_pad() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-Warning: array_pad() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-Warning: array_pad() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-Warning: array_pad() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-Warning: array_pad() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-Warning: array_pad() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_pad() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-- Iteration 16 --
Warning: array_pad() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
}
-- Iteration 18 --
-Warning: array_pad() expects parameter 2 to be long, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_pad() expects parameter 2 to be long, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_pad() expects parameter 2 to be long, string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_pad() expects parameter 2 to be long, string given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_pad() expects parameter 2 to be long, object given in %s on line %d
-NULL
--- Iteration 23 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 24 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-Done
---UEXPECTF--
-*** Testing array_pad() : passing non integer values to $pad_size argument ***
--- Iteration 1 --
-array(10) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(1)
- [3]=>
- int(1)
- [4]=>
- int(1)
- [5]=>
- int(1)
- [6]=>
- int(1)
- [7]=>
- int(1)
- [8]=>
- int(1)
- [9]=>
- int(1)
-}
--- Iteration 2 --
-array(10) {
- [0]=>
- int(1)
- [1]=>
- int(1)
- [2]=>
- int(1)
- [3]=>
- int(1)
- [4]=>
- int(1)
- [5]=>
- int(1)
- [6]=>
- int(1)
- [7]=>
- int(1)
- [8]=>
- int(1)
- [9]=>
- int(2)
-}
--- Iteration 3 --
-
-Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d
-bool(false)
--- Iteration 5 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 6 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 7 --
-
-Warning: array_pad() expects parameter 2 to be long, array given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_pad() expects parameter 2 to be long, array given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_pad() expects parameter 2 to be long, array given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_pad() expects parameter 2 to be long, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_pad() expects parameter 2 to be long, array given in %s on line %d
-NULL
--- Iteration 12 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 13 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 14 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 15 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 16 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 17 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 18 --
-
Warning: array_pad() expects parameter 2 to be long, Unicode string given in %s on line %d
NULL
-- Iteration 19 --
int(2)
}
-- Iteration 14 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- array(2) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- }
- [3]=>
- array(2) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- }
-}
-array(4) {
- [0]=>
- array(2) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- }
- [1]=>
- array(2) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- }
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 15 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- NULL
- [3]=>
- NULL
-}
-array(4) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 16 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- NULL
- [3]=>
- NULL
-}
-array(4) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 17 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- bool(true)
- [3]=>
- bool(true)
-}
-array(4) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 18 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- bool(false)
- [3]=>
- bool(false)
-}
-array(4) {
- [0]=>
- bool(false)
- [1]=>
- bool(false)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 19 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- bool(true)
- [3]=>
- bool(true)
-}
-array(4) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 20 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- bool(false)
- [3]=>
- bool(false)
-}
-array(4) {
- [0]=>
- bool(false)
- [1]=>
- bool(false)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 21 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
-}
-array(4) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 22 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(0) ""
- [3]=>
- string(0) ""
-}
-array(4) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 23 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(6) "string"
- [3]=>
- string(6) "string"
-}
-array(4) {
- [0]=>
- string(6) "string"
- [1]=>
- string(6) "string"
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 24 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(6) "string"
- [3]=>
- string(6) "string"
-}
-array(4) {
- [0]=>
- string(6) "string"
- [1]=>
- string(6) "string"
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 25 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(11) "hello world"
- [3]=>
- string(11) "hello world"
-}
-array(4) {
- [0]=>
- string(11) "hello world"
- [1]=>
- string(11) "hello world"
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 26 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(25) "\v\fHello world!!
-string
-"
- [3]=>
- string(25) "\v\fHello world!!
-string
-"
-}
-array(4) {
- [0]=>
- string(25) "\v\fHello world!!
-string
-"
- [1]=>
- string(25) "\v\fHello world!!
-string
-"
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 27 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(30) "\v\fHello\t world!! \rstring\n"
- [3]=>
- string(30) "\v\fHello\t world!! \rstring\n"
-}
-array(4) {
- [0]=>
- string(30) "\v\fHello\t world!! \rstring\n"
- [1]=>
- string(30) "\v\fHello\t world!! \rstring\n"
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 28 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- object(classA)#%d (0) {
- }
- [3]=>
- object(classA)#%d (0) {
- }
-}
-array(4) {
- [0]=>
- object(classA)#%d (0) {
- }
- [1]=>
- object(classA)#%d (0) {
- }
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 29 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- NULL
- [3]=>
- NULL
-}
-array(4) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 30 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- NULL
- [3]=>
- NULL
-}
-array(4) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 31 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- resource(%d) of type (stream)
- [3]=>
- resource(%d) of type (stream)
-}
-array(4) {
- [0]=>
- resource(%d) of type (stream)
- [1]=>
- resource(%d) of type (stream)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 32 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(5) "hello"
- [3]=>
- string(5) "hello"
-}
-array(4) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "hello"
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
-Done
---UEXPECTF--
-*** Testing array_pad() : possible values for $pad_value argument ***
--- Iteration 1 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(0)
- [3]=>
- int(0)
-}
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(0)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 2 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(1)
- [3]=>
- int(1)
-}
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(1)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 3 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(12345)
- [3]=>
- int(12345)
-}
-array(4) {
- [0]=>
- int(12345)
- [1]=>
- int(12345)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 4 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(-2345)
- [3]=>
- int(-2345)
-}
-array(4) {
- [0]=>
- int(-2345)
- [1]=>
- int(-2345)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 5 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- float(10.5)
- [3]=>
- float(10.5)
-}
-array(4) {
- [0]=>
- float(10.5)
- [1]=>
- float(10.5)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 6 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- float(-10.5)
- [3]=>
- float(-10.5)
-}
-array(4) {
- [0]=>
- float(-10.5)
- [1]=>
- float(-10.5)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 7 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- float(123456789000)
- [3]=>
- float(123456789000)
-}
-array(4) {
- [0]=>
- float(123456789000)
- [1]=>
- float(123456789000)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 8 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- float(1.23456789E-9)
- [3]=>
- float(1.23456789E-9)
-}
-array(4) {
- [0]=>
- float(1.23456789E-9)
- [1]=>
- float(1.23456789E-9)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 9 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- float(0.5)
- [3]=>
- float(0.5)
-}
-array(4) {
- [0]=>
- float(0.5)
- [1]=>
- float(0.5)
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 10 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- array(0) {
- }
- [3]=>
- array(0) {
- }
-}
-array(4) {
- [0]=>
- array(0) {
- }
- [1]=>
- array(0) {
- }
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 11 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- array(1) {
- [0]=>
- int(0)
- }
- [3]=>
- array(1) {
- [0]=>
- int(0)
- }
-}
-array(4) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(0)
- }
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 12 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- array(1) {
- [0]=>
- int(1)
- }
- [3]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
-array(4) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(1)
- }
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 13 --
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [3]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
-}
-array(4) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [2]=>
- int(1)
- [3]=>
- int(2)
-}
--- Iteration 14 --
array(4) {
[0]=>
int(1)
echo "Done";
?>
---EXPECTF--
-*** Testing array_pad() : Passing binary values to $pad_value argument ***
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- string(5) "hello"
- [4]=>
- string(5) "hello"
- [5]=>
- string(5) "hello"
-}
-array(6) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "hello"
- [3]=>
- int(1)
- [4]=>
- int(2)
- [5]=>
- int(3)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_pad() : Passing binary values to $pad_value argument ***
array(6) {
[0]=>
echo "Done";
?>
---EXPECTF--
-*** Testing array_pad() : Passing 2-d array to $pad_value argument ***
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
- [2]=>
- array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- }
- }
- [4]=>
- array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
- [2]=>
- array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- }
- }
-}
-array(5) {
- [0]=>
- array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
- [2]=>
- array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- }
- }
- [1]=>
- array(3) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
- [2]=>
- array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- }
- }
- [2]=>
- int(1)
- [3]=>
- int(2)
- [4]=>
- int(3)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_pad() : Passing 2-d array to $pad_value argument ***
array(5) {
[0]=>
echo "Done";
?>
---EXPECTF--
-*** Testing array_pad() : Passing different arrays to $input argument ***
--- Iteration 1 --
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- string(5) "HELLO"
- [5]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- int(1)
- [5]=>
- int(2)
-}
--- Iteration 2 --
-array(6) {
- [0]=>
- float(1.1)
- [1]=>
- float(2.2)
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- string(5) "HELLO"
- [5]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- float(1.1)
- [5]=>
- float(2.2)
-}
--- Iteration 3 --
-array(6) {
- [0]=>
- bool(false)
- [1]=>
- bool(true)
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- string(5) "HELLO"
- [5]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- bool(false)
- [5]=>
- bool(true)
-}
--- Iteration 4 --
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- string(5) "HELLO"
- [5]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- string(5) "HELLO"
- [5]=>
- string(5) "HELLO"
-}
--- Iteration 5 --
-array(6) {
- [0]=>
- NULL
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- string(5) "HELLO"
- [5]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- string(5) "HELLO"
- [5]=>
- NULL
-}
--- Iteration 6 --
-array(6) {
- [0]=>
- string(3) "a\v\f"
- [1]=>
- string(5) "aaaa
-"
- [2]=>
- string(5) "b bbb"
- [3]=>
- string(27) "\[\]\!\@\#$\%\^\&\*\(\)\{\}"
- [4]=>
- string(5) "HELLO"
- [5]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(3) "a\v\f"
- [3]=>
- string(5) "aaaa
-"
- [4]=>
- string(5) "b bbb"
- [5]=>
- string(27) "\[\]\!\@\#$\%\^\&\*\(\)\{\}"
-}
--- Iteration 7 --
-array(6) {
- [0]=>
- string(5) "a\v\f"
- [1]=>
- string(6) "aaaa\r"
- [2]=>
- string(6) "b\tbbb"
- [3]=>
- string(28) "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"
- [4]=>
- string(5) "HELLO"
- [5]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "a\v\f"
- [3]=>
- string(6) "aaaa\r"
- [4]=>
- string(6) "b\tbbb"
- [5]=>
- string(28) "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"
-}
--- Iteration 8 --
-array(6) {
- ["h1"]=>
- string(1) "
-"
- ["h2"]=>
- string(86) "hello world
-The big brown fox jumped over;
-the lazy dog
-This is a double quoted string"
- ["h3"]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
- [0]=>
- string(90) "11 < 12. 123 >22
-'single quoted string'
-"double quoted string"
-2222 != 1111. 0000 = 0000
-"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- ["h1"]=>
- string(1) "
-"
- ["h2"]=>
- string(86) "hello world
-The big brown fox jumped over;
-the lazy dog
-This is a double quoted string"
- ["h3"]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
- [2]=>
- string(90) "11 < 12. 123 >22
-'single quoted string'
-"double quoted string"
-2222 != 1111. 0000 = 0000
-"
-}
--- Iteration 9 --
-array(6) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
- [3]=>
- string(5) "HELLO"
- [4]=>
- string(5) "HELLO"
- [5]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(3) "one"
- [4]=>
- string(3) "two"
- [5]=>
- string(5) "three"
-}
--- Iteration 10 --
-array(6) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
--- Iteration 11 --
-array(6) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(40)
- [3]=>
- int(30)
- [4]=>
- string(5) "HELLO"
- [5]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- int(10)
- [3]=>
- int(20)
- [4]=>
- int(40)
- [5]=>
- int(30)
-}
--- Iteration 12 --
-array(6) {
- ["one"]=>
- string(3) "ten"
- ["two"]=>
- string(6) "twenty"
- ["three"]=>
- string(6) "thirty"
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- ["one"]=>
- string(3) "ten"
- ["two"]=>
- string(6) "twenty"
- ["three"]=>
- string(6) "thirty"
-}
--- Iteration 13 --
-array(6) {
- ["one"]=>
- int(1)
- [0]=>
- string(3) "two"
- [1]=>
- string(4) "four"
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- ["one"]=>
- int(1)
- [3]=>
- string(3) "two"
- [4]=>
- string(4) "four"
-}
--- Iteration 14 --
-array(6) {
- [""]=>
- string(4) "null"
- ["NULL"]=>
- NULL
- ["null"]=>
- NULL
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- [""]=>
- string(4) "null"
- ["NULL"]=>
- NULL
- ["null"]=>
- NULL
-}
--- Iteration 15 --
-array(6) {
- [0]=>
- string(4) "true"
- [1]=>
- string(5) "false"
- ["false"]=>
- bool(false)
- ["true"]=>
- bool(true)
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(4) "true"
- [3]=>
- string(5) "false"
- ["false"]=>
- bool(false)
- ["true"]=>
- bool(true)
-}
--- Iteration 16 --
-array(6) {
- [""]=>
- string(6) "emptys"
- ["emptyd"]=>
- string(0) ""
- ["emptys"]=>
- string(0) ""
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- [""]=>
- string(6) "emptys"
- ["emptyd"]=>
- string(0) ""
- ["emptys"]=>
- string(0) ""
-}
--- Iteration 17 --
-array(6) {
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- NULL
- [4]=>
- NULL
- [5]=>
- bool(false)
- [6]=>
- bool(true)
-}
-array(6) {
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- NULL
- [4]=>
- NULL
- [5]=>
- bool(false)
- [6]=>
- bool(true)
-}
--- Iteration 18 --
-array(6) {
- [""]=>
- int(4)
- [0]=>
- int(5)
- [1]=>
- int(6)
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- [""]=>
- int(4)
- [3]=>
- int(5)
- [4]=>
- int(6)
-}
--- Iteration 19 --
-array(6) {
- ["One"]=>
- int(10)
- ["two"]=>
- int(20)
- ["three"]=>
- int(3)
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
-}
-array(6) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- ["One"]=>
- int(10)
- ["two"]=>
- int(20)
- ["three"]=>
- int(3)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_pad() : Passing different arrays to $input argument ***
-- Iteration 1 --
array(6) {
echo "Done";
?>
---EXPECTF--
-*** Testing array_pad() : Passing 2-D array to $input argument ***
--- Entire 2-d array for $input argument --
-array(5) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [1]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
- [2]=>
- array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- }
- [3]=>
- string(5) "HELLO"
- [4]=>
- string(5) "HELLO"
-}
-array(5) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [3]=>
- array(2) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- }
- [4]=>
- array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- }
-}
--- Sub array for $input argument --
-array(5) {
- [0]=>
- string(5) "hello"
- [1]=>
- string(5) "world"
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "HELLO"
- [4]=>
- string(5) "HELLO"
-}
-array(5) {
- [0]=>
- string(5) "HELLO"
- [1]=>
- string(5) "HELLO"
- [2]=>
- string(5) "HELLO"
- [3]=>
- string(5) "hello"
- [4]=>
- string(5) "world"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_pad() : Passing 2-D array to $input argument ***
-- Entire 2-d array for $input argument --
array(5) {
echo"\nDone";
?>
---EXPECTF--
-*** 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 :
-string(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 :
-string(4) "nine"
-
--- Input Array for Iteration 5 is --
-Array
-(
- [a] => aaa
- [A] => AAA
- [c] => ccc
- [d] => ddd
- [e] => eee
-)
-
-Output after Pop is :
-string(3) "eee"
-
--- Input Array for Iteration 6 is --
-Array
-(
- [1] => one
- [2] => two
- [3] => three
- [4] => four
- [5] => five
-)
-
-Output after Pop is :
-string(4) "five"
-
--- Input Array for Iteration 7 is --
-Array
-(
- [1] => one
- [2] => two
- [3] => 7
- [4] => four
- [5] => five
-)
-
-Output after Pop is :
-string(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 :
-string(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)
-
-Done
---UEXPECTF--
+--EXPECT--
*** Normal testing with various array inputs ***
-- Input Array for Iteration 1 is --
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, string given in %s on line %d
-NULL
-
-Warning: array_pop() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-NULL
-
-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
echo"\nDone";
?>
---EXPECTF--
+--EXPECT--
*** Checking for internal array pointer being reset when pop is called ***
Current Element is : int(1)
Output after push is :
int(12)
-*** Checking for return value and the new array formed from push operation ***
-int(8)
-array(8) {
- [0]=>
- string(3) "One"
- [1]=>
- string(4) "_Two"
- [2]=>
- string(5) "Three"
- [3]=>
- string(4) "Four"
- [4]=>
- string(4) "Five"
- [5]=>
- int(22)
- [6]=>
- int(33)
- [7]=>
- string(2) "44"
-}
-
-Done
---UEXPECTF--
-*** Testing Error Conditions ***
-
-Warning: Wrong parameter count for array_push() in %s on line %d
-NULL
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-int(11)
-int(1)
-
-*** Testing with various array inputs ***
-
--- Input Array for Iteration 1 is --
-Array
-(
-)
-
-Output after push is :
-int(2)
-
--- Input Array for Iteration 2 is --
-Array
-(
- [0] => 1
- [1] => 2
- [2] => 3
- [3] => 4
- [4] => 5
- [5] => 6
- [6] => 7
- [7] => 8
- [8] => 9
- [9] => 1
- [10] => 2
-)
-
-Output after push is :
-int(13)
-
--- Input Array for Iteration 3 is --
-Array
-(
- [0] => One
- [1] => _Two
- [2] => Three
- [3] => Four
- [4] => Five
-)
-
-Output after push is :
-int(7)
-
--- Input Array for Iteration 4 is --
-Array
-(
- [0] => 6
- [1] => six
- [2] => 7
- [3] => seven
- [4] => 8
- [5] => eight
- [6] => 9
- [7] => nine
-)
-
-Output after push is :
-int(10)
-
--- Input Array for Iteration 5 is --
-Array
-(
- [a] => aaa
- [A] => AAA
- [c] => ccc
- [d] => ddd
- [e] => eee
-)
-
-Output after push is :
-int(7)
-
--- Input Array for Iteration 6 is --
-Array
-(
- [1] => one
- [2] => two
- [3] => three
- [4] => four
- [5] => five
-)
-
-Output after push is :
-int(7)
-
--- Input Array for Iteration 7 is --
-Array
-(
- [1] => one
- [2] => two
- [3] => 7
- [4] => four
- [5] => five
-)
-
-Output after push is :
-int(7)
-
--- Input Array for Iteration 8 is --
-Array
-(
- [f] => fff
- [1] => one
- [4] => 6
- [] => 3
- [2] => float
- [F] => FFF
- [blank] =>
- [3] => 3.7
- [5] => Five
- [6] => 8.6
- [4name] => jonny
- [a] =>
-)
-
-Output after push is :
-int(14)
-
--- Input Array for Iteration 9 is --
-Array
-(
- [0] => 12
- [1] => name
- [2] => age
- [3] => 45
-)
-
-Output after push is :
-int(6)
-
--- Input Array for Iteration 10 is --
-Array
-(
- [0] => Array
- (
- [0] => oNe
- [1] => tWo
- [2] => 4
- )
-
- [1] => Array
- (
- [0] => 10
- [1] => 20
- [2] => 30
- [3] => 40
- [4] => 50
- )
-
- [2] => Array
- (
- )
-
-)
-
-Output after push is :
-int(5)
-
--- Input Array for Iteration 11 is --
-Array
-(
- [one] => 2
- [three] => 3
- [0] => 3
- [1] => 4
- [3] => 33
- [4] => 44
- [5] => 57
- [6] => 6
- [5.4] => 554
- [5.7] => 557
-)
-
-Output after push is :
-int(12)
-
*** Checking for return value and the new array formed from push operation ***
int(8)
array(8) {
echo "Done";
?>
---EXPECTF--
-*** Testing array_push() : basic functionality ***
-
--- Push values onto an indexed array --
-int(5)
-array(5) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- string(5) "three"
- [4]=>
- string(4) "four"
-}
-
--- Push values onto an associative array --
-int(4)
-array(4) {
- ["one"]=>
- string(2) "un"
- ["two"]=>
- string(4) "deux"
- [0]=>
- string(5) "three"
- [1]=>
- string(4) "four"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_push() : basic functionality ***
-- Push values onto an indexed array --
[1]=>
unicode(4) "four"
}
-Done
\ No newline at end of file
+Done
Warning: Wrong parameter count for array_push() in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_push() : error conditions ***
-
--- Testing array_push() function with less than expected no. of arguments --
-
-Warning: Wrong parameter count for array_push() in %s on line %d
-NULL
-Done
\ No newline at end of file
--EXPECTF--
*** Testing array_push() : error conditions ***
int(3)
-array(3) {
- [-%d]=>
- string(3) "min"
- [%d]=>
- string(3) "max"
- [-%d]=>
- string(3) "new"
-}
-
-Warning: array_push(): Cannot add element to the array as the next element is already occupied in %s on line %d
-bool(false)
-array(3) {
- [-%d]=>
- string(3) "min"
- [%d]=>
- string(3) "max"
- [-%d]=>
- string(3) "new"
-}
-Done
---UEXPECTF--
-*** Testing array_push() : error conditions ***
-int(3)
array(3) {
[-2147483647]=>
unicode(3) "min"
[-2147483648]=>
unicode(3) "new"
}
-Done
\ No newline at end of file
+Done
Warning: array_push(): First argument should be an array in %s on line %d
bool(false)
Done
---UEXPECTF--
-*** Testing array_push() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 18 --
-int(1)
-
--- Iteration 19 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 22 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 24 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-
--- Iteration 25 --
-
-Warning: array_push(): First argument should be an array in %s on line %d
-bool(false)
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_push() : usage variations ***
-- Iteration 1 --
-- Iteration 25 --
int(3)
Done
---UEXPECTF--
-*** Testing array_push() : usage variations ***
-
--- Iteration 1 --
-int(3)
-
--- Iteration 2 --
-int(3)
-
--- Iteration 3 --
-int(3)
-
--- Iteration 4 --
-int(3)
-
--- Iteration 5 --
-int(3)
-
--- Iteration 6 --
-int(3)
-
--- Iteration 7 --
-int(3)
-
--- Iteration 8 --
-int(3)
-
--- Iteration 9 --
-int(3)
-
--- Iteration 10 --
-int(3)
-
--- Iteration 11 --
-int(3)
-
--- Iteration 12 --
-int(3)
-
--- Iteration 13 --
-int(3)
-
--- Iteration 14 --
-int(3)
-
--- Iteration 15 --
-int(3)
-
--- Iteration 16 --
-int(3)
-
--- Iteration 17 --
-int(3)
-
--- Iteration 18 --
-int(3)
-
--- Iteration 19 --
-int(3)
-
--- Iteration 20 --
-int(3)
-
--- Iteration 21 --
-int(3)
-
--- Iteration 22 --
-int(3)
-
--- Iteration 23 --
-int(3)
-
--- Iteration 24 --
-int(3)
-
--- Iteration 25 --
-int(3)
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
-*** Testing array_push() : usage variations ***
-
--- Pass array as $var argument --
-int(4)
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- }
-}
-
--- Pass sub-array as $stack argument --
-int(3)
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(1) "a"
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_push() : usage variations ***
-- Pass array as $var argument --
unicode(1) "a"
}
}
-Done
\ No newline at end of file
+Done
Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
*** Testing array_push() : usage variations ***
--- Pass array_push referenced varialbes as $var arguments --
-int(9)
-array(9) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- &string(1) "a"
- [4]=>
- &string(1) "b"
- [5]=>
- &string(1) "c"
- [6]=>
- &string(1) "x"
- [7]=>
- &string(1) "y"
- [8]=>
- &string(1) "z"
-}
-
--- Pass $var argument which is a reference to $stack argument --
-int(10)
-array(10) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- &string(1) "a"
- [4]=>
- &string(1) "b"
- [5]=>
- &string(1) "c"
- [6]=>
- &string(1) "x"
- [7]=>
- &string(1) "y"
- [8]=>
- &string(1) "z"
- [9]=>
- &array(10) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- &string(1) "a"
- [4]=>
- &string(1) "b"
- [5]=>
- &string(1) "c"
- [6]=>
- &string(1) "x"
- [7]=>
- &string(1) "y"
- [8]=>
- &string(1) "z"
- [9]=>
- &array(10) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- &string(1) "a"
- [4]=>
- &string(1) "b"
- [5]=>
- &string(1) "c"
- [6]=>
- &string(1) "x"
- [7]=>
- &string(1) "y"
- [8]=>
- &string(1) "z"
- [9]=>
- *RECURSION*
- }
- }
-}
-Done
---UEXPECTF--
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-*** Testing array_push() : usage variations ***
-
-- Pass array_push referenced varialbes as $var arguments --
int(9)
array(9) {
echo "Done";
?>
---EXPECTF--
-
-*** Testing array_push() : usage variations ***
-
--- Call array_push() --
-int(3)
-
--- Position of Internal Pointer in Original Array: --
-one => un
-Done
-
---UEXPECTF--
+--EXPECT--
*** Testing array_push() : usage variations ***
echo "Done";
?>
---EXPECTF--
-*** Testing array_push() : usage variations ***
-
--- Iteration 1 : int data --
-Before : int(4)
-After : int(5)
-
--- Iteration 2 : float data --
-Before : int(3)
-After : int(4)
-
--- Iteration 3 : extreme floats data --
-Before : int(2)
-After : int(3)
-
--- Iteration 4 : null uppercase data --
-Before : int(1)
-After : int(2)
-
--- Iteration 5 : null lowercase data --
-Before : int(1)
-After : int(2)
-
--- Iteration 6 : bool lowercase data --
-Before : int(2)
-After : int(3)
-
--- Iteration 7 : bool uppercase data --
-Before : int(2)
-After : int(3)
-
--- Iteration 8 : empty double quotes data --
-Before : int(1)
-After : int(2)
-
--- Iteration 9 : empty single quotes data --
-Before : int(1)
-After : int(2)
-
--- Iteration 10 : string data --
-Before : int(3)
-After : int(4)
-
--- Iteration 11 : undefined data --
-Before : int(1)
-After : int(2)
-
--- Iteration 12 : unset data --
-Before : int(1)
-After : int(2)
-Done
-
---UEXPECTF--
+--EXPECT--
*** Testing array_push() : usage variations ***
-- Iteration 1 : int data --
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
Warning: array_rand() expects at least 1 parameter, 0 given in %s on line %d
NULL
NULL
-- with default argument --
int(%d)
Done
-
---UEXPECTF--
-*** Testing array_rand() : array with default keys ***
-
--- with all default and optional arguments --
-array(%d) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- [3]=>
- int(%d)
- [4]=>
- int(%d)
- [5]=>
- int(%d)
-}
-
--- with default argument --
-int(%d)
-Done
--EXPECTF--
*** Testing array_rand() : with associative array ***
--- with all default and optional arguments --
-array(6) {
- [0]=>
- string(%d) "%s"
- [1]=>
- string(%d) "%s"
- [2]=>
- string(%d) "%s"
- [3]=>
- string(%d) "%s"
- [4]=>
- string(%d) "%s"
- [5]=>
- string(%d) "%s"
-}
-
--- with default argument --
-string(%d) "%s"
-Done
-
---UEXPECTF--
-*** Testing array_rand() : with associative array ***
-
-- with all default and optional arguments --
array(6) {
[0]=>
Warning: array_rand() expects at most 2 parameters, 3 given in %s on line %d
NULL
Done
-
---UEXPECTF--
-*** Testing array_rand() : error conditions ***
-
--- Testing array_rand() function with Zero arguments --
-
-Warning: array_rand() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing array_rand() function with more than expected no. of arguments --
-
-Warning: array_rand() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-Done
-- Iteration 16 --
-Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_rand() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_rand() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d
-NULL
-Done
-
---UEXPECTF--
-*** Testing array_rand() : unexpected values for 'input' parameter ***
-
--- Iteration 1 --
-
-Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_rand() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_rand() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_rand() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_rand() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 16 --
-
Warning: array_rand() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
-- Iteration 16 --
-Warning: array_rand() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_rand() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_rand() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_rand() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_rand() expects parameter 2 to be long, object given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-Done
-
---UEXPECTF--
-*** Testing array_rand() : unexpected values for 'num_req' parameter ***
-
--- Iteration 1 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 2 --
-int(%d)
-
--- Iteration 3 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 5 --
-array(10) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- [3]=>
- int(%d)
- [4]=>
- int(%d)
- [5]=>
- int(%d)
- [6]=>
- int(%d)
- [7]=>
- int(%d)
- [8]=>
- int(%d)
- [9]=>
- int(%d)
-}
-
--- Iteration 6 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 12 --
-int(%d)
-
--- Iteration 13 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 14 --
-int(%d)
-
--- Iteration 15 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- Iteration 16 --
-
Warning: array_rand() expects parameter 2 to be long, Unicode string given in %s on line %d
NULL
int(%d)
}
Done
-
---UEXPECTF--
-*** Testing array_rand() : with multi-dimensional array ***
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
-*** Testing array_rand() with arrays having different types of values ***
-
--- Iteration 1 --
-int(%d)
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
--- Iteration 2 --
-int(%d)
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
--- Iteration 3 --
-int(%d)
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
--- Iteration 4 --
-int(%d)
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
--- Iteration 5 --
-int(%d)
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
--- Iteration 6 --
-int(%d)
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
--- Iteration 7 --
-int(%d)
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-Done
-- Iteration 2 --
-With default argument
-string\([0-9]*\) "[ot1 ]*[hnw2]*[eort]*[ew]*[e]*[l]*[v]*[e]*"
-
-With num_req = 1
-string\([0-9]*\) "[ot1 ]*[hnw2]*[eort]*[ew]*[e]*[l]*[v]*[e]*"
-
-With num_req = 2
-array\(2\) {
- \[0\]=>
- string\([0-9]*\) "[ot1 ]*[hnw2]*[eort]*[ew]*[e]*[l]*[v]*[e]*"
- \[1\]=>
- string\([0-9]*\) "[ot1 ]*[hnw2]*[eort]*[ew]*[e]*[l]*[v]*[e]*"
-}
-
--- Iteration 3 --
-
-With default argument
-int\([23-]*[2570]*[345]*[58]*\)
-
-With num_req = 1
-int\([23-]*[2570]*[345]*[58]*\)
-
-With num_req = 2
-array\(2\) {
- \[0\]=>
- int\([23-]*[2570]*[345]*[58]*\)
- \[1\]=>
- int\([23-]*[2570]*[345]*[58]*\)
-}
-
--- Iteration 4 --
-
-With default argument
-int\([18-]*[023]*[8]*\)
-
-With num_req = 1
-int\([18-]*[023]*[8]*\)
-
-With num_req = 2
-array\(2\) {
- \[0\]=>
- int\([18-]*[023]*[8]*\)
- \[1\]=>
- int\([18-]*[023]*[8]*\)
-}
-
--- Iteration 5 --
-
-With default argument
-int\([01]\)
-
-With num_req = 1
-int\([01]\)
-
-With num_req = 2
-array\(2\) {
- \[0\]=>
- int\([01]\)
- \[1\]=>
- int\([01]\)
-}
-
--- Iteration 6 --
-
-With default argument
-string\([0-9]*\) "[#&!N <\n\t'"\0]*[U#$>]*[rL]*[L]*"
-
-With num_req = 1
-string\([0-9]*\) "[#&!N <\n\t'"\0]*[U#$>]*[rL]*[L]*"
-
-With num_req = 2
-array\(2\) {
- \[0\]=>
- string\([0-9]*\) "[#&!N <\n\t'"\0]*[U#$>]*[rL]*[L]*"
- \[1\]=>
- string\([0-9]*\) "[#&!N <\n\t'"\0]*[U#$>]*[rL]*[L]*"
-}
-Done
-
---UEXPECTREGEX--
-\*\*\* Testing array_rand\(\) : with associative arrays \*\*\*
-
--- Iteration 1 --
-
-With default argument
-int\([012-][12.e]*[23e]*[34]*[5]*[6]*[7]*[8]*[9]*[0]*\)
-
-With num_req = 1
-int\([012-][12.e]*[23e]*[34]*[5]*[6]*[7]*[8]*[9]*[0]*\)
-
-With num_req = 2
-array\(2\) {
- \[0\]=>
- int\([012-][12.e]*[23e]*[34]*[5]*[6]*[7]*[8]*[9]*[0]*\)
- \[1\]=>
- int\([012-][12.e]*[23e]*[34]*[5]*[6]*[7]*[8]*[9]*[0]*\)
-}
-
--- Iteration 2 --
-
With default argument
unicode\([0-9]*\) "[ot1 ]*[hnw2]*[eort]*[ew]*[e]*[l]*[v]*[e]*"
Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
NULL
Done
-
---UEXPECTF--
-*** Testing array_rand() : with invalid values for 'req_num' ***
-
--- With default num_req value --
-int(%d)
-
--- With num_req = 1 --
-int(%d)
-
--- With num_req = 0 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- With num_req = -1 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- With num_req = -2 --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-
--- With num_req more than number of members in 'input' array --
-
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-NULL
-Done
--EXPECTREGEX--
\*\*\* Testing array_rand\(\) : with keys of input array as heredoc strings \*\*\*
--- with default parameters --
-string\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
-
--- with num_req = 1 --
-string\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
-
--- with num_req = 3 --
-array\(3\) {
- \[0\]=>
- string\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
- \[1\]=>
- string\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
- \[2\]=>
- string\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
-}
-
--- with num_req = 6 --
-array\(6\) {
- \[0\]=>
- string\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
- \[1\]=>
- string\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
- \[2\]=>
- string\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
- \[3\]=>
- string\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
- \[4\]=>
- string\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
- \[5\]=>
- string\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
-}
-Done
-
---UEXPECTREGEX--
-\*\*\* Testing array_rand\(\) : with keys of input array as heredoc strings \*\*\*
-
-- with default parameters --
unicode\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
?>
--EXPECTF--
*** Testing array_reverse() : basic functionality ***
-array(6) {
- [0]=>
- float(13.33)
- [1]=>
- int(10)
- [2]=>
- string(4) "blue"
- [3]=>
- string(3) "red"
- [4]=>
- string(5) "green"
- [5]=>
- string(1) "a"
-}
-array(6) {
- [5]=>
- float(13.33)
- [4]=>
- int(10)
- [3]=>
- string(4) "blue"
- [2]=>
- string(3) "red"
- [1]=>
- string(5) "green"
- [0]=>
- string(1) "a"
-}
-array(6) {
- [0]=>
- float(13.33)
- [1]=>
- int(10)
- [2]=>
- string(4) "blue"
- [3]=>
- string(3) "red"
- [4]=>
- string(5) "green"
- [5]=>
- string(1) "a"
-}
-Done
---UEXPECTF--
-*** Testing array_reverse() : basic functionality ***
array(6) {
[0]=>
float(13.33)
?>
--EXPECTF--
*** Testing array_reverse() : basic functionality ***
-array(4) {
- [0]=>
- float(13.33)
- ["string"]=>
- string(4) "blue"
- [1]=>
- string(6) "number"
- ["a"]=>
- string(5) "hello"
-}
-array(4) {
- [10]=>
- float(13.33)
- ["string"]=>
- string(4) "blue"
- [123]=>
- string(6) "number"
- ["a"]=>
- string(5) "hello"
-}
-array(4) {
- [0]=>
- float(13.33)
- ["string"]=>
- string(4) "blue"
- [1]=>
- string(6) "number"
- ["a"]=>
- string(5) "hello"
-}
-Done
---UEXPECTF--
-*** Testing array_reverse() : basic functionality ***
array(4) {
[0]=>
float(13.33)
Warning: array_reverse() expects at most 2 parameters, 3 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_reverse() : error conditions ***
-
--- Testing array_reverse() function with Zero arguments --
-
-Warning: array_reverse() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing array_diff() function with more than expected no. of arguments --
-
-Warning: array_reverse() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-
-Warning: array_reverse() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-Done
\ No newline at end of file
Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
--- Iteration 16 --
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 23 --
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_reverse() : usage variations - unexpected values for 'array' argument ***
-
--- Iteration 1 --
-Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
-- Iteration 16 --
Warning: array_reverse() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
--EXPECTF--
*** Testing array_reverse() : usage variations ***
-- Iteration 1 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 2 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 3 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 4 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 5 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 6 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 7 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 8 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 9 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 10 --
-
-Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d
-NULL
--- Iteration 15 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 16 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 17 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 18 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 19 --
-array(6) {
- [4]=>
- string(4) "pink"
- [3]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [1]=>
- string(4) "blue"
- [0]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 20 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 21 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 22 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 23 --
-
-Warning: array_reverse() expects parameter 2 to be boolean, object given in %s on line %d
-NULL
--- Iteration 24 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 25 --
-array(6) {
- [0]=>
- string(4) "pink"
- [1]=>
- string(6) "orange"
- [2]=>
- string(3) "red"
- [3]=>
- string(4) "blue"
- [4]=>
- string(3) "red"
- ["a"]=>
- string(5) "green"
-}
--- Iteration 26 --
-
-Warning: array_reverse() expects parameter 2 to be boolean, resource given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_reverse() : usage variations ***
--- Iteration 1 --
array(6) {
[0]=>
unicode(4) "pink"
echo "Done";
?>
---EXPECTF--
-*** Testing array_reverse() : usage variations ***
--- Iteration 1 --
-- with default argument -
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(1)
-}
-- with $preserve keys = true -
-array(2) {
- [1]=>
- int(2)
- [0]=>
- int(1)
-}
-- with $preserve_keys = false -
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(1)
-}
--- Iteration 2 --
-- with default argument -
-array(2) {
- [0]=>
- float(2.2)
- [1]=>
- float(1.1)
-}
-- with $preserve keys = true -
-array(2) {
- [1]=>
- float(2.2)
- [0]=>
- float(1.1)
-}
-- with $preserve_keys = false -
-array(2) {
- [0]=>
- float(2.2)
- [1]=>
- float(1.1)
-}
--- Iteration 3 --
-- with default argument -
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-- with $preserve keys = true -
-array(2) {
- [1]=>
- array(1) {
- [0]=>
- int(1)
- }
- [0]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
-- with $preserve_keys = false -
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
-}
--- Iteration 4 --
-- with default argument -
-array(2) {
- [0]=>
- bool(true)
- [1]=>
- bool(false)
-}
-- with $preserve keys = true -
-array(2) {
- [1]=>
- bool(true)
- [0]=>
- bool(false)
-}
-- with $preserve_keys = false -
-array(2) {
- [0]=>
- bool(true)
- [1]=>
- bool(false)
-}
--- Iteration 5 --
-- with default argument -
-array(0) {
-}
-- with $preserve keys = true -
-array(0) {
-}
-- with $preserve_keys = false -
-array(0) {
-}
--- Iteration 6 --
-- with default argument -
-array(1) {
- [0]=>
- NULL
-}
-- with $preserve keys = true -
-array(1) {
- [0]=>
- NULL
-}
-- with $preserve_keys = false -
-array(1) {
- [0]=>
- NULL
-}
--- Iteration 7 --
-- with default argument -
-array(6) {
- [0]=>
- string(5) "ccccc"
- [1]=>
- string(1) "c"
- [2]=>
- string(4) "bbbb"
- [3]=>
- string(1) "b"
- [4]=>
- string(4) "aaaa"
- [5]=>
- string(1) "a"
-}
-- with $preserve keys = true -
-array(6) {
- [5]=>
- string(5) "ccccc"
- [4]=>
- string(1) "c"
- [3]=>
- string(4) "bbbb"
- [2]=>
- string(1) "b"
- [1]=>
- string(4) "aaaa"
- [0]=>
- string(1) "a"
-}
-- with $preserve_keys = false -
-array(6) {
- [0]=>
- string(5) "ccccc"
- [1]=>
- string(1) "c"
- [2]=>
- string(4) "bbbb"
- [3]=>
- string(1) "b"
- [4]=>
- string(4) "aaaa"
- [5]=>
- string(1) "a"
-}
--- Iteration 8 --
-- with default argument -
-array(3) {
- [0]=>
- string(5) "three"
- [1]=>
- string(3) "two"
- [2]=>
- string(3) "one"
-}
-- with $preserve keys = true -
-array(3) {
- [3]=>
- string(5) "three"
- [2]=>
- string(3) "two"
- [1]=>
- string(3) "one"
-}
-- with $preserve_keys = false -
-array(3) {
- [0]=>
- string(5) "three"
- [1]=>
- string(3) "two"
- [2]=>
- string(3) "one"
-}
--- Iteration 9 --
-- with default argument -
-array(3) {
- ["three"]=>
- int(3)
- ["two"]=>
- int(2)
- ["one"]=>
- int(1)
-}
-- with $preserve keys = true -
-array(3) {
- ["three"]=>
- int(3)
- ["two"]=>
- int(2)
- ["one"]=>
- int(1)
-}
-- with $preserve_keys = false -
-array(3) {
- ["three"]=>
- int(3)
- ["two"]=>
- int(2)
- ["one"]=>
- int(1)
-}
--- Iteration 10 --
-- with default argument -
-array(4) {
- [0]=>
- int(30)
- [1]=>
- int(40)
- [2]=>
- int(20)
- [3]=>
- int(10)
-}
-- with $preserve keys = true -
-array(4) {
- [3]=>
- int(30)
- [4]=>
- int(40)
- [2]=>
- int(20)
- [1]=>
- int(10)
-}
-- with $preserve_keys = false -
-array(4) {
- [0]=>
- int(30)
- [1]=>
- int(40)
- [2]=>
- int(20)
- [3]=>
- int(10)
-}
--- Iteration 11 --
-- with default argument -
-array(3) {
- ["three"]=>
- string(6) "thirty"
- ["two"]=>
- string(6) "twenty"
- ["one"]=>
- string(3) "ten"
-}
-- with $preserve keys = true -
-array(3) {
- ["three"]=>
- string(6) "thirty"
- ["two"]=>
- string(6) "twenty"
- ["one"]=>
- string(3) "ten"
-}
-- with $preserve_keys = false -
-array(3) {
- ["three"]=>
- string(6) "thirty"
- ["two"]=>
- string(6) "twenty"
- ["one"]=>
- string(3) "ten"
-}
--- Iteration 12 --
-- with default argument -
-array(3) {
- [0]=>
- string(4) "four"
- [1]=>
- string(3) "two"
- ["one"]=>
- int(1)
-}
-- with $preserve keys = true -
-array(3) {
- [4]=>
- string(4) "four"
- [2]=>
- string(3) "two"
- ["one"]=>
- int(1)
-}
-- with $preserve_keys = false -
-array(3) {
- [0]=>
- string(4) "four"
- [1]=>
- string(3) "two"
- ["one"]=>
- int(1)
-}
--- Iteration 13 --
-- with default argument -
-array(3) {
- ["null"]=>
- NULL
- ["NULL"]=>
- NULL
- [""]=>
- string(4) "null"
-}
-- with $preserve keys = true -
-array(3) {
- ["null"]=>
- NULL
- ["NULL"]=>
- NULL
- [""]=>
- string(4) "null"
-}
-- with $preserve_keys = false -
-array(3) {
- ["null"]=>
- NULL
- ["NULL"]=>
- NULL
- [""]=>
- string(4) "null"
-}
--- Iteration 14 --
-- with default argument -
-array(4) {
- ["true"]=>
- bool(true)
- ["false"]=>
- bool(false)
- [0]=>
- string(5) "false"
- [1]=>
- string(4) "true"
-}
-- with $preserve keys = true -
-array(4) {
- ["true"]=>
- bool(true)
- ["false"]=>
- bool(false)
- [0]=>
- string(5) "false"
- [1]=>
- string(4) "true"
-}
-- with $preserve_keys = false -
-array(4) {
- ["true"]=>
- bool(true)
- ["false"]=>
- bool(false)
- [0]=>
- string(5) "false"
- [1]=>
- string(4) "true"
-}
--- Iteration 15 --
-- with default argument -
-array(3) {
- ["emptys"]=>
- string(0) ""
- ["emptyd"]=>
- string(0) ""
- [""]=>
- string(6) "emptys"
-}
-- with $preserve keys = true -
-array(3) {
- ["emptys"]=>
- string(0) ""
- ["emptyd"]=>
- string(0) ""
- [""]=>
- string(6) "emptys"
-}
-- with $preserve_keys = false -
-array(3) {
- ["emptys"]=>
- string(0) ""
- ["emptyd"]=>
- string(0) ""
- [""]=>
- string(6) "emptys"
-}
--- Iteration 16 --
-- with default argument -
-array(6) {
- [0]=>
- bool(true)
- [1]=>
- bool(false)
- [2]=>
- NULL
- [3]=>
- NULL
- [4]=>
- string(0) ""
- [5]=>
- string(0) ""
-}
-- with $preserve keys = true -
-array(6) {
- [6]=>
- bool(true)
- [5]=>
- bool(false)
- [4]=>
- NULL
- [3]=>
- NULL
- [2]=>
- string(0) ""
- [1]=>
- string(0) ""
-}
-- with $preserve_keys = false -
-array(6) {
- [0]=>
- bool(true)
- [1]=>
- bool(false)
- [2]=>
- NULL
- [3]=>
- NULL
- [4]=>
- string(0) ""
- [5]=>
- string(0) ""
-}
--- Iteration 17 --
-- with default argument -
-array(3) {
- [0]=>
- int(6)
- [1]=>
- int(5)
- [""]=>
- int(4)
-}
-- with $preserve keys = true -
-array(3) {
- [1]=>
- int(6)
- [0]=>
- int(5)
- [""]=>
- int(4)
-}
-- with $preserve_keys = false -
-array(3) {
- [0]=>
- int(6)
- [1]=>
- int(5)
- [""]=>
- int(4)
-}
--- Iteration 18 --
-- with default argument -
-array(3) {
- ["three"]=>
- int(3)
- ["two"]=>
- int(20)
- ["One"]=>
- int(10)
-}
-- with $preserve keys = true -
-array(3) {
- ["three"]=>
- int(3)
- ["two"]=>
- int(20)
- ["One"]=>
- int(10)
-}
-- with $preserve_keys = false -
-array(3) {
- ["three"]=>
- int(3)
- ["two"]=>
- int(20)
- ["One"]=>
- int(10)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_reverse() : usage variations ***
-- Iteration 1 --
- with default argument -
Warning: Illegal offset type in %s on line %d
-Warning: Illegal offset type in %s on line %d
--- Iteration 1 --
-- default argument -
-array(0) {
-}
-- $preserve keys = true -
-array(0) {
-}
-- $preserve_keys = false -
-array(0) {
-}
--- Iteration 2 --
-- default argument -
-array(1) {
- [0]=>
- string(1) "0"
-}
-- $preserve keys = true -
-array(1) {
- [0]=>
- string(1) "0"
-}
-- $preserve_keys = false -
-array(1) {
- [0]=>
- string(1) "0"
-}
--- Iteration 3 --
-- default argument -
-array(1) {
- [0]=>
- string(1) "1"
-}
-- $preserve keys = true -
-array(1) {
- [1]=>
- string(1) "1"
-}
-- $preserve_keys = false -
-array(1) {
- [0]=>
- string(1) "1"
-}
--- Iteration 4 --
-- default argument -
-array(4) {
- [0]=>
- string(1) "4"
- [1]=>
- string(1) "3"
- [2]=>
- string(1) "2"
- [3]=>
- string(1) "1"
-}
-- $preserve keys = true -
-array(4) {
- [4]=>
- string(1) "4"
- [3]=>
- string(1) "3"
- [2]=>
- string(1) "2"
- [1]=>
- string(1) "1"
-}
-- $preserve_keys = false -
-array(4) {
- [0]=>
- string(1) "4"
- [1]=>
- string(1) "3"
- [2]=>
- string(1) "2"
- [3]=>
- string(1) "1"
-}
--- Iteration 5 --
-- default argument -
-array(1) {
- [0]=>
- string(5) "float"
-}
-- $preserve keys = true -
-array(1) {
- [2]=>
- string(5) "float"
-}
-- $preserve_keys = false -
-array(1) {
- [0]=>
- string(5) "float"
-}
--- Iteration 6 --
-- default argument -
-array(4) {
- [0]=>
- string(2) "f4"
- [1]=>
- string(2) "f3"
- [2]=>
- string(2) "f2"
- [3]=>
- string(2) "f1"
-}
-- $preserve keys = true -
-array(4) {
- [33333333]=>
- string(2) "f4"
- [4]=>
- string(2) "f3"
- [3]=>
- string(2) "f2"
- [1]=>
- string(2) "f1"
-}
-- $preserve_keys = false -
-array(4) {
- [0]=>
- string(2) "f4"
- [1]=>
- string(2) "f3"
- [2]=>
- string(2) "f2"
- [3]=>
- string(2) "f1"
-}
--- Iteration 7 --
-- default argument -
-array(4) {
- ["pen
-"]=>
- int(33)
- ["\v\fworld"]=>
- float(2.2)
- ["re d"]=>
- string(5) "color"
- [" Hello"]=>
- int(111)
-}
-- $preserve keys = true -
-array(4) {
- ["pen
-"]=>
- int(33)
- ["\v\fworld"]=>
- float(2.2)
- ["re d"]=>
- string(5) "color"
- [" Hello"]=>
- int(111)
-}
-- $preserve_keys = false -
-array(4) {
- ["pen
-"]=>
- int(33)
- ["\v\fworld"]=>
- float(2.2)
- ["re d"]=>
- string(5) "color"
- [" Hello"]=>
- int(111)
-}
--- Iteration 8 --
-- default argument -
-array(4) {
- ["pen
-"]=>
- int(33)
- ["\v\fworld"]=>
- float(2.2)
- ["re d"]=>
- string(5) "color"
- [" Hello"]=>
- int(111)
-}
-- $preserve keys = true -
-array(4) {
- ["pen
-"]=>
- int(33)
- ["\v\fworld"]=>
- float(2.2)
- ["re d"]=>
- string(5) "color"
- [" Hello"]=>
- int(111)
-}
-- $preserve_keys = false -
-array(4) {
- ["pen
-"]=>
- int(33)
- ["\v\fworld"]=>
- float(2.2)
- ["re d"]=>
- string(5) "color"
- [" Hello"]=>
- int(111)
-}
--- Iteration 9 --
-- default argument -
-array(2) {
- ["Hello world"]=>
- string(6) "string"
- [0]=>
- string(5) "hello"
-}
-- $preserve keys = true -
-array(2) {
- ["Hello world"]=>
- string(6) "string"
- [0]=>
- string(5) "hello"
-}
-- $preserve_keys = false -
-array(2) {
- ["Hello world"]=>
- string(6) "string"
- [0]=>
- string(5) "hello"
-}
--- Iteration 10 --
-- default argument -
-array(1) {
- [""]=>
- string(5) "hello"
-}
-- $preserve keys = true -
-array(1) {
- [""]=>
- string(5) "hello"
-}
-- $preserve_keys = false -
-array(1) {
- [""]=>
- string(5) "hello"
-}
--- Iteration 11 --
-- default argument -
-array(6) {
- ["Hello world"]=>
- string(7) "heredoc"
- [""]=>
- string(5) "unset"
- [0]=>
- string(5) "float"
- [1]=>
- string(3) "int"
- ["fruit"]=>
- float(2.2)
- ["hello"]=>
- int(1)
-}
-- $preserve keys = true -
-array(6) {
- ["Hello world"]=>
- string(7) "heredoc"
- [""]=>
- string(5) "unset"
- [444]=>
- string(5) "float"
- [133]=>
- string(3) "int"
- ["fruit"]=>
- float(2.2)
- ["hello"]=>
- int(1)
-}
-- $preserve_keys = false -
-array(6) {
- ["Hello world"]=>
- string(7) "heredoc"
- [""]=>
- string(5) "unset"
- [0]=>
- string(5) "float"
- [1]=>
- string(3) "int"
- ["fruit"]=>
- float(2.2)
- ["hello"]=>
- int(1)
-}
-Done
---UEXPECTF--
-*** Testing array_reverse() : usage variations ***
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
Warning: Illegal offset type in %s on line %d
-- Iteration 1 --
- default argument -
}
-- Iteration 4 --
- default argument -
-array(4) {
- [0]=>
- int(4)
- ["three"]=>
- int(3)
- ["two"]=>
- int(2)
- ["one"]=>
- int(1)
-}
-- $preserve keys = true -
-array(4) {
- [4]=>
- int(4)
- ["three"]=>
- int(3)
- ["two"]=>
- int(2)
- ["one"]=>
- int(1)
-}
-- $preserve_keys = false -
-array(4) {
- [0]=>
- int(4)
- ["three"]=>
- int(3)
- ["two"]=>
- int(2)
- ["one"]=>
- int(1)
-}
--- Iteration 5 --
-- default argument -
-array(1) {
- ["float"]=>
- float(2.3333)
-}
-- $preserve keys = true -
-array(1) {
- ["float"]=>
- float(2.3333)
-}
-- $preserve_keys = false -
-array(1) {
- ["float"]=>
- float(2.3333)
-}
--- Iteration 6 --
-- default argument -
-array(4) {
- ["f4"]=>
- float(33333333.3333)
- [0]=>
- float(4.8999992284)
- ["f2"]=>
- float(3.33)
- ["f1"]=>
- float(1.2)
-}
-- $preserve keys = true -
-array(4) {
- ["f4"]=>
- float(33333333.3333)
- [3]=>
- float(4.8999992284)
- ["f2"]=>
- float(3.33)
- ["f1"]=>
- float(1.2)
-}
-- $preserve_keys = false -
-array(4) {
- ["f4"]=>
- float(33333333.3333)
- [0]=>
- float(4.8999992284)
- ["f2"]=>
- float(3.33)
- ["f1"]=>
- float(1.2)
-}
--- Iteration 7 --
-- default argument -
-array(4) {
- [0]=>
- string(4) "pen
-"
- [1]=>
- string(7) "\v\fworld"
- ["red"]=>
- string(6) "col or"
- [2]=>
- string(6) " Hello"
-}
-- $preserve keys = true -
-array(4) {
- [3]=>
- string(4) "pen
-"
- [2]=>
- string(7) "\v\fworld"
- ["red"]=>
- string(6) "col or"
- [111]=>
- string(6) " Hello"
-}
-- $preserve_keys = false -
-array(4) {
- [0]=>
- string(4) "pen
-"
- [1]=>
- string(7) "\v\fworld"
- ["red"]=>
- string(6) "col or"
- [2]=>
- string(6) " Hello"
-}
--- Iteration 8 --
-- default argument -
-array(4) {
- [0]=>
- string(5) "pen\n"
- [1]=>
- string(9) "\v\fworld"
- ["red"]=>
- string(7) "col\tor"
- [2]=>
- string(7) "\tHello"
-}
-- $preserve keys = true -
-array(4) {
- [3]=>
- string(5) "pen\n"
- [2]=>
- string(9) "\v\fworld"
- ["red"]=>
- string(7) "col\tor"
- [111]=>
- string(7) "\tHello"
-}
-- $preserve_keys = false -
-array(4) {
- [0]=>
- string(5) "pen\n"
- [1]=>
- string(9) "\v\fworld"
- ["red"]=>
- string(7) "col\tor"
- [2]=>
- string(7) "\tHello"
-}
--- Iteration 9 --
-- default argument -
-array(2) {
- ["heredoc"]=>
- string(11) "Hello world"
- [0]=>
- string(5) "hello"
-}
-- $preserve keys = true -
-array(2) {
- ["heredoc"]=>
- string(11) "Hello world"
- [1]=>
- string(5) "hello"
-}
-- $preserve_keys = false -
-array(2) {
- ["heredoc"]=>
- string(11) "Hello world"
- [0]=>
- string(5) "hello"
-}
--- Iteration 10 --
-- default argument -
-array(3) {
- ["resource"]=>
- resource(%d) of type (stream)
- ["unset"]=>
- NULL
- [0]=>
- object(classA)#%d (0) {
- }
-}
-- $preserve keys = true -
-array(3) {
- ["resource"]=>
- resource(%d) of type (stream)
- ["unset"]=>
- NULL
- [11]=>
- object(classA)#%d (0) {
- }
-}
-- $preserve_keys = false -
-array(3) {
- ["resource"]=>
- resource(%d) of type (stream)
- ["unset"]=>
- NULL
- [0]=>
- object(classA)#%d (0) {
- }
-}
--- Iteration 11 --
-- default argument -
-array(8) {
- ["heredoc"]=>
- string(11) "Hello world"
- ["unset"]=>
- NULL
- ["float"]=>
- float(444.432)
- ["int"]=>
- int(133)
- ["resource"]=>
- resource(%d) of type (stream)
- [0]=>
- string(5) "fruit"
- [1]=>
- object(classA)#%d (0) {
- }
- [2]=>
- string(5) "hello"
-}
-- $preserve keys = true -
-array(8) {
- ["heredoc"]=>
- string(11) "Hello world"
- ["unset"]=>
- NULL
- ["float"]=>
- float(444.432)
- ["int"]=>
- int(133)
- ["resource"]=>
- resource(%d) of type (stream)
- [222]=>
- string(5) "fruit"
- [2]=>
- object(classA)#%d (0) {
- }
- [1]=>
- string(5) "hello"
-}
-- $preserve_keys = false -
-array(8) {
- ["heredoc"]=>
- string(11) "Hello world"
- ["unset"]=>
- NULL
- ["float"]=>
- float(444.432)
- ["int"]=>
- int(133)
- ["resource"]=>
- resource(%d) of type (stream)
- [0]=>
- string(5) "fruit"
- [1]=>
- object(classA)#%d (0) {
- }
- [2]=>
- string(5) "hello"
-}
-Done
---UEXPECTF--
-*** Testing array_reverse() : usage variations ***
--- Iteration 1 --
-- default argument -
-array(0) {
-}
-- $preserve keys = true -
-array(0) {
-}
-- $preserve_keys = false -
-array(0) {
-}
--- Iteration 2 --
-- default argument -
-array(1) {
- [0]=>
- int(0)
-}
-- $preserve keys = true -
-array(1) {
- [0]=>
- int(0)
-}
-- $preserve_keys = false -
-array(1) {
- [0]=>
- int(0)
-}
--- Iteration 3 --
-- default argument -
-array(1) {
- [0]=>
- int(1)
-}
-- $preserve keys = true -
-array(1) {
- [1]=>
- int(1)
-}
-- $preserve_keys = false -
-array(1) {
- [0]=>
- int(1)
-}
--- Iteration 4 --
-- default argument -
array(4) {
[0]=>
int(4)
echo "Done";
?>
---EXPECTF--
-*** Testing array_reverse() : usage variations ***
--- with default argument --
-array(3) {
- [0]=>
- array(7) {
- ["a"]=>
- string(5) "green"
- [0]=>
- string(3) "red"
- [1]=>
- string(5) "brown"
- [2]=>
- int(33)
- [3]=>
- int(88)
- [4]=>
- string(6) "orange"
- ["item"]=>
- string(4) "ball"
- }
- [1]=>
- array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- }
- [2]=>
- array(3) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- ["place"]=>
- string(2) "LA"
- }
-}
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(4)
- [2]=>
- int(3)
- [3]=>
- int(2)
- [4]=>
- int(1)
-}
--- with all possible arguments --
-array(3) {
- [2]=>
- array(7) {
- ["a"]=>
- string(5) "green"
- [0]=>
- string(3) "red"
- [1]=>
- string(5) "brown"
- [2]=>
- int(33)
- [3]=>
- int(88)
- [4]=>
- string(6) "orange"
- ["item"]=>
- string(4) "ball"
- }
- [1]=>
- array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- }
- [0]=>
- array(3) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- ["place"]=>
- string(2) "LA"
- }
-}
-array(3) {
- [0]=>
- array(7) {
- ["a"]=>
- string(5) "green"
- [0]=>
- string(3) "red"
- [1]=>
- string(5) "brown"
- [2]=>
- int(33)
- [3]=>
- int(88)
- [4]=>
- string(6) "orange"
- ["item"]=>
- string(4) "ball"
- }
- [1]=>
- array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- }
- [2]=>
- array(3) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- ["place"]=>
- string(2) "LA"
- }
-}
-array(5) {
- [4]=>
- int(5)
- [3]=>
- int(4)
- [2]=>
- int(3)
- [1]=>
- int(2)
- [0]=>
- int(1)
-}
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(4)
- [2]=>
- int(3)
- [3]=>
- int(2)
- [4]=>
- int(1)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_reverse() : usage variations ***
-- with default argument --
array(3) {
echo "Done\n";
?>
---EXPECTF--
-Warning: array_search() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: array_search() expects parameter 2 to be array, integer given in %s on line %d
-NULL
-int(1)
-bool(false)
-int(1)
-int(1)
-int(2)
-string(1) "c"
-int(1)
-bool(false)
-Done
---UEXPECTF--
+--EXPECTF--
Warning: array_search() expects at least 2 parameters, 1 given in %s on line %d
NULL
Warning: array_search() expects at least 2 parameters, 1 given in %s on line %d
NULL
-Warning: array_search() expects parameter 2 to be array, string given in %s on line %d
-NULL
-
-Warning: array_search() expects parameter 2 to be array, integer given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing error conditions of array_search() ***
-
-Warning: array_search() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_search() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
-Warning: array_search() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
Warning: array_search() expects parameter 2 to be array, Unicode string given in %s on line %d
NULL
echo "Done\n";
?>
---EXPECTF--
-*** Testing array_search() with different needle values ***
--- 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 --
-int(0)
-bool(false)
-int(0)
--- 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 --
-int(0)
-bool(false)
-int(0)
--- Iteration 11 --
-int(0)
-bool(false)
-int(0)
--- Iteration 12 --
-bool(false)
-bool(false)
-bool(false)
--- Iteration 13 --
-int(0)
-bool(false)
-int(0)
--- Iteration 14 --
-int(0)
-bool(false)
-int(0)
--- Iteration 15 --
-int(0)
-bool(false)
-int(0)
--- Iteration 16 --
-int(0)
-bool(false)
-int(0)
--- Iteration 17 --
-int(0)
-int(0)
-int(0)
--- Iteration 18 --
-int(0)
-bool(false)
-int(0)
--- Iteration 19 --
-int(4)
-int(4)
-int(4)
--- Iteration 20 --
-int(4)
-bool(false)
-int(4)
--- Iteration 21 --
-int(4)
-bool(false)
-int(4)
--- Iteration 22 --
-int(5)
-int(5)
-int(5)
--- 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 --
-string(0) ""
-bool(false)
-string(0) ""
--- Iteration 30 --
-string(0) ""
-bool(false)
-string(0) ""
--- Iteration 31 --
-string(0) ""
-string(0) ""
-string(0) ""
--- Iteration 32 --
-int(6)
-int(6)
-int(6)
--- Iteration 33 --
-int(7)
-int(7)
-int(7)
--- Iteration 34 --
-string(1) "a"
-bool(false)
-string(1) "a"
--- Iteration 35 --
-string(1) "a"
-bool(false)
-string(1) "a"
--- Iteration 36 --
-bool(false)
-bool(false)
-bool(false)
--- Iteration 37 --
-int(0)
-int(0)
-int(0)
--- Iteration 38 --
-int(0)
-bool(false)
-int(0)
--- Iteration 39 --
-int(0)
-bool(false)
-int(0)
--- Iteration 40 --
-bool(false)
-bool(false)
-bool(false)
--- Iteration 41 --
-int(5)
-bool(false)
-int(5)
--- 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 --
-int(1)
-int(1)
-int(1)
--- Iteration 61 --
-int(1)
-bool(false)
-int(1)
--- Iteration 62 --
-bool(false)
-bool(false)
-bool(false)
--- Iteration 63 --
-string(3) "-.9"
-bool(false)
-string(3) "-.9"
--- 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 --
-int(2)
-bool(false)
-int(2)
--- Iteration 71 --
-int(2)
-bool(false)
-int(2)
--- Iteration 72 --
-bool(false)
-bool(false)
-bool(false)
--- Iteration 73 --
-int(0)
-bool(false)
-int(0)
--- Iteration 74 --
-int(0)
-bool(false)
-int(0)
--- Iteration 75 --
-int(0)
-bool(false)
-int(0)
--- Iteration 76 --
-int(0)
-bool(false)
-int(0)
--- Iteration 77 --
-int(0)
-bool(false)
-int(0)
--- Iteration 78 --
-int(0)
-bool(false)
-int(0)
--- Iteration 79 --
-int(0)
-bool(false)
-int(0)
--- Iteration 80 --
-int(0)
-bool(false)
-int(0)
--- Iteration 81 --
-int(0)
-bool(false)
-int(0)
--- Iteration 82 --
-int(0)
-bool(false)
-int(0)
--- Iteration 83 --
-int(1)
-bool(false)
-int(1)
--- Iteration 84 --
-int(1)
-bool(false)
-int(1)
--- Iteration 85 --
-int(1)
-bool(false)
-int(1)
--- Iteration 86 --
-int(0)
-bool(false)
-int(0)
--- Iteration 87 --
-int(0)
-bool(false)
-int(0)
--- Iteration 88 --
-int(1)
-bool(false)
-int(1)
--- Iteration 89 --
-int(1)
-bool(false)
-int(1)
--- Iteration 90 --
-int(0)
-bool(false)
-int(0)
--- 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 --
-int(0)
-int(0)
-int(0)
--- Iteration 102 --
-int(1)
-int(1)
-int(1)
--- Iteration 103 --
-int(0)
-bool(false)
-int(0)
--- Iteration 104 --
-bool(false)
-bool(false)
-bool(false)
--- Iteration 105 --
-bool(false)
-bool(false)
-bool(false)
--- Iteration 106 --
-int(0)
-bool(false)
-int(0)
--- Iteration 107 --
-int(0)
-bool(false)
-int(0)
--- 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 --
-int(0)
-bool(false)
-int(0)
--- Iteration 125 --
-int(0)
-bool(false)
-int(0)
--- Iteration 126 --
-int(0)
-int(0)
-int(0)
--- 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 --
-int(0)
-bool(false)
-int(0)
--- Iteration 143 --
-int(0)
-bool(false)
-int(0)
--- Iteration 144 --
-bool(false)
-bool(false)
-bool(false)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_search() with different needle values ***
-- Iteration 1 --
bool(false)
echo "Done\n";
?>
---EXPECTF--
-*** Testing array_search() with different haystack values ***
--- Iteration 1 --
-int(0)
-int(3)
-int(0)
--- Iteration 2 --
-string(1) "y"
-int(4)
-string(1) "y"
--- Iteration 3 --
-int(3)
-bool(false)
-int(3)
--- Iteration 4 --
-string(3) "key"
-int(2)
-string(3) "key"
--- Iteration 5 --
-int(3)
-bool(false)
-int(3)
--- Iteration 6 --
-int(3)
-bool(false)
-int(3)
--- Iteration 7 --
-int(2)
-bool(false)
-int(2)
--- Iteration 8 --
-int(3)
-bool(false)
-int(3)
--- Iteration 9 --
-string(1) "y"
-string(1) "y"
-string(1) "y"
--- Iteration 10 --
-string(1) "y"
-bool(false)
-string(1) "y"
--- Iteration 11 --
-int(2)
-bool(false)
-int(2)
--- Iteration 12 --
-string(1) "y"
-string(0) ""
-string(1) "y"
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_search() with different haystack values ***
-- Iteration 1 --
int(0)
--EXPECTF--
*** Testing sub-arrays with array_search() ***
int(4)
-string(5) "three"
-int(5)
-
-*** Testing objects with array_search() ***
-
-Warning: array_search() expects parameter 2 to be array, object given in %s on line %d
-NULL
-
-Warning: array_search() expects parameter 2 to be array, object given in %s on line %d
-NULL
-int(1)
-Done
---UEXPECTF--
-*** Testing sub-arrays with array_search() ***
-int(4)
unicode(5) "three"
int(5)
echo "Done\n";
?>
---EXPECTF--
-*** Testing resource type with array_search() ***
-int(0)
-bool(false)
-
-*** Testing miscelleneos inputs with array_search() ***
-int(0)
-bool(false)
-int(0)
-int(0)
-bool(true)
-int(0)
-bool(false)
-bool(false)
-int(0)
-bool(false)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing resource type with array_search() ***
int(0)
bool(false)
echo "Done";
?>
---EXPECTF--
-*** Testing array_shift() : basic functionality ***
-
--- Before shift: --
-array(4) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [3]=>
- string(5) "three"
- ["four"]=>
- int(4)
-}
-
--- After shift: --
-Returned value: string(4) "zero"
-New array:
-array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(5) "three"
- ["four"]=>
- int(4)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_shift() : basic functionality ***
-- Before shift: --
[u"four"]=>
int(4)
}
-Done
\ No newline at end of file
+Done
Warning: array_shift() expects exactly 1 parameter, 2 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_shift() : error conditions ***
-
--- Testing array_shift() function with Zero arguments --
-
-Warning: array_shift() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing array_shift() function with more than expected no. of arguments --
-
-Warning: array_shift() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-Done
\ No newline at end of file
-- Iteration 16 --
-Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_shift() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_shift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_shift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_shift() expects parameter 1 to be array, resource given in %s on line 85
-NULL
-Done
---UEXPECTF--
-*** Testing array_shift() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_shift() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_shift() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_shift() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_shift() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_shift() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_shift() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_shift() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_shift() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_shift() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_shift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_shift() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_shift() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_shift() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_shift() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_shift() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 16 --
-
Warning: array_shift() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
Warning: array_shift() expects parameter 1 to be array, resource given in %s on line %d
NULL
-Done
\ No newline at end of file
+Done
bool(false)
}
--- Iteration 5: empty string data --
-string(0) ""
-array(1) {
- [0]=>
- string(0) ""
-}
-
--- Iteration 6: empty array data --
-NULL
-array(0) {
-}
-
--- Iteration 7: string data --
-string(6) "string"
-array(2) {
- [0]=>
- string(6) "string"
- [1]=>
- string(11) "hello world"
-}
-
--- Iteration 8: object data --
-object(classA)#%d (0) {
-}
-array(0) {
-}
-
--- Iteration 9: undefined data --
-NULL
-array(0) {
-}
-
--- Iteration 10: unset data --
-NULL
-array(0) {
-}
-
--- Iteration 11: resource data --
-resource(%d) of type (stream)
-array(0) {
-}
-Done
---UEXPECTF--
-*** Testing array_shift() : usage variations ***
-
--- Iteration 1: int data --
-int(0)
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(12345)
- [2]=>
- int(-2345)
-}
-
--- Iteration 2: float data --
-float(10.5)
-array(4) {
- [0]=>
- float(-10.5)
- [1]=>
- float(123456789000)
- [2]=>
- float(1.23456789E-9)
- [3]=>
- float(0.5)
-}
-
--- Iteration 3: null data --
-NULL
-array(1) {
- [0]=>
- NULL
-}
-
--- Iteration 4: bool data --
-bool(true)
-array(3) {
- [0]=>
- bool(false)
- [1]=>
- bool(true)
- [2]=>
- bool(false)
-}
-
-- Iteration 5: empty string data --
unicode(0) ""
array(1) {
resource(%d) of type (stream)
array(0) {
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_shift() : usage variations ***
-
--- Iteration 1 : int data --
-string(4) "zero"
-array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(8) "positive"
- [2]=>
- string(8) "negative"
-}
-
--- Iteration 2 : float data --
-string(8) "positive"
-array(2) {
- [0]=>
- string(8) "negative"
- [1]=>
- string(4) "half"
-}
-
--- Iteration 3 : extreme floats data --
-string(5) "large"
-array(1) {
- [0]=>
- string(5) "small"
-}
-
--- Iteration 4 : null uppercase data --
-string(6) "null 1"
-array(0) {
-}
-
--- Iteration 5 : null lowercase data --
-string(6) "null 2"
-array(0) {
-}
-
--- Iteration 6 : bool lowercase data --
-string(6) "lowert"
-array(1) {
- [0]=>
- string(6) "lowerf"
-}
-
--- Iteration 7 : bool uppercase data --
-string(6) "uppert"
-array(1) {
- [0]=>
- string(6) "upperf"
-}
-
--- Iteration 8 : empty double quotes data --
-string(6) "emptyd"
-array(0) {
-}
-
--- Iteration 9 : empty single quotes data --
-string(6) "emptys"
-array(0) {
-}
-
--- Iteration 10 : string data --
-string(7) "stringd"
-array(2) {
- ["strings"]=>
- string(7) "strings"
- ["hello world"]=>
- string(7) "stringh"
-}
-
--- Iteration 11 : undefined data --
-string(9) "undefined"
-array(0) {
-}
-
--- Iteration 12 : unset data --
-string(5) "unset"
-array(0) {
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_shift() : usage variations ***
-- Iteration 1 : int data --
unicode(5) "unset"
array(0) {
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_shift() : usage variations ***
-
--- Before shift: --
----- $stack_first:
-array(3) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
-}
----- $stack_last:
-array(3) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-
--- After shift: --
----- Pop array from array:
-Returned value: array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-New array:
-array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
-}
----- Pop element from array within array:
-Returned value: int(1)
-New array:
-array(3) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_shift() : usage variations ***
-- Before shift: --
int(3)
}
}
-Done
\ No newline at end of file
+Done
Strict Standards: Only variables should be passed by reference in %s on line %d
-Strict Standards: Only variables should be passed by reference in %s on line %d
-string(4) "zero"
-
--- Correct Method: --
-string(4) "zero"
-Done
---UEXPECTF--
-*** Testing array_shift() : usage variations ***
-
--- Incorrect Method: --
-
-Strict Standards: Only variables should be passed by reference in %s on line %d
-
Strict Standards: Only variables should be passed by reference in %s on line %d
unicode(4) "zero"
-- Correct Method: --
unicode(4) "zero"
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_shift() : usage variations ***
-
--- Variable is referenced array --
-Result: string(4) "zero"
-
-$original_array:
-array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
-}
-
-$copied_array:
-array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
-}
-
--- Element is referenced array --
-Result: string(3) "one"
-
-$new_array:
-array(3) {
- [0]=>
- &array(1) {
- [0]=>
- string(3) "two"
- }
- [1]=>
- int(1)
- [2]=>
- string(3) "two"
-}
-
-$copied_array
-array(1) {
- [0]=>
- string(3) "two"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_shift() : usage variations ***
-- Variable is referenced array --
[0]=>
unicode(3) "two"
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_shift() : usage variations ***
-
--- Call array_shift() --
-string(2) "un"
-
--- Position of Internal Pointer in Passed Array: --
-two => deux
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_shift() : usage variations ***
-- Call array_shift() --
-- Position of Internal Pointer in Passed Array: --
two => deux
-Done
\ No newline at end of file
+Done
-- Reference first element before array_shift: --
a = 2, b = 2
Done
---UEXPECTF--
-*** Testing array_shift() : usage variations ***
-
--- Reference result of array_shift: --
-
-Strict Standards: Only variables should be assigned by reference in %s on line %d
-a = 1, b = 2
-
--- Reference first element before array_shift: --
-a = 2, b = 2
-Done
\ No newline at end of file
$bigarray = range(1, 400);
shuffle($bigarray);
echo "this should be 400->...." . count($bigarray) . "\n";
-echo "*** testing pass by reference \n";
+echo "*** testing pass by reference...\n";
$original = $bigarray;
shuffle($bigarray);
$diffarray = array_diff_assoc($original, $bigarray);
var_dump($original);
var_dump($bigarray);
} else {
- echo "test passed \n";
+ echo "test passed\n";
}
?>
--EXPECT--
this should be 0->....0
this should be 4->....4
this should be 400->....400
-*** testing pass by reference
-test passed
\ No newline at end of file
+*** testing pass by reference...
+test passed
*** Output for string Argument ***
-Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
-
-*** Iteration 1 ***
-
-*** Variation with first two Arguments ***
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Variation with first three Arguments ***
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Variation with first two arguments with preserve_key value TRUE ***
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Iteration 2 ***
-
-*** Variation with first two Arguments ***
-array(8) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- [2]=>
- int(4)
- [3]=>
- int(5)
- [4]=>
- int(6)
- [5]=>
- int(7)
- [6]=>
- int(8)
- [7]=>
- int(9)
-}
-array(9) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- [6]=>
- int(7)
- [7]=>
- int(8)
- [8]=>
- int(9)
-}
-array(2) {
- [0]=>
- int(8)
- [1]=>
- int(9)
-}
-
-*** Variation with first three Arguments ***
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- [2]=>
- int(4)
-}
-array(0) {
-}
-array(5) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- [2]=>
- int(4)
- [3]=>
- int(5)
- [4]=>
- int(6)
-}
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-array(0) {
-}
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
-}
-array(2) {
- [0]=>
- int(8)
- [1]=>
- int(9)
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Variation with first two arguments with preserve_key value TRUE ***
-array(3) {
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
-}
-array(0) {
-}
-array(5) {
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
-}
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-array(0) {
-}
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
-}
-array(2) {
- [7]=>
- int(8)
- [8]=>
- int(9)
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Iteration 3 ***
-
-*** Variation with first two Arguments ***
-array(4) {
- [0]=>
- string(3) "Two"
- [1]=>
- string(5) "Three"
- [2]=>
- string(4) "Four"
- [3]=>
- string(4) "Five"
-}
-array(5) {
- [0]=>
- string(3) "One"
- [1]=>
- string(3) "Two"
- [2]=>
- string(5) "Three"
- [3]=>
- string(4) "Four"
- [4]=>
- string(4) "Five"
-}
-array(2) {
- [0]=>
- string(4) "Four"
- [1]=>
- string(4) "Five"
-}
-
-*** Variation with first three Arguments ***
-array(3) {
- [0]=>
- string(3) "Two"
- [1]=>
- string(5) "Three"
- [2]=>
- string(4) "Four"
-}
-array(0) {
-}
-array(1) {
- [0]=>
- string(3) "Two"
-}
-array(3) {
- [0]=>
- string(3) "One"
- [1]=>
- string(3) "Two"
- [2]=>
- string(5) "Three"
-}
-array(0) {
-}
-array(2) {
- [0]=>
- string(3) "One"
- [1]=>
- string(3) "Two"
-}
-array(2) {
- [0]=>
- string(4) "Four"
- [1]=>
- string(4) "Five"
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Variation with first two arguments with preserve_key value TRUE ***
-array(3) {
- [1]=>
- string(3) "Two"
- [2]=>
- string(5) "Three"
- [3]=>
- string(4) "Four"
-}
-array(0) {
-}
-array(1) {
- [1]=>
- string(3) "Two"
-}
-array(3) {
- [0]=>
- string(3) "One"
- [1]=>
- string(3) "Two"
- [2]=>
- string(5) "Three"
-}
-array(0) {
-}
-array(2) {
- [0]=>
- string(3) "One"
- [1]=>
- string(3) "Two"
-}
-array(2) {
- [3]=>
- string(4) "Four"
- [4]=>
- string(4) "Five"
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Iteration 4 ***
-
-*** Variation with first two Arguments ***
-array(7) {
- [0]=>
- string(3) "six"
- [1]=>
- int(7)
- [2]=>
- string(5) "seven"
- [3]=>
- int(8)
- [4]=>
- string(5) "eight"
- [5]=>
- int(9)
- [6]=>
- string(4) "nine"
-}
-array(8) {
- [0]=>
- int(6)
- [1]=>
- string(3) "six"
- [2]=>
- int(7)
- [3]=>
- string(5) "seven"
- [4]=>
- int(8)
- [5]=>
- string(5) "eight"
- [6]=>
- int(9)
- [7]=>
- string(4) "nine"
-}
-array(2) {
- [0]=>
- int(9)
- [1]=>
- string(4) "nine"
-}
-
-*** Variation with first three Arguments ***
-array(3) {
- [0]=>
- string(3) "six"
- [1]=>
- int(7)
- [2]=>
- string(5) "seven"
-}
-array(0) {
-}
-array(4) {
- [0]=>
- string(3) "six"
- [1]=>
- int(7)
- [2]=>
- string(5) "seven"
- [3]=>
- int(8)
-}
-array(3) {
- [0]=>
- int(6)
- [1]=>
- string(3) "six"
- [2]=>
- int(7)
-}
-array(0) {
-}
-array(5) {
- [0]=>
- int(6)
- [1]=>
- string(3) "six"
- [2]=>
- int(7)
- [3]=>
- string(5) "seven"
- [4]=>
- int(8)
-}
-array(2) {
- [0]=>
- int(9)
- [1]=>
- string(4) "nine"
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Variation with first two arguments with preserve_key value TRUE ***
-array(3) {
- [1]=>
- string(3) "six"
- [2]=>
- int(7)
- [3]=>
- string(5) "seven"
-}
-array(0) {
-}
-array(4) {
- [1]=>
- string(3) "six"
- [2]=>
- int(7)
- [3]=>
- string(5) "seven"
- [4]=>
- int(8)
-}
-array(3) {
- [0]=>
- int(6)
- [1]=>
- string(3) "six"
- [2]=>
- int(7)
-}
-array(0) {
-}
-array(5) {
- [0]=>
- int(6)
- [1]=>
- string(3) "six"
- [2]=>
- int(7)
- [3]=>
- string(5) "seven"
- [4]=>
- int(8)
-}
-array(2) {
- [6]=>
- int(9)
- [7]=>
- string(4) "nine"
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Iteration 5 ***
-
-*** Variation with first two Arguments ***
-array(4) {
- ["A"]=>
- string(3) "AAA"
- ["c"]=>
- string(3) "ccc"
- ["d"]=>
- string(3) "ddd"
- ["e"]=>
- string(3) "eee"
-}
-array(5) {
- ["a"]=>
- string(3) "aaa"
- ["A"]=>
- string(3) "AAA"
- ["c"]=>
- string(3) "ccc"
- ["d"]=>
- string(3) "ddd"
- ["e"]=>
- string(3) "eee"
-}
-array(2) {
- ["d"]=>
- string(3) "ddd"
- ["e"]=>
- string(3) "eee"
-}
-
-*** Variation with first three Arguments ***
-array(3) {
- ["A"]=>
- string(3) "AAA"
- ["c"]=>
- string(3) "ccc"
- ["d"]=>
- string(3) "ddd"
-}
-array(0) {
-}
-array(1) {
- ["A"]=>
- string(3) "AAA"
-}
-array(3) {
- ["a"]=>
- string(3) "aaa"
- ["A"]=>
- string(3) "AAA"
- ["c"]=>
- string(3) "ccc"
-}
-array(0) {
-}
-array(2) {
- ["a"]=>
- string(3) "aaa"
- ["A"]=>
- string(3) "AAA"
-}
-array(2) {
- ["d"]=>
- string(3) "ddd"
- ["e"]=>
- string(3) "eee"
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Variation with first two arguments with preserve_key value TRUE ***
-array(3) {
- ["A"]=>
- string(3) "AAA"
- ["c"]=>
- string(3) "ccc"
- ["d"]=>
- string(3) "ddd"
-}
-array(0) {
-}
-array(1) {
- ["A"]=>
- string(3) "AAA"
-}
-array(3) {
- ["a"]=>
- string(3) "aaa"
- ["A"]=>
- string(3) "AAA"
- ["c"]=>
- string(3) "ccc"
-}
-array(0) {
-}
-array(2) {
- ["a"]=>
- string(3) "aaa"
- ["A"]=>
- string(3) "AAA"
-}
-array(2) {
- ["d"]=>
- string(3) "ddd"
- ["e"]=>
- string(3) "eee"
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Iteration 6 ***
-
-*** Variation with first two Arguments ***
-array(4) {
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "four"
- [3]=>
- string(4) "five"
-}
-array(5) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
- [3]=>
- string(4) "four"
- [4]=>
- string(4) "five"
-}
-array(2) {
- [0]=>
- string(4) "four"
- [1]=>
- string(4) "five"
-}
-
-*** Variation with first three Arguments ***
-array(3) {
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "four"
-}
-array(0) {
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
-}
-array(0) {
-}
-array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
-}
-array(2) {
- [0]=>
- string(4) "four"
- [1]=>
- string(4) "five"
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Variation with first two arguments with preserve_key value TRUE ***
-array(3) {
- [2]=>
- string(3) "two"
- [3]=>
- string(5) "three"
- [4]=>
- string(4) "four"
-}
-array(0) {
-}
-array(1) {
- [2]=>
- string(3) "two"
-}
-array(3) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- string(5) "three"
-}
-array(0) {
-}
-array(2) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
-}
-array(2) {
- [4]=>
- string(4) "four"
- [5]=>
- string(4) "five"
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Iteration 7 ***
-
-*** Variation with first two Arguments ***
-array(4) {
- [0]=>
- string(3) "two"
- [1]=>
- int(7)
- [2]=>
- string(4) "four"
- [3]=>
- string(4) "five"
-}
-array(5) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- int(7)
- [3]=>
- string(4) "four"
- [4]=>
- string(4) "five"
-}
-array(2) {
- [0]=>
- string(4) "four"
- [1]=>
- string(4) "five"
-}
-
-*** Variation with first three Arguments ***
-array(3) {
- [0]=>
- string(3) "two"
- [1]=>
- int(7)
- [2]=>
- string(4) "four"
-}
-array(0) {
-}
-array(1) {
- [0]=>
- string(3) "two"
-}
-array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- int(7)
-}
-array(0) {
-}
-array(2) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
-}
-array(2) {
- [0]=>
- string(4) "four"
- [1]=>
- string(4) "five"
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Variation with first two arguments with preserve_key value TRUE ***
-array(3) {
- [2]=>
- string(3) "two"
- [3]=>
- int(7)
- [4]=>
- string(4) "four"
-}
-array(0) {
-}
-array(1) {
- [2]=>
- string(3) "two"
-}
-array(3) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- int(7)
-}
-array(0) {
-}
-array(2) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
-}
-array(2) {
- [4]=>
- string(4) "four"
- [5]=>
- string(4) "five"
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Iteration 8 ***
-
-*** Variation with first two Arguments ***
-array(9) {
- [0]=>
- string(3) "one"
- [1]=>
- int(6)
- [""]=>
- string(5) "blank"
- [2]=>
- string(5) "float"
- ["F"]=>
- string(3) "FFF"
- ["blank"]=>
- string(0) ""
- [3]=>
- float(3.7)
- [4]=>
- string(4) "Five"
- [5]=>
- float(8.6)
-}
-array(10) {
- ["f"]=>
- string(3) "fff"
- [0]=>
- string(3) "one"
- [1]=>
- int(6)
- [""]=>
- string(5) "blank"
- [2]=>
- string(5) "float"
- ["F"]=>
- string(3) "FFF"
- ["blank"]=>
- string(0) ""
- [3]=>
- float(3.7)
- [4]=>
- string(4) "Five"
- [5]=>
- float(8.6)
-}
-array(2) {
- [0]=>
- string(4) "Five"
- [1]=>
- float(8.6)
-}
-
-*** Variation with first three Arguments ***
-array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- int(6)
- [""]=>
- string(5) "blank"
-}
-array(0) {
-}
-array(6) {
- [0]=>
- string(3) "one"
- [1]=>
- int(6)
- [""]=>
- string(5) "blank"
- [2]=>
- string(5) "float"
- ["F"]=>
- string(3) "FFF"
- ["blank"]=>
- string(0) ""
-}
-array(3) {
- ["f"]=>
- string(3) "fff"
- [0]=>
- string(3) "one"
- [1]=>
- int(6)
-}
-array(0) {
-}
-array(7) {
- ["f"]=>
- string(3) "fff"
- [0]=>
- string(3) "one"
- [1]=>
- int(6)
- [""]=>
- string(5) "blank"
- [2]=>
- string(5) "float"
- ["F"]=>
- string(3) "FFF"
- ["blank"]=>
- string(0) ""
-}
-array(2) {
- [0]=>
- string(4) "Five"
- [1]=>
- float(8.6)
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Variation with first two arguments with preserve_key value TRUE ***
-array(3) {
- [1]=>
- string(3) "one"
- [4]=>
- int(6)
- [""]=>
- string(5) "blank"
-}
-array(0) {
-}
-array(6) {
- [1]=>
- string(3) "one"
- [4]=>
- int(6)
- [""]=>
- string(5) "blank"
- [2]=>
- string(5) "float"
- ["F"]=>
- string(3) "FFF"
- ["blank"]=>
- string(0) ""
-}
-array(3) {
- ["f"]=>
- string(3) "fff"
- [1]=>
- string(3) "one"
- [4]=>
- int(6)
-}
-array(0) {
-}
-array(7) {
- ["f"]=>
- string(3) "fff"
- [1]=>
- string(3) "one"
- [4]=>
- int(6)
- [""]=>
- string(5) "blank"
- [2]=>
- string(5) "float"
- ["F"]=>
- string(3) "FFF"
- ["blank"]=>
- string(0) ""
-}
-array(2) {
- [5]=>
- string(4) "Five"
- [6]=>
- float(8.6)
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Iteration 9 ***
-
-*** Variation with first two Arguments ***
-array(3) {
- [0]=>
- string(4) "name"
- [1]=>
- string(3) "age"
- [2]=>
- string(2) "45"
-}
-array(4) {
- [0]=>
- int(12)
- [1]=>
- string(4) "name"
- [2]=>
- string(3) "age"
- [3]=>
- string(2) "45"
-}
-array(2) {
- [0]=>
- string(3) "age"
- [1]=>
- string(2) "45"
-}
-
-*** Variation with first three Arguments ***
-array(3) {
- [0]=>
- string(4) "name"
- [1]=>
- string(3) "age"
- [2]=>
- string(2) "45"
-}
-array(0) {
-}
-array(0) {
-}
-array(3) {
- [0]=>
- int(12)
- [1]=>
- string(4) "name"
- [2]=>
- string(3) "age"
-}
-array(0) {
-}
-array(1) {
- [0]=>
- int(12)
-}
-array(2) {
- [0]=>
- string(3) "age"
- [1]=>
- string(2) "45"
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Variation with first two arguments with preserve_key value TRUE ***
-array(3) {
- [1]=>
- string(4) "name"
- [2]=>
- string(3) "age"
- [3]=>
- string(2) "45"
-}
-array(0) {
-}
-array(0) {
-}
-array(3) {
- [0]=>
- int(12)
- [1]=>
- string(4) "name"
- [2]=>
- string(3) "age"
-}
-array(0) {
-}
-array(1) {
- [0]=>
- int(12)
-}
-array(2) {
- [2]=>
- string(3) "age"
- [3]=>
- string(2) "45"
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Iteration 10 ***
-
-*** Variation with first two Arguments ***
-array(2) {
- [0]=>
- array(5) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(30)
- [3]=>
- int(40)
- [4]=>
- int(50)
- }
- [1]=>
- array(0) {
- }
-}
-array(3) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "oNe"
- [1]=>
- string(3) "tWo"
- [2]=>
- int(4)
- }
- [1]=>
- array(5) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(30)
- [3]=>
- int(40)
- [4]=>
- int(50)
- }
- [2]=>
- array(0) {
- }
-}
-array(2) {
- [0]=>
- array(5) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(30)
- [3]=>
- int(40)
- [4]=>
- int(50)
- }
- [1]=>
- array(0) {
- }
-}
-
-*** Variation with first three Arguments ***
-array(2) {
- [0]=>
- array(5) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(30)
- [3]=>
- int(40)
- [4]=>
- int(50)
- }
- [1]=>
- array(0) {
- }
-}
-array(0) {
-}
-array(0) {
-}
-array(3) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "oNe"
- [1]=>
- string(3) "tWo"
- [2]=>
- int(4)
- }
- [1]=>
- array(5) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(30)
- [3]=>
- int(40)
- [4]=>
- int(50)
- }
- [2]=>
- array(0) {
- }
-}
-array(0) {
-}
-array(0) {
-}
-array(2) {
- [0]=>
- array(5) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(30)
- [3]=>
- int(40)
- [4]=>
- int(50)
- }
- [1]=>
- array(0) {
- }
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Variation with first two arguments with preserve_key value TRUE ***
-array(2) {
- [1]=>
- array(5) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(30)
- [3]=>
- int(40)
- [4]=>
- int(50)
- }
- [2]=>
- array(0) {
- }
-}
-array(0) {
-}
-array(0) {
-}
-array(3) {
- [0]=>
- array(3) {
- [0]=>
- string(3) "oNe"
- [1]=>
- string(3) "tWo"
- [2]=>
- int(4)
- }
- [1]=>
- array(5) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(30)
- [3]=>
- int(40)
- [4]=>
- int(50)
- }
- [2]=>
- array(0) {
- }
-}
-array(0) {
-}
-array(0) {
-}
-array(2) {
- [1]=>
- array(5) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(30)
- [3]=>
- int(40)
- [4]=>
- int(50)
- }
- [2]=>
- array(0) {
- }
-}
-array(0) {
-}
-array(0) {
-}
-
-*** Typical Variation of offset and length Arguments ***
-array(1) {
- [1]=>
- string(3) "Two"
-}
-array(1) {
- [0]=>
- string(3) "Two"
-}
-array(1) {
- [2]=>
- string(5) "Three"
-}
-array(1) {
- [0]=>
- string(5) "Three"
-}
---UEXPECTF--
-*** Output for Zero Argument ***
-
-Warning: array_slice() expects at least 2 parameters, 0 given in %s on line %d
-
-*** Output for Single array Argument ***
-
-Warning: array_slice() expects at least 2 parameters, 1 given in %s on line %d
-
-*** Output for invalid number of Arguments ***
-
-Warning: array_slice() expects at most 4 parameters, 5 given in %s on line %d
-
-*** Output for scalar Argument ***
-
-Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d
-
-*** Output for string Argument ***
-
Warning: array_slice() expects parameter 1 to be array, Unicode string given in %s on line %d
*** Iteration 1 ***
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing array_slice() : basic functionality ***
-- All arguments --
int(4)
}
Done
---UEXPECTF--
-*** Testing array_slice() : basic functionality ***
-
--- All arguments --
-array(2) {
- [0]=>
- int(3)
- [23]=>
- int(4)
-}
-
--- Mandatory arguments --
-array(2) {
- [0]=>
- int(3)
- [1]=>
- int(4)
-}
-Done
\ No newline at end of file
Warning: array_slice() expects at least 2 parameters, 1 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_slice() : error conditions ***
-
--- Testing array_slice() function with more than expected no. of arguments --
-
-Warning: array_slice() expects at most 4 parameters, 5 given in %s on line %d
-NULL
-
--- Testing array_slice() function with less than expected no. of arguments --
-
-Warning: array_slice() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-Done
\ No newline at end of file
?>
---EXPECTF--
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-array(0) {
-}
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(1) {
- [0]=>
- int(3)
-}
-array(1) {
- [2]=>
- int(3)
-}
-array(0) {
-}
-array(0) {
-}
-string(3) "foo"
---UEXPECTF--
+--EXPECT--
array(3) {
[0]=>
int(1)
echo "Done";
?>
---EXPECTF--
-*** Testing array_slice() : usage variations ***
-
--- Call array_slice() --
-array(2) {
- [0]=>
- string(12) "twenty-three"
- [1]=>
- string(4) "zero"
-}
--- Position of Internal Pointer in Result: --
-0 => twenty-three
-
--- Position of Internal Pointer in Original Array: --
-one => un
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_slice() : usage variations ***
-- Call array_slice() --
-- Position of Internal Pointer in Original Array: --
one => un
-Done
\ No newline at end of file
+Done
-- Iteration 16 --
-Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-array(0) {
-}
-
--- Iteration 19 --
-
-Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_slice() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_slice() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_slice() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_slice() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_slice() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_slice() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_slice() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_slice() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_slice() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_slice() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_slice() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 16 --
-
Warning: array_slice() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
Warning: array_slice() expects parameter 1 to be array, resource given in %s on line %d
NULL
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing array_slice() : usage variations ***
--- Iteration 1 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 2 --
-array(3) {
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 3 --
-array(0) {
-}
-
--- Iteration 4 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 5 --
-array(0) {
-}
-
--- Iteration 6 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 7 --
-array(0) {
-}
-
--- Iteration 8 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 9 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 10 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 11 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 12 --
-array(3) {
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 13 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 14 --
-array(3) {
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 15 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 16 --
-
-Warning: array_slice() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_slice() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: array_slice() expects parameter 2 to be long, array given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: array_slice() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_slice() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_slice() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-
--- Iteration 23 --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-Done
---UEXPECTF--
-*** Testing array_slice() : usage variations ***
-
-- Iteration 1 --
array(4) {
[u"one"]=>
[1]=>
int(4)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_slice() : usage variations ***
-
--- Iteration 1 --
-array(0) {
-}
-
--- Iteration 2 --
-array(1) {
- ["three"]=>
- int(3)
-}
-
--- Iteration 3 --
-array(2) {
- ["three"]=>
- int(3)
- [0]=>
- int(4)
-}
-
--- Iteration 4 --
-array(0) {
-}
-
--- Iteration 5 --
-array(2) {
- ["three"]=>
- int(3)
- [0]=>
- int(4)
-}
-
--- Iteration 6 --
-array(0) {
-}
-
--- Iteration 7 --
-array(2) {
- ["three"]=>
- int(3)
- [0]=>
- int(4)
-}
-
--- Iteration 8 --
-array(0) {
-}
-
--- Iteration 9 --
-array(0) {
-}
-
--- Iteration 10 --
-array(2) {
- ["three"]=>
- int(3)
- [0]=>
- int(4)
-}
-
--- Iteration 11 --
-array(2) {
- ["three"]=>
- int(3)
- [0]=>
- int(4)
-}
-
--- Iteration 12 --
-array(1) {
- ["three"]=>
- int(3)
-}
-
--- Iteration 13 --
-array(0) {
-}
-
--- Iteration 14 --
-array(1) {
- ["three"]=>
- int(3)
-}
-
--- Iteration 15 --
-array(0) {
-}
-
--- Iteration 16 --
-array(0) {
-}
-
--- Iteration 17 --
-array(0) {
-}
-
--- Iteration 18 --
-array(0) {
-}
-
--- Iteration 19 --
-array(0) {
-}
-
--- Iteration 20 --
-array(0) {
-}
-
--- Iteration 21 --
-array(0) {
-}
-
--- Iteration 22 --
-array(2) {
- ["three"]=>
- int(3)
- [0]=>
- int(4)
-}
-
--- Iteration 23 --
-array(2) {
- ["three"]=>
- int(3)
- [0]=>
- int(4)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_slice() : usage variations ***
-- Iteration 1 --
[0]=>
int(4)
}
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing array_slice() : usage variations ***
--- Iteration 1 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 2 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 3 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 4 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 5 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 6 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 7 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 8 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 9 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 10 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 11 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 12 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 13 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 14 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 15 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 16 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 17 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 18 --
-
-Warning: array_slice() expects parameter 4 to be boolean, array given in %s on line %d
-NULL
-
--- Iteration 19 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 20 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 21 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [99]=>
- int(3)
-}
-
--- Iteration 22 --
-
-Warning: array_slice() expects parameter 4 to be boolean, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
--- Iteration 24 --
-array(3) {
- ["one"]=>
- int(1)
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-Done
---UEXPECTF--
-*** Testing array_slice() : usage variations ***
-
-- Iteration 1 --
array(3) {
[u"one"]=>
[1]=>
int(3)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_slice() : usage variations ***
-
--- $offset is -7 --
-array(5) {
- ["one"]=>
- int(1)
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $offset is -6 --
-array(5) {
- ["one"]=>
- int(1)
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $offset is -5 --
-array(5) {
- ["one"]=>
- int(1)
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $offset is -4 --
-array(4) {
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $offset is -3 --
-array(3) {
- [0]=>
- string(5) "three"
- [1]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $offset is -2 --
-array(2) {
- [0]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $offset is -1 --
-array(1) {
- ["ten"]=>
- int(10)
-}
-
--- $offset is 0 --
-array(5) {
- ["one"]=>
- int(1)
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $offset is 1 --
-array(4) {
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $offset is 2 --
-array(3) {
- [0]=>
- string(5) "three"
- [1]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $offset is 3 --
-array(2) {
- [0]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $offset is 4 --
-array(1) {
- ["ten"]=>
- int(10)
-}
-
--- $offset is 5 --
-array(0) {
-}
-
--- $offset is 6 --
-array(0) {
-}
-
--- $offset is 7 --
-array(0) {
-}
-
--- $offset is maximum integer value --
-array(0) {
-}
-
--- $offset is minimum integer value --
-array(5) {
- ["one"]=>
- int(1)
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_slice() : usage variations ***
-- $offset is -7 --
[u"ten"]=>
int(10)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_slice() : usage variations ***
-
--- $length is -6 --
-array(0) {
-}
-
--- $length is -5 --
-array(0) {
-}
-
--- $length is -4 --
-array(0) {
-}
-
--- $length is -3 --
-array(1) {
- [0]=>
- string(3) "two"
-}
-
--- $length is -2 --
-array(2) {
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
-}
-
--- $length is -1 --
-array(3) {
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
-}
-
--- $length is 0 --
-array(0) {
-}
-
--- $length is 1 --
-array(1) {
- [0]=>
- string(3) "two"
-}
-
--- $length is 2 --
-array(2) {
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
-}
-
--- $length is 3 --
-array(3) {
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
-}
-
--- $length is 4 --
-array(4) {
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $length is 5 --
-array(4) {
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $length is 6 --
-array(4) {
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $length is maximum integer value --
-array(4) {
- [0]=>
- string(3) "two"
- [1]=>
- string(5) "three"
- [2]=>
- string(4) "nine"
- ["ten"]=>
- int(10)
-}
-
--- $length is minimum integer value --
-array(0) {
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_slice() : usage variations ***
-- $length is -6 --
-- $length is minimum integer value --
array(0) {
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_slice() : usage variations ***
-
--- Iteration 1 : key type is int --
-$preserve_keys = TRUE
-array(4) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [12345]=>
- string(8) "positive"
- [-2345]=>
- string(8) "negative"
-}
-$preserve_keys = FALSE
-array(4) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- string(8) "positive"
- [3]=>
- string(8) "negative"
-}
-
--- Iteration 2 : key type is float --
-$preserve_keys = TRUE
-array(3) {
- [10]=>
- string(8) "positive"
- [-10]=>
- string(8) "negative"
- [0]=>
- string(4) "half"
-}
-$preserve_keys = FALSE
-array(3) {
- [0]=>
- string(8) "positive"
- [1]=>
- string(8) "negative"
- [2]=>
- string(4) "half"
-}
-
--- Iteration 3 : key type is extreme floats --
-$preserve_keys = TRUE
-array(2) {
- [12345678]=>
- string(5) "large"
- [0]=>
- string(5) "small"
-}
-$preserve_keys = FALSE
-array(2) {
- [0]=>
- string(5) "large"
- [1]=>
- string(5) "small"
-}
-
--- Iteration 4 : key type is null uppercase --
-$preserve_keys = TRUE
-array(1) {
- [""]=>
- string(6) "null 1"
-}
-$preserve_keys = FALSE
-array(1) {
- [""]=>
- string(6) "null 1"
-}
-
--- Iteration 5 : key type is null lowercase --
-$preserve_keys = TRUE
-array(1) {
- [""]=>
- string(6) "null 2"
-}
-$preserve_keys = FALSE
-array(1) {
- [""]=>
- string(6) "null 2"
-}
-
--- Iteration 6 : key type is bool lowercase --
-$preserve_keys = TRUE
-array(2) {
- [1]=>
- string(6) "lowert"
- [0]=>
- string(6) "lowerf"
-}
-$preserve_keys = FALSE
-array(2) {
- [0]=>
- string(6) "lowert"
- [1]=>
- string(6) "lowerf"
-}
-
--- Iteration 7 : key type is bool uppercase --
-$preserve_keys = TRUE
-array(2) {
- [1]=>
- string(6) "uppert"
- [0]=>
- string(6) "upperf"
-}
-$preserve_keys = FALSE
-array(2) {
- [0]=>
- string(6) "uppert"
- [1]=>
- string(6) "upperf"
-}
-
--- Iteration 8 : key type is empty double quotes --
-$preserve_keys = TRUE
-array(1) {
- [""]=>
- string(6) "emptyd"
-}
-$preserve_keys = FALSE
-array(1) {
- [""]=>
- string(6) "emptyd"
-}
-
--- Iteration 9 : key type is empty single quotes --
-$preserve_keys = TRUE
-array(1) {
- [""]=>
- string(6) "emptys"
-}
-$preserve_keys = FALSE
-array(1) {
- [""]=>
- string(6) "emptys"
-}
-
--- Iteration 10 : key type is string --
-$preserve_keys = TRUE
-array(3) {
- ["stringd"]=>
- string(7) "stringd"
- ["strings"]=>
- string(7) "strings"
- ["hello world"]=>
- string(7) "stringh"
-}
-$preserve_keys = FALSE
-array(3) {
- ["stringd"]=>
- string(7) "stringd"
- ["strings"]=>
- string(7) "strings"
- ["hello world"]=>
- string(7) "stringh"
-}
-
--- Iteration 11 : key type is undefined --
-$preserve_keys = TRUE
-array(1) {
- [""]=>
- string(9) "undefined"
-}
-$preserve_keys = FALSE
-array(1) {
- [""]=>
- string(9) "undefined"
-}
-
--- Iteration 12 : key type is unset --
-$preserve_keys = TRUE
-array(1) {
- [""]=>
- string(5) "unset"
-}
-$preserve_keys = FALSE
-array(1) {
- [""]=>
- string(5) "unset"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_slice() : usage variations ***
-- Iteration 1 : key type is int --
[u""]=>
unicode(5) "unset"
}
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing array_slice() : usage variations ***
--- Slice a two-dimensional array --
-array(3) {
- [0]=>
- string(3) "one"
- [1]=>
- array(3) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(2) "un"
- [2]=>
- string(4) "deux"
- }
- [2]=>
- string(4) "nine"
-}
-
--- $input is a sub-array --
-array(2) {
- [0]=>
- string(2) "un"
- [1]=>
- string(4) "deux"
-}
-Done
---UEXPECTF--
-*** Testing array_slice() : usage variations ***
-
-- Slice a two-dimensional array --
array(3) {
[0]=>
[1]=>
unicode(4) "deux"
}
-Done
\ No newline at end of file
+Done
Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
*** Testing array_slice() : usage variations ***
--- Array of referenced variables ($preserve_keys = default) --
-array(2) {
- [0]=>
- &string(3) "two"
- [1]=>
- &string(5) "three"
-}
--- Change $val2 ($preserve_keys = TRUE) --
-array(2) {
- [2]=>
- &string(12) "hello, world"
- [1]=>
- &string(5) "three"
-}
-
--- Pass array by reference --
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
--- Check passed array: --
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-Done
---UEXPECTF--
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-*** Testing array_slice() : usage variations ***
-
-- Array of referenced variables ($preserve_keys = default) --
array(2) {
[0]=>
--EXPECT--
*** Testing array_splice() basic operations ***
test truncation
-array(2) {
- [0]=>
- string(4) "blue"
- [1]=>
- string(6) "yellow"
-}
-array(2) {
- [0]=>
- string(3) "red"
- [1]=>
- string(5) "green"
-}
-test removing entries from the middle
-array(2) {
- [0]=>
- string(5) "green"
- [1]=>
- string(4) "blue"
-}
-array(2) {
- [0]=>
- string(3) "red"
- [1]=>
- string(6) "yellow"
-}
-test substitution at end
-array(3) {
- [0]=>
- string(5) "green"
- [1]=>
- string(4) "blue"
- [2]=>
- string(6) "yellow"
-}
-array(2) {
- [0]=>
- string(3) "red"
- [1]=>
- string(6) "orange"
-}
-array(1) {
- [0]=>
- string(6) "yellow"
-}
-array(5) {
- [0]=>
- string(3) "red"
- [1]=>
- string(5) "green"
- [2]=>
- string(4) "blue"
- [3]=>
- string(5) "black"
- [4]=>
- string(6) "maroon"
-}
-test insertion
-array(0) {
-}
-array(5) {
- [0]=>
- string(3) "red"
- [1]=>
- string(5) "green"
- [2]=>
- string(4) "blue"
- [3]=>
- string(6) "purple"
- [4]=>
- string(6) "yellow"
-}
---UEXPECT--
-*** Testing array_splice() basic operations ***
-test truncation
array(2) {
[0]=>
unicode(4) "blue"
Warning: array_splice() expects parameter 1 to be array, object given in %s on line %d
NULL
Done
---UEXPECTF--
-
-*** Testing error conditions of array_splice() ***
-
-Warning: array_splice() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_splice() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: array_splice() expects at least 2 parameters, 1 given in %s on line %d
-NULL
-
-Warning: array_splice() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_splice() expects parameter 1 to be array, object given in %s on line %d
-NULL
-Done
\ No newline at end of file
}
}
Test behaviour of input arrays containing references
-array(3) {
- [0]=>
- int(4)
- [1]=>
- &int(5)
- ["six"]=>
- &int(6)
-}
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- &int(2)
- ["three"]=>
- &int(3)
- [3]=>
- int(7)
- [4]=>
- &int(8)
- ["nine"]=>
- &int(9)
-}
-Test behaviour of replacement array containing references
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- &int(3)
- [3]=>
- &int(4)
-}
-Test behaviour of replacement which is part of reference set
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(3)
-}
-Done
---UEXPECT--
-test behaviour when input array is in a reference set
-array(1) {
- [0]=>
- int(2)
-}
-array(2) {
- [0]=>
- &array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- &array(1) {
- [0]=>
- int(1)
- }
-}
-Test behaviour of input arrays containing references
array(3) {
[0]=>
int(4)
[1]=>
int(3)
}
-Done
\ No newline at end of file
+Done
int(2)
}
Done
---UEXPECTF--
-
-Warning: array_splice() expects at most 4 parameters, 10 given in %s on line %d
-NULL
-array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-Done
\ No newline at end of file
[1]=>
int(1)
}
-array(7) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- [3]=>
- int(2)
- [4]=>
- int(3)
- [5]=>
- int(4)
- [6]=>
- int(5)
-}
-absolute offset - absolute length - cut from middle
- - No replacement
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(4)
- [3]=>
- int(5)
-}
- - With replacement
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- string(1) "A"
- [3]=>
- string(1) "B"
- [4]=>
- string(1) "C"
- [5]=>
- int(4)
- [6]=>
- int(5)
-}
-absolute offset - absolute length - cut from end
- - No replacement
-array(2) {
- [0]=>
- int(4)
- [1]=>
- int(5)
-}
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
-}
- - With replacement
-array(2) {
- [0]=>
- int(4)
- [1]=>
- int(5)
-}
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- string(1) "A"
- [5]=>
- string(1) "B"
- [6]=>
- string(1) "C"
-}
-absolute offset - absolute length - attempt to cut past end
- - No replacement
-array(2) {
- [0]=>
- int(4)
- [1]=>
- int(5)
-}
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
-}
- - With replacement
-array(2) {
- [0]=>
- int(4)
- [1]=>
- int(5)
-}
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- string(1) "A"
- [5]=>
- string(1) "B"
- [6]=>
- string(1) "C"
-}
-absolute offset - absolute length - cut everything
- - No replacement
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
-}
-array(0) {
-}
- - With replacement
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
-}
-array(3) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
-}
-absolute offset - absolute length - cut nothing
- - No replacement
-array(0) {
-}
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
-}
- - With replacement
-array(0) {
-}
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- string(1) "A"
- [4]=>
- string(1) "B"
- [5]=>
- string(1) "C"
- [6]=>
- int(3)
- [7]=>
- int(4)
- [8]=>
- int(5)
-}
-absolute offset - relative length - cut from beginning
- - No replacement
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-array(4) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- [2]=>
- int(4)
- [3]=>
- int(5)
-}
- - With replacement
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-array(7) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- [3]=>
- int(2)
- [4]=>
- int(3)
- [5]=>
- int(4)
- [6]=>
- int(5)
-}
-absolute offset - relative length - cut from middle
- - No replacement
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(4)
- [3]=>
- int(5)
-}
- - With replacement
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- string(1) "A"
- [3]=>
- string(1) "B"
- [4]=>
- string(1) "C"
- [5]=>
- int(4)
- [6]=>
- int(5)
-}
-absolute offset - relative length - attempt to cut form before beginning
- - No replacement
-array(0) {
-}
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
-}
- - With replacement
-array(0) {
-}
-array(9) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- [3]=>
- int(0)
- [4]=>
- int(1)
- [5]=>
- int(2)
- [6]=>
- int(3)
- [7]=>
- int(4)
- [8]=>
- int(5)
-}
-absolute offset - relative length - cut nothing
- - No replacement
-array(0) {
-}
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
-}
- - With replacement
-array(0) {
-}
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- string(1) "A"
- [3]=>
- string(1) "B"
- [4]=>
- string(1) "C"
- [5]=>
- int(2)
- [6]=>
- int(3)
- [7]=>
- int(4)
- [8]=>
- int(5)
-}
-relative offset - absolute length - cut from beginning
- - No replacement
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-array(4) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- [2]=>
- int(4)
- [3]=>
- int(5)
-}
- - With replacement
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-array(7) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- [3]=>
- int(2)
- [4]=>
- int(3)
- [5]=>
- int(4)
- [6]=>
- int(5)
-}
-relative offset - absolute length - cut from middle
- - No replacement
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(4)
- [3]=>
- int(5)
-}
- - With replacement
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- string(1) "A"
- [3]=>
- string(1) "B"
- [4]=>
- string(1) "C"
- [5]=>
- int(4)
- [6]=>
- int(5)
-}
-relative offset - absolute length - cut from end
- - No replacement
-array(2) {
- [0]=>
- int(4)
- [1]=>
- int(5)
-}
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
-}
- - With replacement
-array(2) {
- [0]=>
- int(4)
- [1]=>
- int(5)
-}
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- string(1) "A"
- [5]=>
- string(1) "B"
- [6]=>
- string(1) "C"
-}
-relative offset - absolute length - attempt to cut past end
- - No replacement
-array(2) {
- [0]=>
- int(4)
- [1]=>
- int(5)
-}
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
-}
- - With replacement
-array(2) {
- [0]=>
- int(4)
- [1]=>
- int(5)
-}
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- string(1) "A"
- [5]=>
- string(1) "B"
- [6]=>
- string(1) "C"
-}
-relative offset - absolute length - cut everything
- - No replacement
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
-}
-array(0) {
-}
- - With replacement
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
-}
-array(3) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
-}
-relative offset - absolute length - cut nothing
- - No replacement
-array(0) {
-}
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
-}
- - With replacement
-array(0) {
-}
-array(9) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- [3]=>
- int(0)
- [4]=>
- int(1)
- [5]=>
- int(2)
- [6]=>
- int(3)
- [7]=>
- int(4)
- [8]=>
- int(5)
-}
-relative offset - relative length - cut from beginning
- - No replacement
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-array(4) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- [2]=>
- int(4)
- [3]=>
- int(5)
-}
- - With replacement
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-array(7) {
- [0]=>
- string(1) "A"
- [1]=>
- string(1) "B"
- [2]=>
- string(1) "C"
- [3]=>
- int(2)
- [4]=>
- int(3)
- [5]=>
- int(4)
- [6]=>
- int(5)
-}
-relative offset - relative length - cut from middle
- - No replacement
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(4)
- [3]=>
- int(5)
-}
- - With replacement
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-array(7) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- string(1) "A"
- [3]=>
- string(1) "B"
- [4]=>
- string(1) "C"
- [5]=>
- int(4)
- [6]=>
- int(5)
-}
-relative offset - relative length - cut nothing
- - No replacement
-array(0) {
-}
-array(6) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(4)
- [5]=>
- int(5)
-}
- - With replacement
-array(0) {
-}
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- string(1) "A"
- [3]=>
- string(1) "B"
- [4]=>
- string(1) "C"
- [5]=>
- int(2)
- [6]=>
- int(3)
- [7]=>
- int(4)
- [8]=>
- int(5)
-}
-Done
---UEXPECT--
-*** array_splice() function : usage variations - lengths and offsets
-absolute offset - absolute length - cut from beginning
- - No replacement
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-array(4) {
- [0]=>
- int(2)
- [1]=>
- int(3)
- [2]=>
- int(4)
- [3]=>
- int(5)
-}
- - With replacement
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
array(7) {
[0]=>
unicode(1) "A"
[8]=>
int(5)
}
-Done
\ No newline at end of file
+Done
resource(%d) of type (stream)
}
Done
---UEXPECTF--
-array(0) {
-}
-array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-array(0) {
-}
-array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- float(2.1)
-}
-array(0) {
-}
-array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- bool(true)
-}
-array(0) {
-}
-array(3) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- resource(%d) of type (stream)
-}
-Done
\ No newline at end of file
echo "Done"
?>
---EXPECTF--
-*** Testing array_sum() : basic functionality ***
--- array_sum() with integer array entries --
-int(15)
--- array_sum() with float array entries --
-float(11.2)
--- array_sum() with integer/float array entries --
-float(17.9)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_sum() : basic functionality ***
-- array_sum() with integer array entries --
int(15)
Warning: array_sum() expects exactly 1 parameter, 2 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_sum() : error conditions ***
--- Testing array_sum() function with zero arguments --
-
-Warning: array_sum() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
--- Testing array_sum() function with more than expected no. of arguments --
-
-Warning: array_sum() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-Done
NULL
-- Iteration 16 --
-Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_sum() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_sum() expects parameter 1 to be array, object given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_sum() expects parameter 1 to be array, resource given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_sum() : unexpected values for 'input' ***
--- Iteration 1 --
-
-Warning: array_sum() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_sum() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_sum() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_sum() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_sum() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_sum() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_sum() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_sum() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_sum() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_sum() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_sum() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_sum() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_sum() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_sum() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 16 --
-
Warning: array_sum() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
-- Iteration 17 --
echo "Done"
?>
---EXPECTF--
-*** Testing array_sum() : with different integer array ***
--- Sum of Integer array --
-int(-573)
--- Sum of Octal array --
-int(35)
--- Sum of Hex array --
-int(-198)
--- Sum of mixed integer values --
-int(58)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_sum() : with different integer array ***
-- Sum of Integer array --
int(-573)
echo "Done"
?>
---EXPECTF--
-*** Testing array_sum() : array with different float values ***
--- simple float array --
-float(1.3)
--- float array with scientific notations e and E --
-float(23630.021)
-float(23180.021)
--- Mixed float array --
-float(6531.5458)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_sum() : array with different float values ***
-- simple float array --
float(1.3)
echo "Done"
?>
---EXPECTF--
-*** Testing array_sum() : array with duplicate values ***
--- With integer array --
-int(117)
--- With float array --
-float(2.5)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_sum() : array with duplicate values ***
-- With integer array --
int(117)
echo "Done"
?>
---EXPECTF--
-*** Testing array_sum() : array with elements as reference ***
-int(305)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_sum() : array with elements as reference ***
int(305)
Done
var_dump( array_sum($input) );
echo "Done"
?>
---EXPECTF--
-*** Testing array_sum() : with associative array ***
--- with numeric keys --
-float(32.56)
--- with string keys --
-int(140)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_sum() : with associative array ***
-- with numeric keys --
float(32.56)
var_dump( array_sum($input) );
echo "Done"
?>
---EXPECTF--
-*** Testing array_sum() : array with unexpected entries ***
--- empty array --
-int(0)
--- array with string values --
-int(0)
--- array with bool values --
-int(3)
--- array with null values --
-int(0)
--- array with subarrays --
-int(0)
--- array with object values --
-int(0)
--- array with mixed values --
-float(14)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_sum() : array with unexpected entries ***
-- empty array --
int(0)
var_dump($result);
?>
--EXPECTF--
-array(3) {
- ["0.1"]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(9)
- }
- ["0.5"]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(12)
- }
- [0]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(23)
- }
-}
---UEXPECTF--
array(3) {
[u"0.1"]=>
object(cr)#%d (1) {
[u"priv_member":u"cr":private]=>
int(23)
}
-}
\ No newline at end of file
+}
var_dump($result);
?>
--EXPECTF--
-array(2) {
- ["0.5"]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(12)
- }
- [0]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(23)
- }
-}
---UEXPECTF--
array(2) {
[u"0.5"]=>
object(cr)#%d (1) {
[u"priv_member":u"cr":private]=>
int(23)
}
-}
\ No newline at end of file
+}
var_dump($result);
?>
--EXPECTF--
-array(3) {
- ["0.1"]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(9)
- }
- ["0.5"]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(12)
- }
- [0]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(23)
- }
-}
---UEXPECTF--
array(3) {
[u"0.1"]=>
object(cr)#%d (1) {
[u"priv_member":u"cr":private]=>
int(23)
}
-}
\ No newline at end of file
+}
var_dump($result);
?>
--EXPECTF--
-array(2) {
- [1]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(4)
- }
- [2]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(-15)
- }
-}
---UEXPECTF--
array(2) {
[1]=>
object(cr)#%d (1) {
[u"priv_member":u"cr":private]=>
int(-15)
}
-}
\ No newline at end of file
+}
var_dump($result);
?>
--EXPECTF--
-array(3) {
- ["0.1"]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(9)
- }
- [1]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(4)
- }
- [2]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(-15)
- }
-}
---UEXPECTF--
array(3) {
[u"0.1"]=>
object(cr)#%d (1) {
[u"priv_member":u"cr":private]=>
int(-15)
}
-}
\ No newline at end of file
+}
var_dump($result);
?>
--EXPECTF--
-array(2) {
- [1]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(4)
- }
- [2]=>
- object(cr)#%d (1) {
- ["priv_member":"cr":private]=>
- int(-15)
- }
-}
---UEXPECTF--
array(2) {
[1]=>
object(cr)#%d (1) {
[u"priv_member":u"cr":private]=>
int(-15)
}
-}
\ No newline at end of file
+}
echo "Done";
?>
---EXPECTF--
-*** Testing array_unique() : basic functionality ***
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-array(2) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
-}
-array(3) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [4]=>
- string(5) "three"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_unique() : basic functionality ***
array(2) {
[0]=>
[4]=>
unicode(5) "three"
}
-Done
\ No newline at end of file
+Done
Warning: array_unique() expects exactly 1 parameter, 2 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_unique() : error conditions ***
-
--- Testing array_unique() function with zero arguments --
-
-Warning: array_unique() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing array_unique() function with more than expected no. of arguments --
-
-Warning: array_unique() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-Done
Warning: array_unique(): The argument should be an array in %s on line %d
bool(false)
Done
---UEXPECTF--
-*** Testing array_unique() : Passing non array values to $input argument ***
--- Iteration 1 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 21 --
-array(0) {
-}
--- Iteration 22 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 24 --
-
-Warning: array_unique(): The argument should be an array in %s on line %d
-bool(false)
-Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_unique() : Passing different arrays to $input argument ***
--- Iteration 1 --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
--- Iteration 2 --
-array(2) {
- [0]=>
- float(1.1)
- [1]=>
- float(2.2)
-}
--- Iteration 3 --
-array(2) {
- [0]=>
- bool(false)
- [1]=>
- bool(true)
-}
--- Iteration 4 --
-array(0) {
-}
--- Iteration 5 --
-array(1) {
- [0]=>
- NULL
-}
--- Iteration 6 --
-array(4) {
- [0]=>
- string(3) "a\v\f"
- [1]=>
- string(5) "aaaa
-"
- [2]=>
- string(1) "b"
- [4]=>
- string(27) "\[\]\!\@\#$\%\^\&\*\(\)\{\}"
-}
--- Iteration 7 --
-array(4) {
- [0]=>
- string(5) "a\v\f"
- [1]=>
- string(6) "aaaa\r"
- [2]=>
- string(1) "b"
- [4]=>
- string(28) "\[\]\!\@\#\$\%\^\&\*\(\)\{\}"
-}
--- Iteration 8 --
-array(3) {
- ["h1"]=>
- string(1) "
-"
- ["h2"]=>
- string(88) "hello world
-The quick brown fox jumped over;
-the lazy dog
-This is a double quoted string"
- ["h3"]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
-}
--- Iteration 9 --
-array(2) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
-}
--- Iteration 10 --
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
--- Iteration 11 --
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(20)
- [4]=>
- int(40)
-}
--- Iteration 12 --
-array(2) {
- ["one"]=>
- string(3) "ten"
- ["two"]=>
- string(6) "twenty"
-}
--- Iteration 13 --
-array(3) {
- ["one"]=>
- int(1)
- [2]=>
- string(3) "two"
- [4]=>
- string(4) "four"
-}
--- Iteration 14 --
-array(2) {
- [""]=>
- string(4) "null"
- ["NULL"]=>
- NULL
-}
--- Iteration 15 --
-array(4) {
- [1]=>
- string(4) "true"
- [0]=>
- string(5) "false"
- ["false"]=>
- bool(false)
- ["true"]=>
- bool(true)
-}
--- Iteration 16 --
-array(2) {
- [""]=>
- string(6) "emptys"
- ["emptyd"]=>
- string(0) ""
-}
--- Iteration 17 --
-array(2) {
- [1]=>
- string(0) ""
- [6]=>
- bool(true)
-}
--- Iteration 18 --
-array(3) {
- [""]=>
- int(4)
- [0]=>
- int(5)
- [1]=>
- int(6)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_unique() : Passing different arrays to $input argument ***
-- Iteration 1 --
array(2) {
Warning: Illegal offset type in %s on line %d
-Warning: Illegal offset type in %s on line %d
--- Iteration 1 --
-array(1) {
- [0]=>
- string(1) "0"
-}
--- Iteration 2 --
-array(3) {
- [1]=>
- string(1) "1"
- [2]=>
- string(1) "2"
- [4]=>
- string(1) "4"
-}
--- Iteration 3 --
-array(1) {
- [2]=>
- string(5) "float"
-}
--- Iteration 4 --
-array(3) {
- [1]=>
- string(2) "f1"
- [3]=>
- string(2) "f2"
- [3333333]=>
- string(2) "f4"
-}
--- Iteration 5 --
-array(3) {
- ["\tHello"]=>
- int(111)
- ["re\td"]=>
- string(5) "color"
- ["\v\fworld"]=>
- float(2.2)
-}
--- Iteration 6 --
-array(3) {
- [" Hello"]=>
- int(111)
- ["re d"]=>
- string(5) "color"
- ["\v\fworld"]=>
- float(2.2)
-}
--- Iteration 7 --
-array(2) {
- [0]=>
- string(5) "hello"
- ["Hello world"]=>
- string(6) "string"
-}
--- Iteration 8 --
-array(2) {
- [""]=>
- string(5) "hello"
- [0]=>
- int(11)
-}
-Done
---UEXPECTF--
-*** Testing array_unique() : assoc. array with diff. keys passed to $input argument ***
-
-Warning: Illegal offset type in %s on line %d
-
Warning: Illegal offset type in %s on line %d
-- Iteration 1 --
array(1) {
echo "Done";
?>
---EXPECTF--
-*** Testing array_unique() : assoc. array with diff. values to $input argument ***
--- Iteration 1 --
-array(1) {
- [0]=>
- int(0)
-}
--- Iteration 2 --
-array(2) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
-}
--- Iteration 3 --
-array(1) {
- ["float1"]=>
- float(2.3333)
-}
--- Iteration 4 --
-array(3) {
- ["f1"]=>
- float(1.2)
- ["f2"]=>
- float(3.33)
- [3]=>
- float(4.8999992284)
-}
--- Iteration 5 --
-array(3) {
- [111]=>
- string(6) " Hello"
- ["red"]=>
- string(6) "col or"
- [2]=>
- string(7) "\v\fworld"
-}
--- Iteration 6 --
-array(3) {
- [111]=>
- string(7) "\tHello"
- ["red"]=>
- string(7) "col\tor"
- [2]=>
- string(9) "\v\fworld"
-}
--- Iteration 7 --
-array(2) {
- [1]=>
- string(5) "hello"
- ["heredoc"]=>
- string(11) "Hello world"
-}
--- Iteration 8 --
-array(3) {
- [11]=>
- object(classA)#%d (0) {
- }
- ["unset"]=>
- NULL
- ["resource"]=>
- resource(%d) of type (stream)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_unique() : assoc. array with diff. values to $input argument ***
-- Iteration 1 --
array(1) {
[u"resource"]=>
resource(5) of type (stream)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_unique() : array with duplicate keys for $input argument ***
-array(3) {
- [1]=>
- string(1) "1"
- [2]=>
- string(1) "2"
- [3]=>
- string(5) "three"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_unique() : array with duplicate keys for $input argument ***
array(3) {
[1]=>
[3]=>
unicode(5) "three"
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_unique() : array with reference variables for $input argument ***
-array(2) {
- [0]=>
- int(0)
- [1]=>
- &string(5) "hello"
-}
-Done
---UEXPECT--
+--EXPECT--
*** Testing array_unique() : array with reference variables for $input argument ***
array(2) {
[0]=>
[1]=>
&unicode(5) "hello"
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_unique() : array with binary data for $input argument ***
-array(3) {
- [0]=>
- string(1) "1"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
-}
-Done
---UEXPECT--
+--EXPECT--
*** Testing array_unique() : array with binary data for $input argument ***
array(3) {
[0]=>
[2]=>
unicode(5) "world"
}
-Done
\ No newline at end of file
+Done
}
}
Done
---UEXPECTF--
-*** Testing array_unique() : two dimensional array for $input argument ***
-
-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
-
-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
-
-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(1) {
- [0]=>
- array(4) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(1)
- }
-}
-Done
echo "Done\n";
?>
---EXPECTF--
-int(1)
-array(1) {
- [0]=>
- string(0) ""
-}
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-array(1) {
- [0]=>
- string(0) ""
-}
-int(2)
-array(2) {
- [0]=>
- array(1) {
- [0]=>
- string(0) ""
- }
- [1]=>
- string(0) ""
-}
-Done
---UEXPECTF--
+--EXPECTF--
int(1)
array(1) {
[0]=>
echo "Done";
?>
---EXPECTF--
-*** Testing array_unshift() : basic functionality with default key array ***
-int(3)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-int(5)
-array(5) {
- [0]=>
- int(222)
- [1]=>
- string(5) "hello"
- [2]=>
- float(12.33)
- [3]=>
- int(1)
- [4]=>
- int(2)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_unshift() : basic functionality with default key array ***
int(3)
array(3) {
[4]=>
int(2)
}
-Done
\ No newline at end of file
+Done
Warning: Wrong parameter count for array_unshift() in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_unshift() : error conditions ***
-
--- Testing array_unshift() function with Zero arguments --
-
-Warning: Wrong parameter count for array_unshift() in %s on line %d
-NULL
-
--- Testing array_unshift() function with less than expected no. of arguments --
-
-Warning: Wrong parameter count for array_unshift() in %s on line %d
-NULL
-Done
-
*** Testing array_unshift() : Passing object to $var argument ***
-- Iteration 1 --
int(5)
-array(5) {
- [0]=>
- object(SimpleClass)#%d (1) {
- ["var1"]=>
- int(1)
- }
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- object(SimpleClass)#%d (1) {
- ["var1"]=>
- int(1)
- }
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 2 --
-int(5)
-array(5) {
- [0]=>
- object(EmptyClass)#%d (0) {
- }
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- object(EmptyClass)#%d (0) {
- }
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 3 --
-int(5)
-array(5) {
- [0]=>
- object(ChildClass)#%d (2) {
- ["var3":"ChildClass":private]=>
- NULL
- ["var2":protected]=>
- int(5)
- }
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- object(ChildClass)#%d (2) {
- ["var3":"ChildClass":private]=>
- NULL
- ["var2":protected]=>
- int(5)
- }
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 4 --
-int(5)
-array(5) {
- [0]=>
- object(FinalClass)#%d (1) {
- ["var4":"FinalClass":private]=>
- NULL
- }
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- object(FinalClass)#%d (1) {
- ["var4":"FinalClass":private]=>
- NULL
- }
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 5 --
-int(5)
-array(5) {
- [0]=>
- object(StaticClass)#%d (0) {
- }
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- object(StaticClass)#%d (0) {
- }
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
-Done
---UEXPECTF--
-*** Testing array_unshift() : Passing object to $var argument ***
--- Iteration 1 --
-int(5)
array(5) {
[0]=>
object(SimpleClass)#%d (1) {
bool(false)
bool(false)
--- Iteration 16 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-string(0) ""
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-string(0) ""
-
--- Iteration 17 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-string(0) ""
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-string(0) ""
-
--- Iteration 18 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-string(6) "string"
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-string(6) "string"
-
--- Iteration 19 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-string(6) "string"
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-string(6) "string"
-
--- Iteration 20 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-string(11) "hello world"
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-string(11) "hello world"
-
--- Iteration 21 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-object(classA)#%d (0) {
-}
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-object(classA)#%d (0) {
-}
-
--- Iteration 22 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-NULL
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-NULL
-
--- Iteration 23 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-NULL
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-NULL
-
--- Iteration 24 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-resource(%d) of type (stream)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-resource(%d) of type (stream)
-Done
---UEXPECTF--
-*** Testing array_unshift() : unexpected values for $array argument ***
-
--- Iteration 1 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-int(0)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-int(0)
-
--- Iteration 2 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-int(1)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-int(1)
-
--- Iteration 3 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-int(12345)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-int(12345)
-
--- Iteration 4 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-int(-2345)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-int(-2345)
-
--- Iteration 5 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-float(10.5)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-float(10.5)
-
--- Iteration 6 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-float(-10.5)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-float(-10.5)
-
--- Iteration 7 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-float(123456789000)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-float(123456789000)
-
--- Iteration 8 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-float(1.23456789E-9)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-float(1.23456789E-9)
-
--- Iteration 9 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-float(0.5)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-float(0.5)
-
--- Iteration 10 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-NULL
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-NULL
-
--- Iteration 11 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-NULL
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-NULL
-
--- Iteration 12 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-bool(true)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-bool(true)
-
--- Iteration 13 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-bool(false)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-bool(false)
-
--- Iteration 14 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-bool(true)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-bool(true)
-
--- Iteration 15 --
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-bool(false)
-
-Warning: array_unshift(): The first argument should be an array in %s on line %d
-bool(false)
-bool(false)
-
-- Iteration 16 --
Warning: array_unshift(): The first argument should be an array in %s on line %d
bool(false)
*** Testing array_unshift() : all possible values for $var argument ***
-- Iteration 1 --
int(5)
-array(5) {
- [0]=>
- int(0)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- int(0)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 2 --
-int(5)
-array(5) {
- [0]=>
- int(1)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- int(1)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 3 --
-int(5)
-array(5) {
- [0]=>
- int(12345)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- int(12345)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 4 --
-int(5)
-array(5) {
- [0]=>
- int(-2345)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- int(-2345)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 5 --
-int(5)
-array(5) {
- [0]=>
- float(10.5)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- float(10.5)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 6 --
-int(5)
-array(5) {
- [0]=>
- float(-10.5)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- float(-10.5)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 7 --
-int(5)
-array(5) {
- [0]=>
- float(123456789000)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- float(123456789000)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 8 --
-int(5)
-array(5) {
- [0]=>
- float(1.23456789E-9)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- float(1.23456789E-9)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 9 --
-int(5)
-array(5) {
- [0]=>
- float(0.5)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- float(0.5)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 10 --
-int(5)
-array(5) {
- [0]=>
- array(0) {
- }
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- array(0) {
- }
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 11 --
-int(5)
-array(5) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 12 --
-int(5)
-array(5) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- array(1) {
- [0]=>
- int(1)
- }
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 13 --
-int(5)
-array(5) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- }
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 14 --
-int(5)
-array(5) {
- [0]=>
- array(2) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- }
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- array(2) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- }
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 15 --
-int(5)
-array(5) {
- [0]=>
- NULL
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- NULL
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 16 --
-int(5)
-array(5) {
- [0]=>
- NULL
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- NULL
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 17 --
-int(5)
-array(5) {
- [0]=>
- bool(true)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- bool(true)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 18 --
-int(5)
-array(5) {
- [0]=>
- bool(false)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- bool(false)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 19 --
-int(5)
-array(5) {
- [0]=>
- bool(true)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- bool(true)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 20 --
-int(5)
-array(5) {
- [0]=>
- bool(false)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- bool(false)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 21 --
-int(5)
-array(5) {
- [0]=>
- string(0) ""
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(0) ""
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 22 --
-int(5)
-array(5) {
- [0]=>
- string(0) ""
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(0) ""
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 23 --
-int(5)
-array(5) {
- [0]=>
- string(6) "string"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(6) "string"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 24 --
-int(5)
-array(5) {
- [0]=>
- string(6) "string"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(6) "string"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 25 --
-int(5)
-array(5) {
- [0]=>
- string(11) "hello world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(11) "hello world"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 26 --
-int(5)
-array(5) {
- [0]=>
- object(classA)#%d (0) {
- }
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- object(classA)#%d (0) {
- }
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 27 --
-int(5)
-array(5) {
- [0]=>
- NULL
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- NULL
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 28 --
-int(5)
-array(5) {
- [0]=>
- NULL
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- NULL
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 29 --
-int(5)
-array(5) {
- [0]=>
- resource(%d) of type (stream)
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- resource(%d) of type (stream)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
-Done
---UEXPECTF--
-*** Testing array_unshift() : all possible values for $var argument ***
--- Iteration 1 --
-int(5)
array(5) {
[0]=>
int(0)
echo "Done";
?>
---EXPECTF--
-*** Testing array_unshift() : different arrays for $array argument ***
--- Iteration 1 --
-int(3)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-int(5)
-array(5) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- int(1)
- [4]=>
- int(2)
-}
--- Iteration 2 --
-int(3)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- float(1.1)
- [2]=>
- float(2.2)
-}
-int(5)
-array(5) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- float(1.1)
- [4]=>
- float(2.2)
-}
--- Iteration 3 --
-int(3)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- array(1) {
- [0]=>
- int(2)
- }
- [2]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
-int(5)
-array(5) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- array(1) {
- [0]=>
- int(2)
- }
- [4]=>
- array(1) {
- [0]=>
- int(1)
- }
-}
--- Iteration 4 --
-int(3)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- bool(false)
- [2]=>
- bool(true)
-}
-int(5)
-array(5) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- bool(false)
- [4]=>
- bool(true)
-}
--- Iteration 5 --
-int(1)
-array(1) {
- [0]=>
- int(10)
-}
-int(3)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
-}
--- Iteration 6 --
-int(2)
-array(2) {
- [0]=>
- int(10)
- [1]=>
- NULL
-}
-int(4)
-array(4) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- NULL
-}
--- Iteration 7 --
-int(7)
-array(7) {
- [0]=>
- int(10)
- [1]=>
- string(1) "a"
- [2]=>
- string(4) "aaaa"
- [3]=>
- string(1) "b"
- [4]=>
- string(4) "bbbb"
- [5]=>
- string(1) "c"
- [6]=>
- string(5) "ccccc"
-}
-int(9)
-array(9) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(1) "a"
- [4]=>
- string(4) "aaaa"
- [5]=>
- string(1) "b"
- [6]=>
- string(4) "bbbb"
- [7]=>
- string(1) "c"
- [8]=>
- string(5) "ccccc"
-}
--- Iteration 8 --
-int(4)
-array(4) {
- [0]=>
- int(10)
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- string(5) "three"
-}
-int(6)
-array(6) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(3) "one"
- [4]=>
- string(3) "two"
- [5]=>
- string(5) "three"
-}
--- Iteration 9 --
-int(4)
-array(4) {
- [0]=>
- int(10)
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
-int(6)
-array(6) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
-}
--- Iteration 10 --
-int(5)
-array(5) {
- [0]=>
- int(10)
- [1]=>
- int(10)
- [2]=>
- int(20)
- [3]=>
- int(40)
- [4]=>
- int(30)
-}
-int(7)
-array(7) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- int(10)
- [4]=>
- int(20)
- [5]=>
- int(40)
- [6]=>
- int(30)
-}
--- Iteration 11 --
-int(4)
-array(4) {
- [0]=>
- int(10)
- ["one"]=>
- string(3) "ten"
- ["two"]=>
- string(6) "twenty"
- ["three"]=>
- string(6) "thirty"
-}
-int(6)
-array(6) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["one"]=>
- string(3) "ten"
- ["two"]=>
- string(6) "twenty"
- ["three"]=>
- string(6) "thirty"
-}
--- Iteration 12 --
-int(4)
-array(4) {
- [0]=>
- int(10)
- ["one"]=>
- int(1)
- [1]=>
- string(3) "two"
- [2]=>
- string(4) "four"
-}
-int(6)
-array(6) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["one"]=>
- int(1)
- [3]=>
- string(3) "two"
- [4]=>
- string(4) "four"
-}
--- Iteration 13 --
-int(4)
-array(4) {
- [0]=>
- int(10)
- [""]=>
- string(4) "null"
- ["NULL"]=>
- NULL
- ["null"]=>
- NULL
-}
-int(6)
-array(6) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [""]=>
- string(4) "null"
- ["NULL"]=>
- NULL
- ["null"]=>
- NULL
-}
--- Iteration 14 --
-int(5)
-array(5) {
- [0]=>
- int(10)
- [1]=>
- string(4) "true"
- [2]=>
- string(5) "false"
- ["false"]=>
- bool(false)
- ["true"]=>
- bool(true)
-}
-int(7)
-array(7) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(4) "true"
- [4]=>
- string(5) "false"
- ["false"]=>
- bool(false)
- ["true"]=>
- bool(true)
-}
--- Iteration 15 --
-int(4)
-array(4) {
- [0]=>
- int(10)
- [""]=>
- string(6) "emptys"
- ["emptyd"]=>
- string(0) ""
- ["emptys"]=>
- string(0) ""
-}
-int(6)
-array(6) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [""]=>
- string(6) "emptys"
- ["emptyd"]=>
- string(0) ""
- ["emptys"]=>
- string(0) ""
-}
--- Iteration 16 --
-int(7)
-array(7) {
- [0]=>
- int(10)
- [1]=>
- string(0) ""
- [2]=>
- string(0) ""
- [3]=>
- NULL
- [4]=>
- NULL
- [5]=>
- bool(false)
- [6]=>
- bool(true)
-}
-int(9)
-array(9) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(0) ""
- [4]=>
- string(0) ""
- [5]=>
- NULL
- [6]=>
- NULL
- [7]=>
- bool(false)
- [8]=>
- bool(true)
-}
--- Iteration 17 --
-int(4)
-array(4) {
- [0]=>
- int(10)
- [""]=>
- int(4)
- [1]=>
- int(5)
- [2]=>
- int(6)
-}
-int(6)
-array(6) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [""]=>
- int(4)
- [3]=>
- int(5)
- [4]=>
- int(6)
-}
--- Iteration 18 --
-int(4)
-array(4) {
- [0]=>
- int(10)
- ["One"]=>
- int(10)
- ["two"]=>
- int(20)
- ["three"]=>
- int(3)
-}
-int(6)
-array(6) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["One"]=>
- int(10)
- ["two"]=>
- int(20)
- ["three"]=>
- int(3)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_unshift() : different arrays for $array argument ***
-- Iteration 1 --
int(3)
Warning: Illegal offset type in %s on line %d
-Warning: Illegal offset type in %s on line %d
--- Iteration 1 --
-int(1)
-array(1) {
- [0]=>
- int(10)
-}
-int(3)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
-}
--- Iteration 2 --
-int(2)
-array(2) {
- [0]=>
- int(10)
- [1]=>
- string(1) "0"
-}
-int(4)
-array(4) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(1) "0"
-}
--- Iteration 3 --
-int(2)
-array(2) {
- [0]=>
- int(10)
- [1]=>
- string(1) "1"
-}
-int(4)
-array(4) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(1) "1"
-}
--- Iteration 4 --
-int(5)
-array(5) {
- [0]=>
- int(10)
- [1]=>
- string(1) "1"
- [2]=>
- string(1) "2"
- [3]=>
- string(1) "3"
- [4]=>
- string(1) "4"
-}
-int(7)
-array(7) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(1) "1"
- [4]=>
- string(1) "2"
- [5]=>
- string(1) "3"
- [6]=>
- string(1) "4"
-}
--- Iteration 5 --
-int(2)
-array(2) {
- [0]=>
- int(10)
- [1]=>
- string(5) "float"
-}
-int(4)
-array(4) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(5) "float"
-}
--- Iteration 6 --
-int(5)
-array(5) {
- [0]=>
- int(10)
- [1]=>
- string(2) "f1"
- [2]=>
- string(2) "f2"
- [3]=>
- string(2) "f3"
- [4]=>
- string(2) "f4"
-}
-int(7)
-array(7) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(2) "f1"
- [4]=>
- string(2) "f2"
- [5]=>
- string(2) "f3"
- [6]=>
- string(2) "f4"
-}
--- Iteration 7 --
-int(5)
-array(5) {
- [0]=>
- int(10)
- ["\tHello"]=>
- int(111)
- ["re\td"]=>
- string(5) "color"
- ["\v\fworld"]=>
- float(2.2)
- ["pen\n"]=>
- int(33)
-}
-int(7)
-array(7) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["\tHello"]=>
- int(111)
- ["re\td"]=>
- string(5) "color"
- ["\v\fworld"]=>
- float(2.2)
- ["pen\n"]=>
- int(33)
-}
--- Iteration 8 --
-int(5)
-array(5) {
- [0]=>
- int(10)
- [" Hello"]=>
- int(111)
- ["re d"]=>
- string(5) "color"
- ["\v\fworld"]=>
- float(2.2)
- ["pen
-"]=>
- int(33)
-}
-int(7)
-array(7) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [" Hello"]=>
- int(111)
- ["re d"]=>
- string(5) "color"
- ["\v\fworld"]=>
- float(2.2)
- ["pen
-"]=>
- int(33)
-}
--- Iteration 9 --
-int(3)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- ["Hello world"]=>
- string(6) "string"
-}
-int(5)
-array(5) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(5) "hello"
- ["Hello world"]=>
- string(6) "string"
-}
--- Iteration 10 --
-int(2)
-array(2) {
- [0]=>
- int(10)
- [""]=>
- string(5) "hello"
-}
-int(4)
-array(4) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [""]=>
- string(5) "hello"
-}
--- Iteration 11 --
-int(7)
-array(7) {
- [0]=>
- int(10)
- ["hello"]=>
- int(1)
- ["fruit"]=>
- float(2.2)
- [1]=>
- string(3) "int"
- [2]=>
- string(5) "float"
- [""]=>
- string(5) "unset"
- ["Hello world"]=>
- string(7) "heredoc"
-}
-int(9)
-array(9) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["hello"]=>
- int(1)
- ["fruit"]=>
- float(2.2)
- [3]=>
- string(3) "int"
- [4]=>
- string(5) "float"
- [""]=>
- string(5) "unset"
- ["Hello world"]=>
- string(7) "heredoc"
-}
-Done
---UEXPECTF--
-*** Testing array_unshift() : associative array with different keys ***
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
-Warning: Illegal offset type in %s on line %d
-
Warning: Illegal offset type in %s on line %d
-- Iteration 1 --
int(1)
int(10)
}
int(3)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
-}
--- Iteration 2 --
-int(2)
-array(2) {
- [0]=>
- int(10)
- [1]=>
- int(0)
-}
-int(4)
-array(4) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- int(0)
-}
--- Iteration 3 --
-int(2)
-array(2) {
- [0]=>
- int(10)
- [1]=>
- int(1)
-}
-int(4)
-array(4) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- int(1)
-}
--- Iteration 4 --
-int(5)
-array(5) {
- [0]=>
- int(10)
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- [1]=>
- int(4)
-}
-int(7)
-array(7) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- [3]=>
- int(4)
-}
--- Iteration 5 --
-int(2)
-array(2) {
- [0]=>
- int(10)
- ["float"]=>
- float(2.3333)
-}
-int(4)
-array(4) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["float"]=>
- float(2.3333)
-}
--- Iteration 6 --
-int(5)
-array(5) {
- [0]=>
- int(10)
- ["f1"]=>
- float(1.2)
- ["f2"]=>
- float(3.33)
- [1]=>
- float(4.8999992284)
- ["f4"]=>
- float(33333333.3333)
-}
-int(7)
-array(7) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f1"]=>
- float(1.2)
- ["f2"]=>
- float(3.33)
- [3]=>
- float(4.8999992284)
- ["f4"]=>
- float(33333333.3333)
-}
--- Iteration 7 --
-int(5)
-array(5) {
- [0]=>
- int(10)
- [1]=>
- string(6) " Hello"
- ["red"]=>
- string(6) "col or"
- [2]=>
- string(7) "\v\fworld"
- [3]=>
- string(4) "pen
-"
-}
-int(7)
-array(7) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(6) " Hello"
- ["red"]=>
- string(6) "col or"
- [4]=>
- string(7) "\v\fworld"
- [5]=>
- string(4) "pen
-"
-}
--- Iteration 8 --
-int(5)
-array(5) {
- [0]=>
- int(10)
- [1]=>
- string(7) "\tHello"
- ["red"]=>
- string(7) "col\tor"
- [2]=>
- string(9) "\v\fworld"
- [3]=>
- string(5) "pen\n"
-}
-int(7)
-array(7) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(7) "\tHello"
- ["red"]=>
- string(7) "col\tor"
- [4]=>
- string(9) "\v\fworld"
- [5]=>
- string(5) "pen\n"
-}
--- Iteration 9 --
-int(3)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- ["heredoc"]=>
- string(11) "Hello world"
-}
-int(5)
-array(5) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(5) "hello"
- ["heredoc"]=>
- string(11) "Hello world"
-}
--- Iteration 10 --
-int(4)
-array(4) {
- [0]=>
- int(10)
- [1]=>
- object(classA)#%d (0) {
- }
- ["unset"]=>
- NULL
- ["resource"]=>
- resource(%d) of type (stream)
-}
-int(6)
-array(6) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- object(classA)#%d (0) {
- }
- ["unset"]=>
- NULL
- ["resource"]=>
- resource(%d) of type (stream)
-}
--- Iteration 11 --
-int(9)
-array(9) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- object(classA)#%d (0) {
- }
- [3]=>
- string(5) "fruit"
- ["resource"]=>
- resource(%d) of type (stream)
- ["int"]=>
- int(133)
- ["float"]=>
- float(444.432)
- ["unset"]=>
- NULL
- ["heredoc"]=>
- string(11) "Hello world"
-}
-int(11)
-array(11) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- string(5) "hello"
- [4]=>
- object(classA)#%d (0) {
- }
- [5]=>
- string(5) "fruit"
- ["resource"]=>
- resource(%d) of type (stream)
- ["int"]=>
- int(133)
- ["float"]=>
- float(444.432)
- ["unset"]=>
- NULL
- ["heredoc"]=>
- string(11) "Hello world"
-}
-Done
---UEXPECTF--
-*** Testing array_unshift() : associative array with different values ***
--- Iteration 1 --
-int(1)
-array(1) {
- [0]=>
- int(10)
-}
-int(3)
array(3) {
[0]=>
int(10)
echo "Done";
?>
---EXPECTF--
-*** Testing array_unshift() : two dimensional arrays for $array argument ***
-int(4)
-array(4) {
- [0]=>
- int(10)
- [1]=>
- array(3) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- ["place"]=>
- string(2) "LA"
- }
- [2]=>
- array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- }
- [3]=>
- array(7) {
- ["a"]=>
- string(5) "green"
- [0]=>
- string(3) "red"
- [1]=>
- string(5) "brown"
- [2]=>
- int(33)
- [3]=>
- int(88)
- [4]=>
- string(6) "orange"
- ["item"]=>
- string(4) "ball"
- }
-}
-int(6)
-array(6) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- [3]=>
- array(3) {
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- ["place"]=>
- string(2) "LA"
- }
- [4]=>
- array(5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- }
- [5]=>
- array(7) {
- ["a"]=>
- string(5) "green"
- [0]=>
- string(3) "red"
- [1]=>
- string(5) "brown"
- [2]=>
- int(33)
- [3]=>
- int(88)
- [4]=>
- string(6) "orange"
- ["item"]=>
- string(4) "ball"
- }
-}
-int(4)
-array(4) {
- [0]=>
- int(10)
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- ["place"]=>
- string(2) "LA"
-}
-int(6)
-array(6) {
- [0]=>
- int(10)
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["color"]=>
- string(3) "red"
- ["item"]=>
- string(3) "pen"
- ["place"]=>
- string(2) "LA"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_unshift() : two dimensional arrays for $array argument ***
int(4)
array(4) {
echo "Done";
?>
---EXPECTF--
-*** Testing array_unshift() : double quoted strings for $var argument ***
--- Iteration 1 --
-int(5)
-array(5) {
- [0]=>
- string(53) "$ -> This represents the dollar sign. hello dollar!!!"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(53) "$ -> This represents the dollar sign. hello dollar!!!"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 2 --
-int(5)
-array(5) {
- [0]=>
- string(49) "
-\v The quick brown fo\fx jumped over the lazy dog"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(49) "
-\v The quick brown fo\fx jumped over the lazy dog"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 3 --
-int(5)
-array(5) {
- [0]=>
- string(55) "This is a text with special chars: \!\@\#$\%\^\&\*\(\)\"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(55) "This is a text with special chars: \!\@\#$\%\^\&\*\(\)\"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 4 --
-int(5)
-array(5) {
- [0]=>
- string(13) "hello world\t"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(13) "hello world\t"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 5 --
-int(5)
-array(5) {
- [0]=>
- string(70) "This is a text in bold letters
-\s\malong with slashes
- : HELLO WORLD "
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(70) "This is a text in bold letters
-\s\malong with slashes
- : HELLO WORLD "
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_unshift() : double quoted strings for $var argument ***
-- Iteration 1 --
int(5)
echo "Done";
?>
---EXPECTF--
-*** Testing array_unshift() : single quoted strings for $var argument ***
--- Iteration 1 --
-int(5)
-array(5) {
- [0]=>
- string(54) "\$ -> This represents the dollar sign. hello dollar!!!"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(54) "\$ -> This represents the dollar sign. hello dollar!!!"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 2 --
-int(5)
-array(5) {
- [0]=>
- string(53) "\t\r\v The quick brown fo\fx jumped over the lazy dog"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(53) "\t\r\v The quick brown fo\fx jumped over the lazy dog"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 3 --
-int(5)
-array(5) {
- [0]=>
- string(56) "This is a text with special chars: \!\@\#\$\%\^\&\*\(\)\"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(56) "This is a text with special chars: \!\@\#\$\%\^\&\*\(\)\"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 4 --
-int(5)
-array(5) {
- [0]=>
- string(13) "hello world\t"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(13) "hello world\t"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 5 --
-int(5)
-array(5) {
- [0]=>
- string(74) "This is \ta text in bold letters\r\s\malong with slashes\n : HELLO WORLD\t"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(74) "This is \ta text in bold letters\r\s\malong with slashes\n : HELLO WORLD\t"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_unshift() : single quoted strings for $var argument ***
-- Iteration 1 --
int(5)
echo "Done";
?>
---EXPECTF--
-*** Testing array_unshift() : heredoc strings for $var argument ***
--- Iteration 1 --
-int(5)
-array(5) {
- [0]=>
- string(0) ""
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(0) ""
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 2 --
-int(5)
-array(5) {
- [0]=>
- string(1) "
-"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(1) "
-"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 3 --
-int(5)
-array(5) {
- [0]=>
- string(86) "hello world
-The big brown fox jumped over;
-the lazy dog
-This is a double quoted string"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(86) "hello world
-The big brown fox jumped over;
-the lazy dog
-This is a double quoted string"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 4 --
-int(5)
-array(5) {
- [0]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(88) "hello
- world
-1111 != 2222\v\v
-heredoc
-double quoted string. with\vdifferent\fwhite\vspaces"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 5 --
-int(5)
-array(5) {
- [0]=>
- string(44) "11 < 12. 123 >22
-2222 != 1111. 0000 = 0000
-"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(44) "11 < 12. 123 >22
-2222 != 1111. 0000 = 0000
-"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
--- Iteration 6 --
-int(5)
-array(5) {
- [0]=>
- string(123) "This's a string with quotes:
-"strings in double quote";
-'strings in single quote';
-this\line is single quoted /with\slashes"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- string(123) "This's a string with quotes:
-"strings in double quote";
-'strings in single quote';
-this\line is single quoted /with\slashes"
- [1]=>
- string(5) "hello"
- [2]=>
- string(5) "world"
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [3]=>
- int(1)
- [4]=>
- float(2.222)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_unshift() : heredoc strings for $var argument ***
-- Iteration 1 --
int(5)
?>
--EXPECTF--
-string(1) "A"
---UEXPECTF--
unicode(1) "A"
echo "Done";
?>
---EXPECTF--
-*** Testing array_values() : basic functionality ***
-array(5) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- int(3)
- [4]=>
- string(3) "ten"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_values() : basic functionality ***
array(5) {
[0]=>
[4]=>
unicode(3) "ten"
}
-Done
\ No newline at end of file
+Done
echo "Done\n";
?>
---EXPECTF--
-*** Testing error conditions ***
-
-Warning: array_values() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: array_values() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: array_values() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: array_values() expects parameter 1 to be array, object given in %s on line %d
-NULL
-Done
---UEXPECTF--
+--EXPECTF--
*** Testing error conditions ***
Warning: array_values() expects exactly 1 parameter, 0 given in %s on line %d
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
*** Testing array_values() with resource type ***
array(2) {
[0]=>
-- Iteration 16 --
-Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-array(0) {
-}
-
--- Iteration 19 --
-
-Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: array_values() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: array_values() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: array_values() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: array_values() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing array_values() : usage variations ***
-
--- Iteration 1 --
-
-Warning: array_values() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: array_values() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: array_values() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: array_values() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: array_values() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: array_values() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: array_values() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: array_values() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: array_values() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: array_values() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: array_values() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: array_values() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: array_values() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: array_values() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: array_values() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 16 --
-
Warning: array_values() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
Warning: array_values() expects parameter 1 to be array, resource given in %s on line %d
NULL
-Done
\ No newline at end of file
+Done
bool(false)
}
--- Iteration 5: empty string data --
-array(2) {
- [0]=>
- string(0) ""
- [1]=>
- string(0) ""
-}
-
--- Iteration 6: empty array data --
-array(0) {
-}
-
--- Iteration 7: string data --
-array(3) {
- [0]=>
- string(6) "string"
- [1]=>
- string(6) "string"
- [2]=>
- string(11) "hello world"
-}
-
--- Iteration 8: object data --
-array(1) {
- [0]=>
- object(classA)#%d (0) {
- }
-}
-
--- Iteration 9: undefined data --
-array(1) {
- [0]=>
- NULL
-}
-
--- Iteration 10: unset data --
-array(1) {
- [0]=>
- NULL
-}
-
--- Iteration 11: resource data --
-array(1) {
- [0]=>
- resource(%d) of type (stream)
-}
-Done
---UEXPECTF--
-*** Testing array_values() : usage variations ***
-
--- Iteration 1: int data --
-array(4) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(12345)
- [3]=>
- int(-2345)
-}
-
--- Iteration 2: float data --
-array(5) {
- [0]=>
- float(10.5)
- [1]=>
- float(-10.5)
- [2]=>
- float(123456789000)
- [3]=>
- float(1.23456789E-9)
- [4]=>
- float(0.5)
-}
-
--- Iteration 3: null data --
-array(2) {
- [0]=>
- NULL
- [1]=>
- NULL
-}
-
--- Iteration 4: bool data --
-array(4) {
- [0]=>
- bool(true)
- [1]=>
- bool(false)
- [2]=>
- bool(true)
- [3]=>
- bool(false)
-}
-
-- Iteration 5: empty string data --
array(2) {
[0]=>
[0]=>
resource(%d) of type (stream)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_values() : usage variations ***
-
--- Iteration 1: int data --
-array(4) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- string(8) "positive"
- [3]=>
- string(8) "negative"
-}
-
--- Iteration 2: float data --
-array(3) {
- [0]=>
- string(8) "positive"
- [1]=>
- string(8) "negative"
- [2]=>
- string(4) "half"
-}
-
--- Iteration 3: extreme floats data --
-array(2) {
- [0]=>
- string(5) "large"
- [1]=>
- string(5) "small"
-}
-
--- Iteration 4: null uppercase data --
-array(1) {
- [0]=>
- string(6) "null 1"
-}
-
--- Iteration 5: null lowercase data --
-array(1) {
- [0]=>
- string(6) "null 2"
-}
-
--- Iteration 6: bool lowercase data --
-array(2) {
- [0]=>
- string(6) "lowert"
- [1]=>
- string(6) "lowerf"
-}
-
--- Iteration 7: bool uppercase data --
-array(2) {
- [0]=>
- string(6) "uppert"
- [1]=>
- string(6) "upperf"
-}
-
--- Iteration 8: empty double quotes data --
-array(1) {
- [0]=>
- string(6) "emptyd"
-}
-
--- Iteration 9: empty single quotes data --
-array(1) {
- [0]=>
- string(6) "emptys"
-}
-
--- Iteration 10: string data --
-array(3) {
- [0]=>
- string(7) "stringd"
- [1]=>
- string(7) "strings"
- [2]=>
- string(7) "stringh"
-}
-
--- Iteration 11: undefined data --
-array(1) {
- [0]=>
- string(9) "undefined"
-}
-
--- Iteration 12: unset data --
-array(1) {
- [0]=>
- string(5) "unset"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_values() : usage variations ***
-- Iteration 1: int data --
[0]=>
unicode(5) "unset"
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_values() : usage variations ***
-
--- Array values of a two-dimensional array --
-array(3) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-
--- Array values of a sub-array --
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-
--- Array values of an infinitely recursive array --
-array(4) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [3]=>
- &array(4) {
- ["zero"]=>
- string(4) "zero"
- ["un"]=>
- string(3) "one"
- ["sub"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [0]=>
- &array(4) {
- ["zero"]=>
- string(4) "zero"
- ["un"]=>
- string(3) "one"
- ["sub"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [0]=>
- *RECURSION*
- }
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_values() : usage variations ***
-- Array values of a two-dimensional array --
}
}
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing array_values() : usage variations ***
-
--- Call array_values() --
-array(3) {
- [0]=>
- string(2) "un"
- [1]=>
- string(4) "deux"
- [2]=>
- string(5) "trois"
-}
--- Position of Internal Pointer in Result: --
-0 => un
-
--- Position of Internal Pointer in Original Array: --
-one => un
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_values() : usage variations ***
-- Call array_values() --
-- Position of Internal Pointer in Original Array: --
one => un
-Done
\ No newline at end of file
+Done
Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
*** Testing array_values() : usage variations ***
--- $input is an array made up of referenced variables: --
-array(3) {
- [0]=>
- &string(3) "one"
- [1]=>
- &string(3) "two"
- [2]=>
- &string(5) "three"
-}
-Change $val2 and check result of array_values():
-array(3) {
- [0]=>
- &string(3) "one"
- [1]=>
- &string(4) "deux"
- [2]=>
- &string(5) "three"
-}
-
--- Pass $input argument by reference --
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-Done
---UEXPECTF--
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-*** Testing array_values() : usage variations ***
-
-- $input is an array made up of referenced variables: --
array(3) {
[0]=>
echo "Done";
?>
---EXPECTF--
-*** Testing array_values() : usage variations ***
-
--- $input argument: --
-array(4) {
- [3]=>
- string(5) "three"
- [2]=>
- string(3) "two"
- [1]=>
- string(3) "one"
- [0]=>
- string(4) "zero"
-}
-
--- Result of array_values() --
-array(4) {
- [0]=>
- string(5) "three"
- [1]=>
- string(3) "two"
- [2]=>
- string(3) "one"
- [3]=>
- string(4) "zero"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_values() : usage variations ***
-- $input argument: --
[3]=>
unicode(4) "zero"
}
-Done
\ No newline at end of file
+Done
var_dump( array_values(array()) ); // null array
?>
---EXPECTF--
+--EXPECTF--
*** Testing array_values() with resource type ***
array(2) {
[0]=>
echo "Done\n";
?>
---EXPECTF--
-Warning: array_walk() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
-int(1)
-int(0)
-string(4) "data"
-int(2)
-int(1)
-string(4) "data"
-bool(true)
-string(4) "data"
-Done
---UEXPECTF--
+--EXPECTF--
Warning: array_walk() expects at least 2 parameters, 0 given in %s on line %d
NULL
--EXPECT--
*** Testing array_walk() : basic functionality ***
-- Using array_walk() with default parameters to show array contents --
-string(5) "lemon"
-int(0)
-
-string(6) "orange"
-int(1)
-
-string(6) "banana"
-int(2)
-
-string(5) "apple"
-int(3)
-
-bool(true)
--- Using array_walk() with all parameters --
-string(5) "lemon"
-int(0)
-string(5) "Added"
-
-string(6) "orange"
-int(1)
-string(5) "Added"
-
-string(6) "banana"
-int(2)
-string(5) "Added"
-
-string(5) "apple"
-int(3)
-string(5) "Added"
-
-bool(true)
-Done
---UEXPECTF--
-*** Testing array_walk() : basic functionality ***
--- Using array_walk() with default parameters to show array contents --
unicode(5) "lemon"
int(0)
--EXPECT--
*** Testing array_walk() : basic functionality ***
-- Using array_walk with default parameters to show array contents --
-string(5) "lemon"
-string(1) "d"
-
-string(6) "orange"
-string(1) "a"
-
-string(6) "banana"
-string(1) "b"
-
-string(5) "apple"
-string(1) "c"
-
-bool(true)
--- Using array_walk with one optional parameter to modify contents --
-string(5) "lemon"
-string(1) "d"
-string(5) "fruit"
-
-string(6) "orange"
-string(1) "a"
-string(5) "fruit"
-
-string(6) "banana"
-string(1) "b"
-string(5) "fruit"
-
-string(5) "apple"
-string(1) "c"
-string(5) "fruit"
-
-bool(true)
--- Using array_walk with default parameters to show modified array contents --
-string(5) "lemon"
-string(1) "d"
-
-string(6) "orange"
-string(1) "a"
-
-string(6) "banana"
-string(1) "b"
-
-string(5) "apple"
-string(1) "c"
-
-bool(true)
-Done
---UEXPECTF--
-*** Testing array_walk() : basic functionality ***
--- Using array_walk with default parameters to show array contents --
unicode(5) "lemon"
unicode(1) "d"
Warning: array_walk() expects parameter 2 to be a valid callback, function 'non_existent' not found or invalid function name in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_walk() : error conditions ***
--- Testing array_walk() function with zero arguments --
-
-Warning: array_walk() expects at least 2 parameters, 0 given in %s on line %d
-NULL
--- Testing array_walk() function with one argument --
-
-Warning: array_walk() expects at least 2 parameters, 1 given in %s on line %d
-NULL
--- Testing array_walk() function with non existent callback function --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function 'non_existent' not found or invalid function name in %s on line %d
-NULL
-Done
Warning: array_walk() expects at most 3 parameters, 4 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_walk() : error conditions - callback parameters ***
-
-Warning: Missing argument 3 for callback1() in %s on line %d
-
-callback1() invoked
-bool(true)
-
-Warning: Missing argument 4 for callback2() in %s on line %d
-
-callback2() invoked
-bool(true)
-
-callback1() invoked
-bool(true)
-
-callback2() invoked
-bool(true)
--- Testing array_walk() function with too many callback parameters --
-
-Warning: array_walk() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-Done
echo "Done"
?>
---EXPECTF--
-*** Testing array_walk() : array of objects ***
--- For private member --
-value : int(3)
-key : int(0)
-value : int(10)
-key : int(1)
-value : int(20)
-key : int(2)
-value : int(-10)
-key : int(3)
-bool(true)
--- For public member --
-value : int(3)
-value : int(10)
-value : int(20)
-value : int(-10)
-bool(true)
--- For protected member --
-value : int(3)
-value : int(10)
-value : int(20)
-value : int(-10)
-bool(true)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_walk() : array of objects ***
-- For private member --
value : int(3)
var_dump (array_walk_recursive ($arr, 'bar'));
?>
---EXPECTF--
+--EXPECT--
1 foo
2 foo
3 foo
echo "Done\n";
?>
---EXPECTF--
-Warning: array_walk_recursive() expects at least 2 parameters, 0 given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
-int(1)
-int(0)
-string(4) "data"
-int(2)
-int(1)
-string(4) "data"
-int(2)
-int(0)
-string(4) "data"
-int(3)
-int(1)
-string(4) "data"
-bool(true)
-string(4) "data"
-Done
---UEXPECTF--
+--EXPECTF--
Warning: array_walk_recursive() expects at least 2 parameters, 0 given in %s on line %d
NULL
--EXPECT--
*** Testing array_walk_recursive() : basic functionality ***
-- Using array_walk_recursive() with default parameters to show array contents --
-string(5) "lemon"
-int(0)
-
-string(6) "orange"
-int(0)
-
-string(6) "banana"
-int(1)
-
-string(5) "apple"
-int(0)
-
-bool(true)
--- Using array_walk_recursive() with all parameters --
-string(5) "lemon"
-int(0)
-string(5) "Added"
-
-string(6) "orange"
-int(0)
-string(5) "Added"
-
-string(6) "banana"
-int(1)
-string(5) "Added"
-
-string(5) "apple"
-int(0)
-string(5) "Added"
-
-bool(true)
-Done
---UEXPECTF--
-*** Testing array_walk_recursive() : basic functionality ***
--- Using array_walk_recursive() with default parameters to show array contents --
unicode(5) "lemon"
int(0)
--EXPECT--
*** Testing array_walk_recursive() : basic functionality ***
-- Using array_walk_recursive with default parameters to show array contents --
-string(5) "lemon"
-string(1) "a"
-
-string(6) "orange"
-string(1) "c"
-
-string(6) "banana"
-string(1) "d"
-
-string(5) "apple"
-string(1) "f"
-
-bool(true)
--- Using array_walk_recursive with one optional parameter to modify contents --
-string(5) "lemon"
-string(1) "a"
-string(5) "fruit"
-
-string(6) "orange"
-string(1) "c"
-string(5) "fruit"
-
-string(6) "banana"
-string(1) "d"
-string(5) "fruit"
-
-string(5) "apple"
-string(1) "f"
-string(5) "fruit"
-
-bool(true)
--- Using array_walk_recursive with default parameters to show modified array contents --
-string(5) "lemon"
-string(1) "a"
-
-string(6) "orange"
-string(1) "c"
-
-string(6) "banana"
-string(1) "d"
-
-string(5) "apple"
-string(1) "f"
-
-bool(true)
-Done
---UEXPECTF--
-*** Testing array_walk_recursive() : basic functionality ***
--- Using array_walk_recursive with default parameters to show array contents --
unicode(5) "lemon"
unicode(1) "a"
Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function 'non_existent' not found or invalid function name in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_walk_recursive() : error conditions ***
--- Testing array_walk_recursive() function with zero arguments --
-
-Warning: array_walk_recursive() expects at least 2 parameters, 0 given in %s on line %d
-NULL
--- Testing array_walk_recursive() function with one argument --
-
-Warning: array_walk_recursive() expects at least 2 parameters, 1 given in %s on line %d
-NULL
--- Testing array_walk_recursive() function with non existent callback function --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function 'non_existent' not found or invalid function name in %s on line %d
-NULL
-Done
Warning: array_walk_recursive() expects at most 3 parameters, 4 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_walk_recursive() : error conditions - callback parameters ***
-
-Warning: Missing argument 3 for callback1() in %s on line %d
-
-callback1() invoked
-bool(true)
-
-Warning: Missing argument 4 for callback2() in %s on line %d
-
-callback2() invoked
-bool(true)
-
-callback1() invoked
-bool(true)
-
-callback2() invoked
-bool(true)
--- Testing array_walk_recursive() function with too many callback parameters --
-
-Warning: array_walk_recursive() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-Done
echo "Done"
?>
---EXPECTF--
-*** Testing array_walk_recursive() : array of objects ***
--- For private member --
-value : int(3)
-key : int(0)
-value : int(10)
-key : int(1)
-value : int(20)
-key : int(1)
-value : int(-10)
-key : int(0)
-bool(true)
--- For public member --
-value : int(3)
-value : int(10)
-value : int(20)
-value : int(-10)
-bool(true)
--- For protected member --
-value : int(3)
-value : int(10)
-value : int(20)
-value : int(-10)
-bool(true)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_walk_recursive() : array of objects ***
-- For private member --
value : int(3)
Warning: array_walk_recursive(): The argument should be an array in %s on line %d
bool(false)
Done
---UEXPECTF--
-*** Testing array_walk_recursive() : unexpected values for 'input' argument ***
--- Iteration 1 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-Done
Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_walk_recursive() : unexpected values for 'funcname' argument ***
--- Iteration 1 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 25 --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-Done
}
echo "Done"
?>
---EXPECTF--
-*** Testing array_walk_recursive() : 'input' array with different values***
-
--- Iteration 1 --
-1 : 0 1
-1 : 1 0
-1 : 2 -10
-1 : 0 19
-1 : 1 -33
-1 : 0 90
-1 : 1 31
-1 : 2 -110
-bool(true)
-
--- Iteration 2 --
-2 : 0 3.4
-2 : 1 0.8
-2 : 2 -2.9
-2 : 0 625
-2 : 1 0.0082
-bool(true)
-
--- Iteration 3 --
-3 : 0 Mango
-3 : 0 Apple
-3 : 1 Orange
-3 : 2 Lemon
-bool(true)
-
--- Iteration 4 --
-4 : 0 1
-4 : 1
-4 : 0 1
-4 : 1
-bool(true)
-
--- Iteration 5 --
-5 : 0
-5 : 0
-bool(true)
-
--- Iteration 6 --
-bool(true)
-
--- Iteration 7 --
-7 : 0 binary
-bool(true)
-
--- Iteration 8 --
-8 : 0 16
-8 : 1 8.345
-8 : 0 Fruits
-8 : 0 1
-8 : 1
-8 : 0
-8 : 0 -98
-8 : 1 0.005
-8 : 2 banana
-bool(true)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_walk_recursive() : 'input' array with different values***
-- Iteration 1 --
echo "Done"
?>
---EXPECTF--
-*** Testing array_walk_recursive() : array with subarray ***
-int(0)
-int(1)
-
-int(0)
-int(1)
-
-int(1)
-int(2)
-
-int(2)
-int(3)
-
-int(0)
-string(5) "Mango"
-
-int(1)
-string(6) "Orange"
-
-int(0)
-int(1)
-
-int(1)
-int(2)
-
-int(2)
-int(3)
-
-int(0)
-int(1)
-
-bool(true)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_walk_recursive() : array with subarray ***
int(0)
int(1)
echo "Done"
?>
---EXPECTF--
-*** Testing array_walk_recursive() : array with references ***
-int(0)
-int(10)
-
-int(0)
-int(-20)
-
-int(1)
-int(-35)
-
-int(0)
-int(10)
-
-int(1)
-int(0)
-
-int(0)
-int(50)
-
-bool(true)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_walk_recursive() : array with references ***
int(0)
int(10)
echo "Done"
?>
---EXPECTF--
-*** Testing array_walk_recursive() : 'input' as an associative array ***
--- Associative array with numeric keys --
-int(1)
-int(25)
-int(10)
-
-int(5)
-int(12)
-int(10)
-
-int(0)
-int(-80)
-int(10)
-
-int(-2)
-int(100)
-int(10)
-
-int(5)
-int(30)
-int(10)
-
-bool(true)
--- Associative array with string keys --
-string(1) "a"
-string(5) "Apple"
-
-string(1) "b"
-string(7) "Bananna"
-
-string(1) "c"
-string(6) "carrot"
-
-string(1) "o"
-string(6) "Orange"
-
-bool(true)
--- Associative array with binary keys --
-string(1) "a"
-string(5) "Apple"
-
-string(1) "b"
-string(6) "Banana"
-
-bool(true)
--- Associative array with numeric/string keys --
-int(0)
-int(1)
-
-int(1)
-int(2)
-
-string(1) "a"
-string(5) "Apple"
-
-string(1) "b"
-string(6) "Banana"
-
-int(2)
-int(3)
-
-bool(true)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_walk_recursive() : 'input' as an associative array ***
-- Associative array with numeric keys --
int(1)
1
bool(true)
Done
---UEXPECTF--
-*** Testing array_walk_recursive() : anonymous function as callback ***
--- Anonymous function with one argument --
-int(2)
-
-int(5)
-
-int(10)
-
-int(0)
-
-bool(true)
--- Anonymous function with two arguments --
-int(0)
-int(2)
-
-int(1)
-int(5)
-
-int(0)
-int(10)
-
-int(1)
-int(0)
-
-bool(true)
--- Anonymous function with three arguments --
-int(0)
-int(2)
-int(10)
-
-int(1)
-int(5)
-int(10)
-
-int(0)
-int(10)
-int(10)
-
-int(1)
-int(0)
-int(10)
-
-bool(true)
--- Anonymous function with one more argument --
-
-Warning: array_walk_recursive() expects at most 3 parameters, 4 given in %s on line %d
-NULL
--- Anonymous function with null argument --
-1
-1
-1
-1
-bool(true)
-Done
Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_walk_recursive() : built-in function as callback ***
--- With 'pow' built-in function --
-bool(true)
--- With 'min' built-in function --
-bool(true)
--- With 'echo' language construct --
-
-Warning: array_walk_recursive() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
-Done
echo "Done"
?>
---EXPECTF--
-*** Testing array_walk_recursive() : callback function variation ***
--- callback function with both parameters --
-int(0)
-string(5) "Apple"
-
-int(1)
-string(6) "Banana"
-
-int(1)
-string(5) "Mango"
-
-int(0)
-string(6) "Orange"
-
-bool(true)
--- callback function with only one parameter --
-string(5) "Apple"
-
-string(6) "Banana"
-
-string(5) "Mango"
-
-string(6) "Orange"
-
-bool(true)
--- callback function without parameters --
-callback3() called
-callback3() called
-callback3() called
-callback3() called
-bool(true)
--- passing one more parameter to function with two parameters --
-int(0)
-string(5) "Apple"
-
-int(1)
-string(6) "Banana"
-
-int(1)
-string(5) "Mango"
-
-int(0)
-string(6) "Orange"
-
-bool(true)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_walk_recursive() : callback function variation ***
-- callback function with both parameters --
int(0)
Warning: array_walk(): The argument should be an array in %s on line %d
bool(false)
Done
---UEXPECTF--
-*** Testing array_walk() : unexpected values for 'input' argument ***
--- Iteration 1 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-Done
Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_walk() : unexpected values for 'funcname' argument ***
--- Iteration 1 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 25 --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-
-Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-Done
}
echo "Done"
?>
---EXPECTF--
-*** Testing array_walk() : 'input' array with different values***
-
--- Iteration 1 --
-1 : 0 1
-1 : 1 0
-1 : 2 -10
-1 : 3 19
-1 : 4 -33
-1 : 5 90
-1 : 6 31
-1 : 7 -110
-bool(true)
-
--- Iteration 2 --
-2 : 0 3.4
-2 : 1 0.8
-2 : 2 -2.9
-2 : 3 625
-2 : 4 0.0082
-bool(true)
-
--- Iteration 3 --
-3 : 0 Mango
-3 : 1 Apple
-3 : 2 Orange
-3 : 3 Lemon
-bool(true)
-
--- Iteration 4 --
-4 : 0 1
-4 : 1
-4 : 2 1
-4 : 3
-bool(true)
-
--- Iteration 5 --
-5 : 0
-5 : 1
-bool(true)
-
--- Iteration 6 --
-bool(true)
-
--- Iteration 7 --
-7 : 0 binary
-bool(true)
-
--- Iteration 8 --
-8 : 0 16
-8 : 1 8.345
-8 : 2 Fruits
-8 : 3 1
-8 : 4
-8 : 5
-8 : 6 -98
-8 : 7 0.005
-8 : 8 banana
-bool(true)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_walk() : 'input' array with different values***
-- Iteration 1 --
echo "Done"
?>
---EXPECTF--
-*** Testing array_walk() : array with subarray ***
-int(0)
-array(0) {
-}
-
-int(1)
-array(1) {
- [0]=>
- int(1)
-}
-
-int(2)
-array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-
-int(3)
-array(2) {
- [0]=>
- string(5) "Mango"
- [1]=>
- string(6) "Orange"
-}
-
-int(4)
-array(1) {
- [0]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
-}
-
-bool(true)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_walk() : array with subarray ***
int(0)
array(0) {
echo "Done"
?>
---EXPECTF--
-*** Testing array_walk() : array with references ***
-int(0)
-int(10)
-
-int(1)
-int(-20)
-
-int(2)
-int(-35)
-
-int(3)
-int(10)
-
-int(4)
-int(0)
-
-int(5)
-int(50)
-
-bool(true)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_walk() : array with references ***
int(0)
int(10)
echo "Done"
?>
---EXPECTF--
-*** Testing array_walk() : 'input' as an associative array ***
--- Associative array with numeric keys --
-int(1)
-int(25)
-int(10)
-
-int(5)
-int(30)
-int(10)
-
-int(0)
-int(-80)
-int(10)
-
-int(-2)
-int(100)
-int(10)
-
-bool(true)
--- Associative array with string keys --
-string(1) "a"
-string(5) "Apple"
-
-string(1) "b"
-string(7) "Bananna"
-
-string(1) "c"
-string(6) "carrot"
-
-string(1) "o"
-string(6) "Orange"
-
-bool(true)
--- Associative array with binary keys --
-string(1) "a"
-string(5) "Apple"
-
-string(1) "b"
-string(6) "Banana"
-
-bool(true)
--- Associative array with numeric/string keys --
-int(0)
-int(1)
-
-int(1)
-int(2)
-
-string(1) "a"
-string(5) "Apple"
-
-string(1) "b"
-string(6) "Banana"
-
-int(2)
-int(3)
-
-bool(true)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_walk() : 'input' as an associative array ***
-- Associative array with numeric keys --
int(1)
1
bool(true)
Done
---UEXPECTF--
-*** Testing array_walk() : anonymous function as callback ***
--- Anonymous function with one argument --
-int(2)
-
-int(5)
-
-int(10)
-
-int(0)
-
-bool(true)
--- Anonymous function with two arguments --
-int(0)
-int(2)
-
-int(1)
-int(5)
-
-int(2)
-int(10)
-
-int(3)
-int(0)
-
-bool(true)
--- Anonymous function with three arguments --
-int(0)
-int(2)
-int(10)
-
-int(1)
-int(5)
-int(10)
-
-int(2)
-int(10)
-int(10)
-
-int(3)
-int(0)
-int(10)
-
-bool(true)
--- Anonymous function with one more argument --
-
-Warning: array_walk() expects at most 3 parameters, 4 given in %s on line %d
-NULL
--- Anonymous function with null argument --
-1
-1
-1
-1
-bool(true)
-Done
Warning: array_walk() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing array_walk() : built-in function as callback ***
--- With 'pow' built-in function --
-bool(true)
--- With 'min' built-in function --
-bool(true)
--- With 'echo' language construct --
-
-Warning: array_walk() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
-Done
echo "Done"
?>
---EXPECTF--
-*** Testing array_walk() : callback function variation ***
--- callback function with both parameters --
-int(0)
-string(5) "Apple"
-
-int(1)
-string(6) "Banana"
-
-int(2)
-string(5) "Mango"
-
-int(3)
-string(6) "Orange"
-
-bool(true)
--- callback function with only one parameter --
-string(5) "Apple"
-
-string(6) "Banana"
-
-string(5) "Mango"
-
-string(6) "Orange"
-
-bool(true)
--- callback function without parameters --
-callback3() called
-callback3() called
-callback3() called
-callback3() called
-bool(true)
--- passing one more parameter to function with two parameters --
-int(0)
-string(5) "Apple"
-
-int(1)
-string(6) "Banana"
-
-int(2)
-string(5) "Mango"
-
-int(3)
-string(6) "Orange"
-
-bool(true)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing array_walk() : callback function variation ***
-- callback function with both parameters --
int(0)
int(2)
}
Done
---UEXPECTF--
-*** Testing arsort() : error conditions ***
-
--- Testing arsort() function with Zero arguments --
-
-Warning: arsort() expects at least 1 parameter, 0 given in %sarsort_error.php on line %d
-bool(false)
-
--- Testing arsort() function with more than expected no. of arguments --
-
-Sort flag = SORT_REGULAR
-
-Warning: arsort() expects at most 2 parameters, 3 given in %sarsort_error.php on line %d
-bool(false)
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
-Sort flag = SORT_STRING
-
-Warning: arsort() expects at most 2 parameters, 3 given in %sarsort_error.php on line %d
-bool(false)
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
-Sort flag = SORT_NUMERIC
-
-Warning: arsort() expects at most 2 parameters, 3 given in %sarsort_error.php on line %d
-bool(false)
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-Done
\ No newline at end of file
/*
* testing arsort() by providing different unexpected values for array argument with following flag values.
- * 1. flag value as defualt
+ * 1. flag value as default
* 2. SORT_REGULAR - compare items normally
* 3. SORT_NUMERIC - compare items numerically
* 4. SORT_STRING - compare items as strings
// loop though each element of the array and check the working of arsort()
// when $array arugment is supplied with different values from $unexpected_values
echo "\n-- Testing arsort() by supplying different unexpected values for 'array' argument --\n";
-echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
+echo "\n-- Flag values are default, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
$counter = 1;
for($index = 0; $index < count($unexpected_values); $index ++) {
-- Testing arsort() by supplying different unexpected values for 'array' argument --
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
--- Iteration 1 --
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, double given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, null given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, boolean given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, object given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, string given in %sarsort_variation1.php on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
-bool(false)
-
-Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
-bool(false)
-Done
---UEXPECTF--
-*** Testing arsort() : usage variations ***
-
--- Testing arsort() by supplying different unexpected values for 'array' argument --
-
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
+-- Flag values are default, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
-- Iteration 1 --
Warning: arsort() expects parameter 1 to be array, integer given in %sarsort_variation1.php on line %d
Warning: arsort() expects parameter 1 to be array, resource given in %sarsort_variation1.php on line %d
bool(false)
-Done
\ No newline at end of file
+Done
/*
* testing arsort() by providing different octal array for $array argument with following flag values
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
077 => 077, -066 => -066, -0345 => -0345, 0 => 0
);
-echo "\n-- Testing arsort() by supplying octal value array, 'flag' value is defualt --\n";
+echo "\n-- Testing arsort() by supplying octal value array, 'flag' value is default --\n";
$temp_array = $unsorted_oct_array;
var_dump( arsort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing arsort() : usage variations ***
--- Testing arsort() by supplying octal value array, 'flag' value is defualt --
+-- Testing arsort() by supplying octal value array, 'flag' value is default --
bool(true)
array(9) {
[669]=>
int(-229)
}
Done
---UEXPECTF--
-*** Testing arsort() : usage variations ***
-
--- Testing arsort() by supplying octal value array, 'flag' value is defualt --
-bool(true)
-array(9) {
- [669]=>
- int(669)
- [506]=>
- int(506)
- [229]=>
- int(229)
- [209]=>
- int(209)
- [63]=>
- int(63)
- [54]=>
- int(54)
- [0]=>
- int(0)
- [-54]=>
- int(-54)
- [-229]=>
- int(-229)
-}
-
--- Testing arsort() by supplying octal value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(9) {
- [669]=>
- int(669)
- [506]=>
- int(506)
- [229]=>
- int(229)
- [209]=>
- int(209)
- [63]=>
- int(63)
- [54]=>
- int(54)
- [0]=>
- int(0)
- [-54]=>
- int(-54)
- [-229]=>
- int(-229)
-}
-
--- Testing arsort() by supplying octal value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(9) {
- [669]=>
- int(669)
- [506]=>
- int(506)
- [229]=>
- int(229)
- [209]=>
- int(209)
- [63]=>
- int(63)
- [54]=>
- int(54)
- [0]=>
- int(0)
- [-54]=>
- int(-54)
- [-229]=>
- int(-229)
-}
-Done
\ No newline at end of file
}
-- Iteration 13 --
-Warning: arsort() expects parameter 2 to be long, string given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 14 --
-
-Warning: arsort() expects parameter 2 to be long, string given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 15 --
-
-Warning: arsort() expects parameter 2 to be long, string given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 16 --
-
-Warning: arsort() expects parameter 2 to be long, string given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 17 --
-
-Warning: arsort() expects parameter 2 to be long, object given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 18 --
-
-Warning: arsort() expects parameter 2 to be long, string given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 19 --
-
-Warning: arsort() expects parameter 2 to be long, string given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 20 --
-
-Warning: arsort() expects parameter 2 to be long, resource given in %sarsort_variation2.php on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
-Done
---UEXPECTF--
-*** Testing arsort() : usage variations ***
-
--- Testing arsort() by supplying different unexpected values for 'sort_flags' argument --
--- Iteration 1 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 2 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 3 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 4 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 5 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 6 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 7 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 8 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 9 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 10 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 11 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 12 --
-bool(true)
-array(3) {
- [3]=>
- int(45)
- [1]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 13 --
-
Warning: arsort() expects parameter 2 to be long, Unicode string given in %sarsort_variation2.php on line %d
bool(false)
array(3) {
[3]=>
int(45)
}
-Done
\ No newline at end of file
+Done
/*
* Testing arsort() by providing different integer/float value arrays for $array argument with following values
- * 1. flag value as defualt
+ * 1. flag value as default
* 2. SORT_REGULAR - compare items normally
* 3. SORT_NUMERIC - compare items numerically
*/
[7]=>
%s(-2147483649)
}
-Done
\ No newline at end of file
+Done
/*
* Testing arsort() by providing reference variable array with following flag values
- * flag value as defualt
+ * flag value as default
* SORT_REGULAR - compare items normally
* SORT_NUMERIC - compare items numerically
*/
// an array containing integer references
$unsorted_numerics = array( 1 => &$value1 , 2 => &$value2, 3 => &$value3);
-echo "\n-- Testing arsort() by supplying reference variable array, 'flag' value is defualt --\n";
+echo "\n-- Testing arsort() by supplying reference variable array, 'flag' value is default --\n";
$temp_array = $unsorted_numerics;
var_dump( arsort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing arsort() :usage variations ***
--- Testing arsort() by supplying reference variable array, 'flag' value is defualt --
+-- Testing arsort() by supplying reference variable array, 'flag' value is default --
bool(true)
array(3) {
[3]=>
&int(33)
}
Done
---UEXPECTF--
-*** Testing arsort() :usage variations ***
-
--- Testing arsort() by supplying reference variable array, 'flag' value is defualt --
-bool(true)
-array(3) {
- [3]=>
- &int(555)
- [1]=>
- &int(100)
- [2]=>
- &int(33)
-}
-
--- Testing arsort() by supplying reference variable array, 'flag' = SORT_REGULAR --
-bool(true)
-array(3) {
- [3]=>
- &int(555)
- [1]=>
- &int(100)
- [2]=>
- &int(33)
-}
-
--- Testing arsort() by supplying reference variable array, 'flag' = SORT_NUMERIC --
-bool(true)
-array(3) {
- [3]=>
- &int(555)
- [1]=>
- &int(100)
- [2]=>
- &int(33)
-}
-Done
\ No newline at end of file
/*
* testing arsort() by providing different string arrays for $array argument with following flag values
- * flag value as defualt
+ * flag value as default
* SORT_REGULAR - compare items normally
* SORT_STRING - compare items as strings
*/
echo "Done\n";
?>
---EXPECTF--
-*** Testing arsort() : usage variations ***
-
--- Testing arsort() by supplying various string arrays --
-
--- Iteration 1 --
-- With default sort_flag -
-bool(true)
-array(12) {
- ["\xhh"]=>
- string(4) "\xhh"
- ["\e"]=>
- string(2) "\e"
- ["\ddd"]=>
- string(4) "\ddd"
- ["\cx"]=>
- string(3) "\cx"
- ["\a"]=>
- string(2) "\a"
- ["
-"]=>
- string(1) "
-"
- ["\f"]=>
- string(1) "\f"
- ["\v"]=>
- string(1) "\v"
- ["
-"]=>
- string(1) "
-"
- [" "]=>
- string(1) " "
- ["null"]=>
- NULL
- ["NULL"]=>
- NULL
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(12) {
- ["\xhh"]=>
- string(4) "\xhh"
- ["\e"]=>
- string(2) "\e"
- ["\ddd"]=>
- string(4) "\ddd"
- ["\cx"]=>
- string(3) "\cx"
- ["\a"]=>
- string(2) "\a"
- ["
-"]=>
- string(1) "
-"
- ["\f"]=>
- string(1) "\f"
- ["\v"]=>
- string(1) "\v"
- ["
-"]=>
- string(1) "
-"
- [" "]=>
- string(1) " "
- ["null"]=>
- NULL
- ["NULL"]=>
- NULL
-}
-- Sort_flag = SORT_STRING -
-bool(true)
-array(12) {
- ["\xhh"]=>
- string(4) "\xhh"
- ["\e"]=>
- string(2) "\e"
- ["\ddd"]=>
- string(4) "\ddd"
- ["\cx"]=>
- string(3) "\cx"
- ["\a"]=>
- string(2) "\a"
- ["
-"]=>
- string(1) "
-"
- ["\f"]=>
- string(1) "\f"
- ["\v"]=>
- string(1) "\v"
- ["
-"]=>
- string(1) "
-"
- [" "]=>
- string(1) " "
- ["null"]=>
- NULL
- ["NULL"]=>
- NULL
-}
-
--- Iteration 2 --
-- With default sort_flag -
-bool(true)
-array(12) {
- ["x"]=>
- string(1) "x"
- ["w"]=>
- string(2) "ww"
- ["t"]=>
- string(3) "ttt"
- ["o"]=>
- string(6) "oraNGe"
- ["l"]=>
- string(5) "lemoN"
- ["b"]=>
- string(6) "banana"
- ["a"]=>
- string(5) "apple"
- ["X"]=>
- string(1) "X"
- ["Te"]=>
- string(4) "Test"
- ["T"]=>
- string(4) "TTTT"
- ["O"]=>
- string(6) "Orange"
- ["B"]=>
- string(6) "BANANA"
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(12) {
- ["x"]=>
- string(1) "x"
- ["w"]=>
- string(2) "ww"
- ["t"]=>
- string(3) "ttt"
- ["o"]=>
- string(6) "oraNGe"
- ["l"]=>
- string(5) "lemoN"
- ["b"]=>
- string(6) "banana"
- ["a"]=>
- string(5) "apple"
- ["X"]=>
- string(1) "X"
- ["Te"]=>
- string(4) "Test"
- ["T"]=>
- string(4) "TTTT"
- ["O"]=>
- string(6) "Orange"
- ["B"]=>
- string(6) "BANANA"
-}
-- Sort_flag = SORT_STRING -
-bool(true)
-array(12) {
- ["x"]=>
- string(1) "x"
- ["w"]=>
- string(2) "ww"
- ["t"]=>
- string(3) "ttt"
- ["o"]=>
- string(6) "oraNGe"
- ["l"]=>
- string(5) "lemoN"
- ["b"]=>
- string(6) "banana"
- ["a"]=>
- string(5) "apple"
- ["X"]=>
- string(1) "X"
- ["Te"]=>
- string(4) "Test"
- ["T"]=>
- string(4) "TTTT"
- ["O"]=>
- string(6) "Orange"
- ["B"]=>
- string(6) "BANANA"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing arsort() : usage variations ***
-- Testing arsort() by supplying various string arrays --
[u"B"]=>
unicode(6) "BANANA"
}
-Done
\ No newline at end of file
+Done
/*
* testing arsort() by providing different hexa-decimal array for $array argument with following flag values
- * flag value as defualt
+ * flag value as default
* SORT_REGULAR - compare items normally
* SORT_NUMERIC - compare items numerically
*/
0x1ab => 0x1ab, 0xff => 0xff, -0xff => -0xFF, 0 => 0, -0x2aa => -0x2aa
);
-echo "\n-- Testing arsort() by supplying hexadecimal value array, 'flag' value is defualt --\n";
+echo "\n-- Testing arsort() by supplying hexadecimal value array, 'flag' value is default --\n";
$temp_array = $unsorted_hex_array;
var_dump(arsort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing arsort() : usage variations ***
--- Testing arsort() by supplying hexadecimal value array, 'flag' value is defualt --
+-- Testing arsort() by supplying hexadecimal value array, 'flag' value is default --
bool(true)
array(9) {
[4095]=>
int(-682)
}
Done
---UEXPECTF--
-*** Testing arsort() : usage variations ***
-
--- Testing arsort() by supplying hexadecimal value array, 'flag' value is defualt --
-bool(true)
-array(9) {
- [4095]=>
- int(4095)
- [682]=>
- int(682)
- [427]=>
- int(427)
- [255]=>
- int(255)
- [187]=>
- int(187)
- [15]=>
- int(15)
- [0]=>
- int(0)
- [-255]=>
- int(-255)
- [-682]=>
- int(-682)
-}
-
--- Testing arsort() by supplying hexadecimal value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(9) {
- [4095]=>
- int(4095)
- [682]=>
- int(682)
- [427]=>
- int(427)
- [255]=>
- int(255)
- [187]=>
- int(187)
- [15]=>
- int(15)
- [0]=>
- int(0)
- [-255]=>
- int(-255)
- [-682]=>
- int(-682)
-}
-
--- Testing arsort() by supplying hexadecimal value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(9) {
- [4095]=>
- int(4095)
- [682]=>
- int(682)
- [427]=>
- int(427)
- [255]=>
- int(255)
- [187]=>
- int(187)
- [15]=>
- int(15)
- [0]=>
- int(0)
- [-255]=>
- int(-255)
- [-682]=>
- int(-682)
-}
-Done
\ No newline at end of file
/*
* testing arsort() by providing bool value array for $array argument with following flag values.
- * flag value as defualt
+ * flag value as default
* SORT_REGULAR - compare items normally
*/
// bool value array
$bool_values = array (1 => true, 2 => false, 3 => TRUE, 4 => FALSE);
-echo "\n-- Testing arsort() by supplying bool value array, 'flag' value is defualt --\n";
+echo "\n-- Testing arsort() by supplying bool value array, 'flag' value is default --\n";
$temp_array = $bool_values;
var_dump(arsort($temp_array) );
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing arsort() : usage variations ***
--- Testing arsort() by supplying bool value array, 'flag' value is defualt --
+-- Testing arsort() by supplying bool value array, 'flag' value is default --
bool(true)
array(4) {
[3]=>
bool(false)
}
Done
---UEXPECTF--
-*** Testing arsort() : usage variations ***
-
--- Testing arsort() by supplying bool value array, 'flag' value is defualt --
-bool(true)
-array(4) {
- [3]=>
- bool(true)
- [1]=>
- bool(true)
- [4]=>
- bool(false)
- [2]=>
- bool(false)
-}
-
--- Testing arsort() by supplying bool value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(4) {
- [3]=>
- bool(true)
- [1]=>
- bool(true)
- [4]=>
- bool(false)
- [2]=>
- bool(false)
-}
-
--- Testing arsort() by supplying bool value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(4) {
- [3]=>
- bool(true)
- [1]=>
- bool(true)
- [4]=>
- bool(false)
- [2]=>
- bool(false)
-}
-
--- Testing arsort() by supplying bool value array, 'flag' value is SORT_STRING --
-bool(true)
-array(4) {
- [3]=>
- bool(true)
- [1]=>
- bool(true)
- [4]=>
- bool(false)
- [2]=>
- bool(false)
-}
-Done
\ No newline at end of file
echo "Done\n";
?>
---EXPECTF--
-*** Testing arsort() : usage variations ***
-
--- Testing arsort() by supplying various arrays containing sub arrays --
-
--- Iteration 1 --
-- With default sort_flag -
-bool(true)
-array(0) {
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(0) {
-}
-
--- Iteration 2 --
-- With default sort_flag -
-bool(true)
-array(1) {
- ["sub_array[1][0]"]=>
- array(0) {
- }
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(1) {
- ["sub_array[1][0]"]=>
- array(0) {
- }
-}
-
--- Iteration 3 --
-- With default sort_flag -
-bool(true)
-array(3) {
- ["sub_array[2][0] "]=>
- array(2) {
- [0]=>
- int(64)
- [1]=>
- int(61)
- }
- ["data[2,0]"]=>
- int(44)
- ["data[2,1]"]=>
- int(11)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(3) {
- ["sub_array[2][0] "]=>
- array(2) {
- [0]=>
- int(64)
- [1]=>
- int(61)
- }
- ["data[2,0]"]=>
- int(44)
- ["data[2,1]"]=>
- int(11)
-}
-
--- Iteration 4 --
-- With default sort_flag -
-bool(true)
-array(4) {
- ["sub_array[3][0]"]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
- ["sub_array[3][2]"]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- ["sub_array[3][1]"]=>
- array(1) {
- [0]=>
- int(11)
- }
- ["sub_array[3][3]"]=>
- array(0) {
- }
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(4) {
- ["sub_array[3][0]"]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
- ["sub_array[3][2]"]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- ["sub_array[3][1]"]=>
- array(1) {
- [0]=>
- int(11)
- }
- ["sub_array[3][3]"]=>
- array(0) {
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing arsort() : usage variations ***
-- Testing arsort() by supplying various arrays containing sub arrays --
array(0) {
}
}
-Done
\ No newline at end of file
+Done
echo "Done\n";
?>
---EXPECTF--
-*** Testing arsort() : usage variations ***
-
--- Testing arsort() by supplying various arrays with key values --
-
--- Iteration 1 --
-- With default sort_flag -
-bool(true)
-array(5) {
- [6]=>
- int(66)
- [5]=>
- int(55)
- [8]=>
- int(33)
- [7]=>
- int(22)
- [9]=>
- int(11)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(5) {
- [6]=>
- int(66)
- [5]=>
- int(55)
- [8]=>
- int(33)
- [7]=>
- int(22)
- [9]=>
- int(11)
-}
-
--- Iteration 2 --
-- With default sort_flag -
-bool(true)
-array(3) {
- ["a"]=>
- string(6) "orange"
- [0]=>
- string(6) "banana"
- ["c"]=>
- string(5) "apple"
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(3) {
- ["a"]=>
- string(6) "orange"
- [0]=>
- string(6) "banana"
- ["c"]=>
- string(5) "apple"
-}
-
--- Iteration 3 --
-- With default sort_flag -
-bool(true)
-array(6) {
- [5]=>
- int(6)
- [4]=>
- int(5)
- [3]=>
- int(4)
- [2]=>
- int(3)
- [1]=>
- int(2)
- [0]=>
- int(1)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(6) {
- [5]=>
- int(6)
- [4]=>
- int(5)
- [3]=>
- int(4)
- [2]=>
- int(3)
- [1]=>
- int(2)
- [0]=>
- int(1)
-}
-
--- Iteration 4 --
-- With default sort_flag -
-bool(true)
-array(3) {
- [6]=>
- string(5) "third"
- [5]=>
- string(6) "second"
- [0]=>
- string(5) "first"
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(3) {
- [6]=>
- string(5) "third"
- [5]=>
- string(6) "second"
- [0]=>
- string(5) "first"
-}
-
--- Iteration 5 --
-- With default sort_flag -
-bool(true)
-array(6) {
- [9]=>
- int(19)
- [3]=>
- int(13)
- [4]=>
- int(1)
- [8]=>
- int(1)
- [1]=>
- int(1)
- [0]=>
- int(1)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(6) {
- [9]=>
- int(19)
- [3]=>
- int(13)
- [4]=>
- int(1)
- [8]=>
- int(1)
- [1]=>
- int(1)
- [0]=>
- int(1)
-}
-
--- Iteration 6 --
-- With default sort_flag -
-bool(true)
-array(2) {
- ["foo"]=>
- int(1)
- ["bar"]=>
- string(3) "baz"
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(2) {
- ["foo"]=>
- int(1)
- ["bar"]=>
- string(3) "baz"
-}
-
--- Iteration 7 --
-- With default sort_flag -
-bool(true)
-array(4) {
- ["b"]=>
- array(2) {
- ["e"]=>
- int(2)
- ["f"]=>
- int(3)
- }
- ["c"]=>
- array(1) {
- ["g"]=>
- int(4)
- }
- ["d"]=>
- int(5)
- ["a"]=>
- int(1)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(4) {
- ["b"]=>
- array(2) {
- ["e"]=>
- int(2)
- ["f"]=>
- int(3)
- }
- ["c"]=>
- array(1) {
- ["g"]=>
- int(4)
- }
- ["d"]=>
- int(5)
- ["a"]=>
- int(1)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing arsort() : usage variations ***
-- Testing arsort() by supplying various arrays with key values --
[u"a"]=>
int(1)
}
-Done
\ No newline at end of file
+Done
echo "Done\n";
?>
---EXPECTF--
-*** Testing asort() : basic functionality ***
-
--- Testing asort() by supplying string array, 'flag' value is default --
-bool(true)
-array(3) {
- ["b"]=>
- string(6) "banana"
- ["l"]=>
- string(5) "lemon"
- ["o"]=>
- string(6) "orange"
-}
-
--- Testing asort() by supplying numeric array, 'flag' value is default --
-bool(true)
-array(4) {
- [4]=>
- int(22)
- [2]=>
- int(33)
- [1]=>
- int(100)
- [3]=>
- int(555)
-}
-
--- Testing asort() by supplying string array, 'flag' = SORT_REGULAR --
-bool(true)
-array(3) {
- ["b"]=>
- string(6) "banana"
- ["l"]=>
- string(5) "lemon"
- ["o"]=>
- string(6) "orange"
-}
-
--- Testing asort() by supplying numeric array, 'flag' = SORT_REGULAR --
-bool(true)
-array(4) {
- [4]=>
- int(22)
- [2]=>
- int(33)
- [1]=>
- int(100)
- [3]=>
- int(555)
-}
-
--- Testing asort() by supplying string array, 'flag' = SORT_STRING --
-bool(true)
-array(3) {
- ["b"]=>
- string(6) "banana"
- ["l"]=>
- string(5) "lemon"
- ["o"]=>
- string(6) "orange"
-}
-
--- Testing asort() by supplying numeric array, 'flag' = SORT_NUMERIC --
-bool(true)
-array(4) {
- [4]=>
- int(22)
- [2]=>
- int(33)
- [1]=>
- int(100)
- [3]=>
- int(555)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing asort() : basic functionality ***
-- Testing asort() by supplying string array, 'flag' value is default --
int(2)
}
Done
---UEXPECTF--
-*** Testing asort() : error conditions ***
-
--- Testing asort() function with Zero arguments --
-
-Warning: asort() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing asort() function with more than expected no. of arguments --
-
-Sort flag = SORT_REGULAR
-
-Warning: asort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
-Sort flag = SORT_STRING
-
-Warning: asort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
-Sort flag = SORT_NUMERIC
-
-Warning: asort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-Done
/*
* testing asort() by providing integer/string object arrays with following flag values
- * 1. Defualt flag value
+ * 1. default flag value
* 2. SORT_REGULAR - compare items normally
*/
--EXPECTF--
*** Testing asort() : object functionality ***
--- Testing asort() by supplying various object arrays, 'flag' value is default --
-bool(true)
-array(6) {
- [4]=>
- object(for_integer_asort)#%d (1) {
- ["class_value"]=>
- int(-5)
- }
- [6]=>
- object(for_integer_asort)#%d (1) {
- ["class_value"]=>
- int(0)
- }
- [5]=>
- object(for_integer_asort)#%d (1) {
- ["class_value"]=>
- float(0.001)
- }
- [1]=>
- object(for_integer_asort)#%d (1) {
- ["class_value"]=>
- int(11)
- }
- [3]=>
- object(for_integer_asort)#%d (1) {
- ["class_value"]=>
- int(23)
- }
- [2]=>
- object(for_integer_asort)#%d (1) {
- ["class_value"]=>
- int(66)
- }
-}
-bool(true)
-array(8) {
- ["g"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(5) "Lemon"
- }
- ["f"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(6) "Orange"
- }
- ["h"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(5) "aPPle"
- }
- ["e"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(5) "apple"
- }
- ["a"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(3) "axx"
- }
- ["d"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(2) "py"
- }
- ["b"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(1) "t"
- }
- ["c"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(1) "w"
- }
-}
-
--- Testing asort() by supplying various object arrays, 'flag' value is SORT_REGULAR --
-bool(true)
-array(6) {
- [4]=>
- object(for_integer_asort)#%d (1) {
- ["class_value"]=>
- int(-5)
- }
- [6]=>
- object(for_integer_asort)#%d (1) {
- ["class_value"]=>
- int(0)
- }
- [5]=>
- object(for_integer_asort)#%d (1) {
- ["class_value"]=>
- float(0.001)
- }
- [1]=>
- object(for_integer_asort)#%d (1) {
- ["class_value"]=>
- int(11)
- }
- [3]=>
- object(for_integer_asort)#%d (1) {
- ["class_value"]=>
- int(23)
- }
- [2]=>
- object(for_integer_asort)#%d (1) {
- ["class_value"]=>
- int(66)
- }
-}
-bool(true)
-array(8) {
- ["g"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(5) "Lemon"
- }
- ["f"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(6) "Orange"
- }
- ["h"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(5) "aPPle"
- }
- ["e"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(5) "apple"
- }
- ["a"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(3) "axx"
- }
- ["d"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(2) "py"
- }
- ["b"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(1) "t"
- }
- ["c"]=>
- object(for_string_asort)#%d (1) {
- ["class_value"]=>
- string(1) "w"
- }
-}
-Done
---UEXPECTF--
-*** Testing asort() : object functionality ***
-
-- Testing asort() by supplying various object arrays, 'flag' value is default --
bool(true)
array(6) {
/*
* testing asort() by providing integer/string object arrays with following flag values
- * 1. Defualt flag value
+ * 1. default flag value
2. SORT_REGULAR - compare items normally
*/
--EXPECTF--
*** Testing asort() : object functionality ***
--- Testing asort() by supplying various object arrays, 'flag' value is default --
-bool(true)
-array(4) {
- [4]=>
- object(for_integer_asort)#%d (3) {
- ["public_class_value"]=>
- int(-88)
- ["private_class_value":"for_integer_asort":private]=>
- int(-5)
- ["protected_class_value":protected]=>
- int(-4)
- }
- [1]=>
- object(for_integer_asort)#%d (3) {
- ["public_class_value"]=>
- int(11)
- ["private_class_value":"for_integer_asort":private]=>
- int(33)
- ["protected_class_value":protected]=>
- int(2)
- }
- [3]=>
- object(for_integer_asort)#%d (3) {
- ["public_class_value"]=>
- int(23)
- ["private_class_value":"for_integer_asort":private]=>
- int(32)
- ["protected_class_value":protected]=>
- int(6)
- }
- [2]=>
- object(for_integer_asort)#%d (3) {
- ["public_class_value"]=>
- int(44)
- ["private_class_value":"for_integer_asort":private]=>
- int(66)
- ["protected_class_value":protected]=>
- int(3)
- }
-}
-bool(true)
-array(4) {
- ["d"]=>
- object(for_string_asort)#%d (3) {
- ["public_class_value"]=>
- string(2) "PY"
- ["private_class_value":"for_string_asort":private]=>
- string(2) "py"
- ["protected_class_value":protected]=>
- string(1) "s"
- }
- ["b"]=>
- object(for_string_asort)#%d (3) {
- ["public_class_value"]=>
- string(1) "T"
- ["private_class_value":"for_string_asort":private]=>
- string(1) "t"
- ["protected_class_value":protected]=>
- string(1) "q"
- }
- ["a"]=>
- object(for_string_asort)#%d (3) {
- ["public_class_value"]=>
- string(3) "axx"
- ["private_class_value":"for_string_asort":private]=>
- string(3) "AXX"
- ["protected_class_value":protected]=>
- string(1) "d"
- }
- ["c"]=>
- object(for_string_asort)#%d (3) {
- ["public_class_value"]=>
- string(1) "w"
- ["private_class_value":"for_string_asort":private]=>
- string(1) "W"
- ["protected_class_value":protected]=>
- string(1) "c"
- }
-}
-
--- Testing asort() by supplying various object arrays, 'flag' value is SORT_REGULAR --
-bool(true)
-array(4) {
- [4]=>
- object(for_integer_asort)#%d (3) {
- ["public_class_value"]=>
- int(-88)
- ["private_class_value":"for_integer_asort":private]=>
- int(-5)
- ["protected_class_value":protected]=>
- int(-4)
- }
- [1]=>
- object(for_integer_asort)#%d (3) {
- ["public_class_value"]=>
- int(11)
- ["private_class_value":"for_integer_asort":private]=>
- int(33)
- ["protected_class_value":protected]=>
- int(2)
- }
- [3]=>
- object(for_integer_asort)#%d (3) {
- ["public_class_value"]=>
- int(23)
- ["private_class_value":"for_integer_asort":private]=>
- int(32)
- ["protected_class_value":protected]=>
- int(6)
- }
- [2]=>
- object(for_integer_asort)#%d (3) {
- ["public_class_value"]=>
- int(44)
- ["private_class_value":"for_integer_asort":private]=>
- int(66)
- ["protected_class_value":protected]=>
- int(3)
- }
-}
-bool(true)
-array(4) {
- ["d"]=>
- object(for_string_asort)#%d (3) {
- ["public_class_value"]=>
- string(2) "PY"
- ["private_class_value":"for_string_asort":private]=>
- string(2) "py"
- ["protected_class_value":protected]=>
- string(1) "s"
- }
- ["b"]=>
- object(for_string_asort)#%d (3) {
- ["public_class_value"]=>
- string(1) "T"
- ["private_class_value":"for_string_asort":private]=>
- string(1) "t"
- ["protected_class_value":protected]=>
- string(1) "q"
- }
- ["a"]=>
- object(for_string_asort)#%d (3) {
- ["public_class_value"]=>
- string(3) "axx"
- ["private_class_value":"for_string_asort":private]=>
- string(3) "AXX"
- ["protected_class_value":protected]=>
- string(1) "d"
- }
- ["c"]=>
- object(for_string_asort)#%d (3) {
- ["public_class_value"]=>
- string(1) "w"
- ["private_class_value":"for_string_asort":private]=>
- string(1) "W"
- ["protected_class_value":protected]=>
- string(1) "c"
- }
-}
-Done
---UEXPECTF--
-*** Testing asort() : object functionality ***
-
-- Testing asort() by supplying various object arrays, 'flag' value is default --
bool(true)
array(4) {
/*
* testing asort() by providing different unexpected values for array argument with following flag values.
- * 1. flag value as defualt
+ * 1. flag value as default
* 2. SORT_REGULAR - compare items normally
* 3. SORT_NUMERIC - compare items numerically
* 4. SORT_STRING - compare items as strings
// loop though each element of the array and check the working of asort()
// when $array arugment is supplied with different values from $unexpected_values
echo "\n-- Testing asort() by supplying different unexpected values for 'array' argument --\n";
-echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
+echo "\n-- Flag values are default, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
$counter = 1;
for($index = 0; $index < count($unexpected_values); $index ++) {
-- Testing asort() by supplying different unexpected values for 'array' argument --
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
--- Iteration 1 --
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: asort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: asort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: asort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Done
---UEXPECTF--
-*** Testing asort() : usage variations ***
-
--- Testing asort() by supplying different unexpected values for 'array' argument --
-
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
+-- Flag values are default, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
-- Iteration 1 --
Warning: asort() expects parameter 1 to be array, integer given in %s on line %d
echo "Done\n";
?>
---EXPECTF--
-*** Testing asort() : usage variations ***
-
--- Testing asort() by supplying octal value array, 'flag' value is default --
-bool(true)
-array(9) {
- [-229]=>
- int(-229)
- [-54]=>
- int(-54)
- [0]=>
- int(0)
- [54]=>
- int(54)
- [63]=>
- int(63)
- [209]=>
- int(209)
- [229]=>
- int(229)
- [506]=>
- int(506)
- [669]=>
- int(669)
-}
-
--- Testing asort() by supplying octal value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(9) {
- [-229]=>
- int(-229)
- [-54]=>
- int(-54)
- [0]=>
- int(0)
- [54]=>
- int(54)
- [63]=>
- int(63)
- [209]=>
- int(209)
- [229]=>
- int(229)
- [506]=>
- int(506)
- [669]=>
- int(669)
-}
-
--- Testing asort() by supplying octal value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(9) {
- [-229]=>
- int(-229)
- [-54]=>
- int(-54)
- [0]=>
- int(0)
- [54]=>
- int(54)
- [63]=>
- int(63)
- [209]=>
- int(209)
- [229]=>
- int(229)
- [506]=>
- int(506)
- [669]=>
- int(669)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing asort() : usage variations ***
-- Testing asort() by supplying octal value array, 'flag' value is default --
}
-- Iteration 13 --
-Warning: asort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 14 --
-
-Warning: asort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 15 --
-
-Warning: asort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 16 --
-
-Warning: asort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 17 --
-
-Warning: asort() expects parameter 2 to be long, object given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 18 --
-
-Warning: asort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 19 --
-
-Warning: asort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
--- Iteration 20 --
-
-Warning: asort() expects parameter 2 to be long, resource given in %s on line %d
-bool(false)
-array(3) {
- [1]=>
- int(10)
- [2]=>
- int(2)
- [3]=>
- int(45)
-}
-Done
---UEXPECTF--
-*** Testing asort() : usage variations ***
-
--- Testing asort() by supplying different unexpected values for 'sort_flags' argument --
--- Iteration 1 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 2 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 3 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 4 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 5 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 6 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 7 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 8 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 9 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 10 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 11 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 12 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [1]=>
- int(10)
- [3]=>
- int(45)
-}
--- Iteration 13 --
-
Warning: asort() expects parameter 2 to be long, Unicode string given in %s on line %d
bool(false)
array(3) {
%s(2147483648)
}
Done
---UEXPECTF--
-*** Testing asort() : usage variations ***
-
--- Testing asort() by supplying various integer/float arrays --
-
--- Iteration 1 --
-- With default sort_flag -
-bool(true)
-array(9) {
- [10]=>
- int(-41)
- [6]=>
- int(-31)
- [4]=>
- int(-21)
- [2]=>
- int(-11)
- [7]=>
- int(0)
- [1]=>
- int(11)
- [3]=>
- int(21)
- [5]=>
- int(31)
- [8]=>
- int(41)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(9) {
- [10]=>
- int(-41)
- [6]=>
- int(-31)
- [4]=>
- int(-21)
- [2]=>
- int(-11)
- [7]=>
- int(0)
- [1]=>
- int(11)
- [3]=>
- int(21)
- [5]=>
- int(31)
- [8]=>
- int(41)
-}
-- Sort_flag = SORT_NUMERIC -
-bool(true)
-array(9) {
- [10]=>
- int(-41)
- [6]=>
- int(-31)
- [4]=>
- int(-21)
- [2]=>
- int(-11)
- [7]=>
- int(0)
- [1]=>
- int(11)
- [3]=>
- int(21)
- [5]=>
- int(31)
- [8]=>
- int(41)
-}
-
--- Iteration 2 --
-- With default sort_flag -
-bool(true)
-array(7) {
- [2]=>
- float(-10.5)
- [7]=>
- float(-0.1)
- [6]=>
- float(0.0001)
- [4]=>
- float(0.106)
- [5]=>
- float(0.5)
- [1]=>
- float(10.5)
- [3]=>
- float(1050)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(7) {
- [2]=>
- float(-10.5)
- [7]=>
- float(-0.1)
- [6]=>
- float(0.0001)
- [4]=>
- float(0.106)
- [5]=>
- float(0.5)
- [1]=>
- float(10.5)
- [3]=>
- float(1050)
-}
-- Sort_flag = SORT_NUMERIC -
-bool(true)
-array(7) {
- [2]=>
- float(-10.5)
- [7]=>
- float(-0.1)
- [6]=>
- float(0.0001)
- [4]=>
- float(0.106)
- [5]=>
- float(0.5)
- [1]=>
- float(10.5)
- [3]=>
- float(1050)
-}
-
--- Iteration 3 --
-- With default sort_flag -
-bool(true)
-array(11) {
- [4]=>
- int(-1)
- [8]=>
- float(-0.9)
- [10]=>
- float(-0.106)
- [3]=>
- float(-0.01)
- [5]=>
- int(0)
- [1]=>
- float(0.0001)
- [2]=>
- float(0.0021)
- [6]=>
- float(0.09)
- [9]=>
- float(0.106)
- [7]=>
- int(2)
- [11]=>
- int(33)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(11) {
- [4]=>
- int(-1)
- [8]=>
- float(-0.9)
- [10]=>
- float(-0.106)
- [3]=>
- float(-0.01)
- [5]=>
- int(0)
- [1]=>
- float(0.0001)
- [2]=>
- float(0.0021)
- [6]=>
- float(0.09)
- [9]=>
- float(0.106)
- [7]=>
- int(2)
- [11]=>
- int(33)
-}
-- Sort_flag = SORT_NUMERIC -
-bool(true)
-array(11) {
- [4]=>
- int(-1)
- [8]=>
- float(-0.9)
- [10]=>
- float(-0.106)
- [3]=>
- float(-0.01)
- [5]=>
- int(0)
- [1]=>
- float(0.0001)
- [2]=>
- float(0.0021)
- [6]=>
- float(0.09)
- [9]=>
- float(0.106)
- [7]=>
- int(2)
- [11]=>
- int(33)
-}
-
--- Iteration 4 --
-- With default sort_flag -
-bool(true)
-array(7) {
- [7]=>
- %s(-2147483649)
- [4]=>
- %s(-2147483648)
- [3]=>
- int(-2147483647)
- [6]=>
- int(0)
- [5]=>
- int(0)
- [1]=>
- int(2147483647)
- [2]=>
- %s(2147483648)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(7) {
- [7]=>
- %s(-2147483649)
- [4]=>
- %s(-2147483648)
- [3]=>
- int(-2147483647)
- [6]=>
- int(0)
- [5]=>
- int(0)
- [1]=>
- int(2147483647)
- [2]=>
- %s(2147483648)
-}
-- Sort_flag = SORT_NUMERIC -
-bool(true)
-array(7) {
- [7]=>
- %s(-2147483649)
- [4]=>
- %s(-2147483648)
- [3]=>
- int(-2147483647)
- [6]=>
- int(0)
- [5]=>
- int(0)
- [1]=>
- int(2147483647)
- [2]=>
- %s(2147483648)
-}
-Done
echo "Done\n";
?>
---EXPECTF--
-*** Testing asort() :usage variations ***
-
--- Testing asort() by supplying reference variable array, 'flag' value is default --
-bool(true)
-array(3) {
- [2]=>
- &int(33)
- [1]=>
- &int(100)
- [3]=>
- &int(555)
-}
-
--- Testing asort() by supplying reference variable array, 'flag' = SORT_REGULAR --
-bool(true)
-array(3) {
- [2]=>
- &int(33)
- [1]=>
- &int(100)
- [3]=>
- &int(555)
-}
-
--- Testing asort() by supplying reference variable array, 'flag' = SORT_NUMERIC --
-bool(true)
-array(3) {
- [2]=>
- &int(33)
- [1]=>
- &int(100)
- [3]=>
- &int(555)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing asort() :usage variations ***
-- Testing asort() by supplying reference variable array, 'flag' value is default --
echo "Done\n";
?>
---EXPECTF--
-*** Testing asort() : usage variations ***
-
--- Testing asort() by supplying various string arrays --
-
--- Iteration 1 --
-- With default sort_flag -
-bool(true)
-array(12) {
- ["null"]=>
- NULL
- ["NULL"]=>
- NULL
- [" "]=>
- string(1) " "
- ["
-"]=>
- string(1) "
-"
- ["\v"]=>
- string(1) "\v"
- ["\f"]=>
- string(1) "\f"
- ["
-"]=>
- string(1) "
-"
- ["\a"]=>
- string(2) "\a"
- ["\cx"]=>
- string(3) "\cx"
- ["\ddd"]=>
- string(4) "\ddd"
- ["\e"]=>
- string(2) "\e"
- ["\xhh"]=>
- string(4) "\xhh"
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(12) {
- ["null"]=>
- NULL
- ["NULL"]=>
- NULL
- [" "]=>
- string(1) " "
- ["
-"]=>
- string(1) "
-"
- ["\v"]=>
- string(1) "\v"
- ["\f"]=>
- string(1) "\f"
- ["
-"]=>
- string(1) "
-"
- ["\a"]=>
- string(2) "\a"
- ["\cx"]=>
- string(3) "\cx"
- ["\ddd"]=>
- string(4) "\ddd"
- ["\e"]=>
- string(2) "\e"
- ["\xhh"]=>
- string(4) "\xhh"
-}
-- Sort_flag = SORT_STRING -
-bool(true)
-array(12) {
- ["null"]=>
- NULL
- ["NULL"]=>
- NULL
- [" "]=>
- string(1) " "
- ["
-"]=>
- string(1) "
-"
- ["\v"]=>
- string(1) "\v"
- ["\f"]=>
- string(1) "\f"
- ["
-"]=>
- string(1) "
-"
- ["\a"]=>
- string(2) "\a"
- ["\cx"]=>
- string(3) "\cx"
- ["\ddd"]=>
- string(4) "\ddd"
- ["\e"]=>
- string(2) "\e"
- ["\xhh"]=>
- string(4) "\xhh"
-}
-
--- Iteration 2 --
-- With default sort_flag -
-bool(true)
-array(12) {
- ["B"]=>
- string(6) "BANANA"
- ["O"]=>
- string(6) "Orange"
- ["T"]=>
- string(4) "TTTT"
- ["Te"]=>
- string(4) "Test"
- ["X"]=>
- string(1) "X"
- ["a"]=>
- string(5) "apple"
- ["b"]=>
- string(6) "banana"
- ["l"]=>
- string(5) "lemoN"
- ["o"]=>
- string(6) "oraNGe"
- ["t"]=>
- string(3) "ttt"
- ["w"]=>
- string(2) "ww"
- ["x"]=>
- string(1) "x"
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(12) {
- ["B"]=>
- string(6) "BANANA"
- ["O"]=>
- string(6) "Orange"
- ["T"]=>
- string(4) "TTTT"
- ["Te"]=>
- string(4) "Test"
- ["X"]=>
- string(1) "X"
- ["a"]=>
- string(5) "apple"
- ["b"]=>
- string(6) "banana"
- ["l"]=>
- string(5) "lemoN"
- ["o"]=>
- string(6) "oraNGe"
- ["t"]=>
- string(3) "ttt"
- ["w"]=>
- string(2) "ww"
- ["x"]=>
- string(1) "x"
-}
-- Sort_flag = SORT_STRING -
-bool(true)
-array(12) {
- ["B"]=>
- string(6) "BANANA"
- ["O"]=>
- string(6) "Orange"
- ["T"]=>
- string(4) "TTTT"
- ["Te"]=>
- string(4) "Test"
- ["X"]=>
- string(1) "X"
- ["a"]=>
- string(5) "apple"
- ["b"]=>
- string(6) "banana"
- ["l"]=>
- string(5) "lemoN"
- ["o"]=>
- string(6) "oraNGe"
- ["t"]=>
- string(3) "ttt"
- ["w"]=>
- string(2) "ww"
- ["x"]=>
- string(1) "x"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing asort() : usage variations ***
-- Testing asort() by supplying various string arrays --
echo "Done\n";
?>
---EXPECTF--
-*** Testing asort() : usage variations ***
-
--- Testing asort() by supplying hexadecimal value array, 'flag' value is default --
-bool(true)
-array(9) {
- [-682]=>
- int(-682)
- [-255]=>
- int(-255)
- [0]=>
- int(0)
- [15]=>
- int(15)
- [187]=>
- int(187)
- [255]=>
- int(255)
- [427]=>
- int(427)
- [682]=>
- int(682)
- [4095]=>
- int(4095)
-}
-
--- Testing asort() by supplying hexadecimal value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(9) {
- [-682]=>
- int(-682)
- [-255]=>
- int(-255)
- [0]=>
- int(0)
- [15]=>
- int(15)
- [187]=>
- int(187)
- [255]=>
- int(255)
- [427]=>
- int(427)
- [682]=>
- int(682)
- [4095]=>
- int(4095)
-}
-
--- Testing asort() by supplying hexadecimal value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(9) {
- [-682]=>
- int(-682)
- [-255]=>
- int(-255)
- [0]=>
- int(0)
- [15]=>
- int(15)
- [187]=>
- int(187)
- [255]=>
- int(255)
- [427]=>
- int(427)
- [682]=>
- int(682)
- [4095]=>
- int(4095)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing asort() : usage variations ***
-- Testing asort() by supplying hexadecimal value array, 'flag' value is default --
echo "Done\n";
?>
---EXPECTF--
-*** Testing asort() : usage variations ***
-
--- Testing asort() by supplying bool value array, 'flag' value is default --
-bool(true)
-array(4) {
- [4]=>
- bool(false)
- [2]=>
- bool(false)
- [1]=>
- bool(true)
- [3]=>
- bool(true)
-}
-
--- Testing asort() by supplying bool value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(4) {
- [4]=>
- bool(false)
- [2]=>
- bool(false)
- [1]=>
- bool(true)
- [3]=>
- bool(true)
-}
-
--- Testing asort() by supplying bool value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(4) {
- [4]=>
- bool(false)
- [2]=>
- bool(false)
- [1]=>
- bool(true)
- [3]=>
- bool(true)
-}
-
--- Testing asort() by supplying bool value array, 'flag' value is SORT_STRING --
-bool(true)
-array(4) {
- [4]=>
- bool(false)
- [2]=>
- bool(false)
- [1]=>
- bool(true)
- [3]=>
- bool(true)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing asort() : usage variations ***
-- Testing asort() by supplying bool value array, 'flag' value is default --
echo "Done\n";
?>
---EXPECTF--
-*** Testing asort() : usage variations ***
-
--- Testing asort() by supplying various arrays containing sub arrays --
-
--- Iteration 1 --
-- With default sort_flag -
-bool(true)
-array(0) {
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(0) {
-}
-
--- Iteration 2 --
-- With default sort_flag -
-bool(true)
-array(1) {
- ["sub_array[1][0]"]=>
- array(0) {
- }
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(1) {
- ["sub_array[1][0]"]=>
- array(0) {
- }
-}
-
--- Iteration 3 --
-- With default sort_flag -
-bool(true)
-array(3) {
- ["data[2,1]"]=>
- int(11)
- ["data[2,0]"]=>
- int(44)
- ["sub_array[2][0] "]=>
- array(2) {
- [0]=>
- int(64)
- [1]=>
- int(61)
- }
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(3) {
- ["data[2,1]"]=>
- int(11)
- ["data[2,0]"]=>
- int(44)
- ["sub_array[2][0] "]=>
- array(2) {
- [0]=>
- int(64)
- [1]=>
- int(61)
- }
-}
-
--- Iteration 4 --
-- With default sort_flag -
-bool(true)
-array(4) {
- ["sub_array[3][3]"]=>
- array(0) {
- }
- ["sub_array[3][1]"]=>
- array(1) {
- [0]=>
- int(11)
- }
- ["sub_array[3][2]"]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- ["sub_array[3][0]"]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(4) {
- ["sub_array[3][3]"]=>
- array(0) {
- }
- ["sub_array[3][1]"]=>
- array(1) {
- [0]=>
- int(11)
- }
- ["sub_array[3][2]"]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- ["sub_array[3][0]"]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing asort() : usage variations ***
-- Testing asort() by supplying various arrays containing sub arrays --
echo "Done\n";
?>
---EXPECTF--
-*** Testing asort() : usage variations ***
-
--- Testing asort() by supplying various arrays with key values --
-
--- Iteration 1 --
-- With default sort_flag -
-bool(true)
-array(5) {
- [9]=>
- int(11)
- [7]=>
- int(22)
- [8]=>
- int(33)
- [5]=>
- int(55)
- [6]=>
- int(66)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(5) {
- [9]=>
- int(11)
- [7]=>
- int(22)
- [8]=>
- int(33)
- [5]=>
- int(55)
- [6]=>
- int(66)
-}
-
--- Iteration 2 --
-- With default sort_flag -
-bool(true)
-array(3) {
- ["c"]=>
- string(5) "apple"
- [0]=>
- string(6) "banana"
- ["a"]=>
- string(6) "orange"
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(3) {
- ["c"]=>
- string(5) "apple"
- [0]=>
- string(6) "banana"
- ["a"]=>
- string(6) "orange"
-}
-
--- Iteration 3 --
-- With default sort_flag -
-bool(true)
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
-}
-
--- Iteration 4 --
-- With default sort_flag -
-bool(true)
-array(3) {
- [0]=>
- string(5) "first"
- [5]=>
- string(6) "second"
- [6]=>
- string(5) "third"
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(3) {
- [0]=>
- string(5) "first"
- [5]=>
- string(6) "second"
- [6]=>
- string(5) "third"
-}
-
--- Iteration 5 --
-- With default sort_flag -
-bool(true)
-array(6) {
- [4]=>
- int(1)
- [0]=>
- int(1)
- [8]=>
- int(1)
- [1]=>
- int(1)
- [3]=>
- int(13)
- [9]=>
- int(19)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(6) {
- [4]=>
- int(1)
- [0]=>
- int(1)
- [8]=>
- int(1)
- [1]=>
- int(1)
- [3]=>
- int(13)
- [9]=>
- int(19)
-}
-
--- Iteration 6 --
-- With default sort_flag -
-bool(true)
-array(2) {
- ["bar"]=>
- string(3) "baz"
- ["foo"]=>
- int(1)
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(2) {
- ["bar"]=>
- string(3) "baz"
- ["foo"]=>
- int(1)
-}
-
--- Iteration 7 --
-- With default sort_flag -
-bool(true)
-array(4) {
- ["a"]=>
- int(1)
- ["d"]=>
- int(5)
- ["c"]=>
- array(1) {
- ["g"]=>
- int(4)
- }
- ["b"]=>
- array(2) {
- ["e"]=>
- int(2)
- ["f"]=>
- int(3)
- }
-}
-- Sort_flag = SORT_REGULAR -
-bool(true)
-array(4) {
- ["a"]=>
- int(1)
- ["d"]=>
- int(5)
- ["c"]=>
- array(1) {
- ["g"]=>
- int(4)
- }
- ["b"]=>
- array(2) {
- ["e"]=>
- int(2)
- ["f"]=>
- int(3)
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing asort() : usage variations ***
-- Testing asort() by supplying various arrays with key values --
var_dump($a);
?>
--EXPECT--
-array(3) {
- ["a1"]=>
- int(1)
- ["a2"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["a3"]=>
- array(2) {
- ["a"]=>
- array(3) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(30)
- }
- ["b"]=>
- string(1) "b"
- }
-}
-array(3) {
- ["a1"]=>
- int(1)
- ["a2"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["a3"]=>
- array(2) {
- ["a"]=>
- array(3) {
- [0]=>
- int(10)
- [1]=>
- int(20)
- [2]=>
- int(30)
- }
- ["b"]=>
- string(1) "b"
- }
-}
---UEXPECT--
array(3) {
[u"a1"]=>
int(1)
?>
--EXPECT--
a1: 20
-a2: 20 : type : string
---UEXPECT--
-a1: 20
a2: 20 : type : unicode
--EXPECT--
==Mixed==
int(-1)
-string(1) "a"
-int(-2)
-string(1) "b"
-int(3)
-string(1) "c"
-int(4)
-string(1) "d"
-int(5)
-string(1) "e"
-int(6001)
-string(1) "f"
-string(2) "07"
-string(1) "g"
-==Normal==
-int(0)
-string(1) "a"
-==Negative==
-int(-2)
-string(1) "a"
-==Done==
---UEXPECT--
-==Mixed==
-int(-1)
unicode(1) "a"
int(-2)
unicode(1) "b"
?>
--EXPECT--
int(0)
-string(1) "c"
-int(0)
-string(1) "b"
-int(0)
-string(1) "a"
-NULL
---UEXPECT--
-int(0)
unicode(1) "c"
int(0)
unicode(1) "b"
?>
--EXPECT--
-array(3) {
- [0]=>
- string(1) "b"
- [1]=>
- string(1) "c"
- [2]=>
- string(1) "a"
-}
-array(3) {
- ["b"]=>
- int(2)
- ["c"]=>
- int(3)
- [0]=>
- string(1) "a"
-}
---UEXPECT--
array(3) {
[0]=>
unicode(1) "b"
var_dump(array_merge_recursive($c, $c));
?>
--EXPECT--
-array(2) {
- ["a"]=>
- array(2) {
- [0]=>
- string(2) "aa"
- [1]=>
- string(2) "aa"
- }
- ["b"]=>
- array(2) {
- [0]=>
- string(2) "bb"
- [1]=>
- string(2) "bb"
- }
-}
---UEXPECT--
array(2) {
[u"a"]=>
array(2) {
[1]=>
int(2004)
}
-array(26) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- [3]=>
- string(1) "d"
- [4]=>
- string(1) "e"
- [5]=>
- string(1) "f"
- [6]=>
- string(1) "g"
- [7]=>
- string(1) "h"
- [8]=>
- string(1) "i"
- [9]=>
- string(1) "j"
- [10]=>
- string(1) "k"
- [11]=>
- string(1) "l"
- [12]=>
- string(1) "m"
- [13]=>
- string(1) "n"
- [14]=>
- string(1) "o"
- [15]=>
- string(1) "p"
- [16]=>
- string(1) "q"
- [17]=>
- string(1) "r"
- [18]=>
- string(1) "s"
- [19]=>
- string(1) "t"
- [20]=>
- string(1) "u"
- [21]=>
- string(1) "v"
- [22]=>
- string(1) "w"
- [23]=>
- string(1) "x"
- [24]=>
- string(1) "y"
- [25]=>
- string(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)
-}
---UEXPECT--
-array(2) {
- [0]=>
- int(2003)
- [1]=>
- int(2004)
-}
array(26) {
[0]=>
unicode(1) "a"
running_total is 13, current_value is 5
running_total is 38, current_value is 7
Total is 87
-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)
?>
--EXPECT--
-array(5) {
- [0]=>
- string(5) "first"
- [1]=>
- string(6) "second"
- [2]=>
- string(5) "third"
- [3]=>
- string(5) "forth"
- [4]=>
- string(5) "fifth"
-}
---UEXPECT--
array(5) {
[0]=>
unicode(5) "first"
long(3) refcount(2)
--
long(4) refcount(1)
-string(1) "x" refcount(1)
-long(4) refcount(1)
-string(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)
-string(1) "x" refcount(1)
-long(4) refcount(1)
-string(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)
-string(1) "x" refcount(1)
-long(4) refcount(1)
-string(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)
-string(1) "x" refcount(1)
-long(4) refcount(1)
-string(1) "x" refcount(1)
-long(3) refcount(2)
---
-long(1) refcount(2)
-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" { 0078 } refcount(1)
long(4) refcount(1)
unicode(1) "x" { 0078 } refcount(1)
print_r(array_udiff($p1,$p2, 'b'));
?>
--EXPECT--
-string(1) "a"
-string(1) "a"
-Array
-(
- [2] => p Object
- (
- [x] => 0
- )
-
- [1] => p Object
- (
- [x] => 1
- )
-
- [0] => p Object
- (
- [x] => 2
- )
-
-)
-Now diffing:
-string(1) "b"
-string(1) "b"
-string(1) "b"
-string(1) "b"
-string(1) "b"
-string(1) "b"
-string(1) "b"
-string(1) "b"
-string(1) "b"
-Array
-(
- [1] => p Object
- (
- [x] => 1
- )
-
-)
---UEXPECT--
unicode(1) "a"
unicode(1) "a"
Array
[x] => 1
)
-)
\ No newline at end of file
+)
Notice: Array to string conversion in %s on line %d
-Notice: Array to string conversion in %s on line %d
-array(0) {
-}
-string(4) "afad"
---UEXPECTF--
-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
-
-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
-
-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
-
Notice: Array to string conversion in %s on line %d
array(0) {
}
t3();
?>
--EXPECT--
-array(1) {
- ["foo"]=>
- string(3) "aaa"
-}
-array(1) {
- ["foo"]=>
- string(3) "bbb"
-}
-array(1) {
- ["foo"]=>
- &string(3) "noo"
-}
-array(1) {
- ["foo"]=>
- string(3) "bbb"
-}
-array(1) {
- ["foo"]=>
- string(3) "bbb"
-}
-array(1) {
- ["foo"]=>
- string(3) "bbb"
-}
-array(1) {
- ["foo"]=>
- &string(3) "noo"
-}
-array(1) {
- ["foo"]=>
- &string(3) "noo"
-}
-array(1) {
- ["foo"]=>
- string(3) "aaa"
-}
-array(1) {
- ["foo"]=>
- &string(3) "noo"
-}
---UEXPECT--
array(1) {
[u"foo"]=>
unicode(3) "aaa"
echo "Done\n";
?>
---EXPECT--
-array(2) {
- [0]=>
- string(3) "abc"
- [1]=>
- string(4) "0000"
-}
-array(2) {
- ["abc"]=>
- int(1)
- ["0000"]=>
- int(1)
-}
-array(2) {
- [0]=>
- string(3) "abc"
- [1]=>
- string(4) "0000"
-}
-Done
---UEXPECT--
+--EXPECT--
array(2) {
[0]=>
unicode(3) "abc"
--EXPECTF--
Notice: Undefined variable: GLOBALS in %sbug31158.php on line 6
ok
-
int(2)
int(2)
int(2)
-array(2) {
- ["_a"]=>
- &int(2)
- ["_b"]=>
- &int(2)
-}
-int(1)
-int(1)
-int(1)
-int(2)
-int(2)
-int(2)
-array(2) {
- ["_a"]=>
- &int(2)
- ["_b"]=>
- &int(2)
-}
---UEXPECT--
-int(1)
-int(1)
-int(1)
-int(2)
-int(2)
-int(2)
array(2) {
[u"_a"]=>
&int(2)
echo "Done\n";
?>
---EXPECT--
+--EXPECT--
array(5) {
[0]=>
int(5)
}
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
gen_xml(prefix=/Docs/)
gen_xml(prefix=/Docs/@)
/Docs/@Version=1.0
}
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
gen_xml(prefix=/Docs/)
/Docs/Version=1.0
gen_xml(prefix=/Docs/) end
var_dump(array_product($v));
}
?>
---EXPECTF--
-Warning: array_product() expects parameter 1 to be array, string given in %s on line %d
-NULL
-int(0)
-int(0)
-int(3)
-int(9)
-float(1)
-float(9.9999998E+15)
-float(2.8404260053903E+20)
-float(8589934590)
---UEXPECTF--
+--EXPECTF--
Warning: array_product() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
int(0)
var_dump(array_product($v));
}
?>
---EXPECTF--
-Warning: array_product() expects parameter 1 to be array, string given in %s on line %d
-NULL
-int(0)
-int(0)
-int(3)
-int(9)
-float(1)
-int(9999999800000001)
-float(1.219953680145E+30)
-float(3.6893488147419E+19)
---UEXPECTF--
+--EXPECTF--
Warning: array_product() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
int(0)
reset($state);
var_dump( key($state), current($state) );
?>
---EXPECT--
-three => 3
-two => 2
-one => 1
-string(3) "one"
-int(1)
---UEXPECT--
+--EXPECT--
three => 3
two => 2
one => 1
echo "Done\n";
?>
---EXPECTF--
+--EXPECTF--
Warning: array_map(): An error occurred while invoking the map callback in %s on line %d
?>
--EXPECT--
natcasesort success!
-array(6) {
- [0]=>
- string(2) "aa"
- [1]=>
- string(2) "aa"
- [3]=>
- string(2) "bb"
- [2]=>
- string(2) "bb"
- [5]=>
- string(2) "cc"
- [6]=>
- string(2) "cc"
-}
-Array
-(
- [1] => foo
- [2] => bar
- [3] => bar
-)
-array(6) {
- [4]=>
- int(0)
- [3]=>
- int(0)
- [2]=>
- int(0)
- [1]=>
- int(0)
- [5]=>
- string(3) "foo"
- [6]=>
- string(3) "bar"
-}
---UEXPECT--
-natcasesort success!
array(6) {
[0]=>
unicode(2) "aa"
$array = array('-000', ' 001', 1, ' 123', '+123');
var_dump(array_count_values($array));
?>
---EXPECT--
-array(5) {
- ["-000"]=>
- int(1)
- [" 001"]=>
- int(1)
- [1]=>
- int(1)
- [" 123"]=>
- int(1)
- ["+123"]=>
- int(1)
-}
---UEXPECT--
+--EXPECT--
array(5) {
[u"-000"]=>
int(1)
echo "Done\n";
?>
---EXPECTF--
-Strict Standards: Only variables should be passed by reference in %s on line %d
-object(Test)#%d (4) {
- ["_table"]=>
- string(0) ""
- ["_columns"]=>
- array(1) {
- ["name"]=>
- object(stdClass)#%d (0) {
- }
- }
- ["_primary"]=>
- array(0) {
- }
- ["name"]=>
- string(4) "test"
-}
-Done
---UEXPECTF--
+--EXPECTF--
Strict Standards: Only variables should be passed by reference in %s on line %d
object(Test)#%d (4) {
[u"_table"]=>
echo "Done\n";
?>
---EXPECTF--
-array(2) {
- [0]=>
- string(3) "foo"
- [1]=>
- string(3) "bar"
-}
-Done
---UEXPECTF--
+--EXPECTF--
array(2) {
[0]=>
unicode(3) "foo"
echo "Done\n";
?>
---EXPECT--
+--EXPECT--
result for arr1: 1,2,3
result for arr2: 1
result for arr1: 1,2,3
var_dump(range(2147483648, 2147483645, 1 ));
?>
---EXPECT--
+--EXPECT--
array(3) {
[0]=>
int(2147483400)
echo "Done\n";
?>
---EXPECT--
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-array(2) {
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-array(2) {
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-array(2) {
- ["b"]=>
- int(1)
- ["c"]=>
- int(2)
-}
-array(2) {
- ["b"]=>
- int(1)
- ["c"]=>
- int(2)
-}
-array(2) {
- ["b"]=>
- int(1)
- ["c"]=>
- int(2)
-}
-Done
---UEXPECT--
+--EXPECT--
array(2) {
[0]=>
int(2)
echo "Done.\n";
?>
--EXPECT--
-array(3) {
- ["a"]=>
- string(1) "1"
- ["æ"]=>
- string(1) "2"
- ["æøåäö"]=>
- string(1) "3"
-}
-int(3)
-string(1) "1"
-string(1) "2"
-string(1) "3"
-Done.
---UEXPECT--
array(3) {
[u"a"]=>
unicode(1) "1"
var_dump($data);
--EXPECT--
-array(2) {
- ["key1"]=>
- string(4) "val1"
- [0]=>
- array(1) {
- ["key2"]=>
- string(4) "val2"
- }
-}
-array(2) {
- ["key1"]=>
- string(4) "val1"
- [0]=>
- array(1) {
- ["key2"]=>
- string(4) "val2"
- }
-}
-array(2) {
- ["key1"]=>
- string(4) "val1"
- [0]=>
- string(7) "altered"
-}
-array(2) {
- ["key1"]=>
- string(4) "val1"
- [0]=>
- array(1) {
- ["key2"]=>
- string(4) "val2"
- }
-}
---UEXPECT--
array(2) {
[u"key1"]=>
unicode(4) "val1"
echo "Done.\n";
?>
--EXPECTF--
-Warning: array_merge_recursive(): recursion detected in %s/bug43495.php on line %d
+Warning: array_merge_recursive(): recursion detected in %sbug43495.php on line %d
Done.
var_dump($a);
?>
--EXPECT--
-array(1) {
- ["test"]=>
- &NULL
-}
-array(1) {
- ["test"]=>
- &NULL
-}
---UEXPECT--
array(1) {
[u"test"]=>
&NULL
[1]=>
int(2)
}
---UEXPECT--
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
var_dump($result);
?>
--EXPECT--
-array(2) {
- ["event"]=>
- string(8) "SIGGRAPH"
- ["state"]=>
- string(2) "CA"
-}
---UEXPECT--
array(3) {
[u"event"]=>
unicode(8) "SIGGRAPH"
[u"state"]=>
unicode(2) "CA"
}
-
?>
--EXPECT--
*** Testing compact() : basic functionality ***
-array(6) {
- ["a"]=>
- int(1)
- ["b"]=>
- float(0.2)
- ["c"]=>
- bool(true)
- ["d"]=>
- array(1) {
- ["key"]=>
- string(3) "val"
- }
- ["e"]=>
- NULL
- ["f"]=>
- string(6) "string"
-}
-array(6) {
- ["a"]=>
- int(1)
- ["b"]=>
- float(0.2)
- ["c"]=>
- bool(true)
- ["d"]=>
- array(1) {
- ["key"]=>
- string(3) "val"
- }
- ["e"]=>
- NULL
- ["f"]=>
- string(6) "string"
-}
-array(2) {
- ["a"]=>
- int(1)
- ["b"]=>
- float(0.2)
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-Done
---UEXPECT--
-*** Testing compact() : basic functionality ***
array(6) {
[u"a"]=>
int(1)
}
array(0) {
}
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing compact() : usage variations - arrays containg references ***
-Warning: compact(): recursion detected in %s on line %d
-array(1) {
- ["a"]=>
- int(1)
-}
-
-Warning: compact(): recursion detected in %s on line %d
-
-Warning: compact(): recursion detected in %s on line %d
-
-Warning: compact(): recursion detected in %s on line %d
-
-Warning: compact(): recursion detected in %s on line %d
-array(2) {
- ["a"]=>
- int(1)
- ["b"]=>
- int(2)
-}
-array(1) {
- ["c"]=>
- int(3)
-}
-Done
---UEXPECTF--
-*** Testing compact() : usage variations - arrays containg references ***
-
Warning: compact(): recursion detected in %s on line %d
array(1) {
[u"a"]=>
[u"c"]=>
int(3)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing count() : basic functionality ***
-- One Dimensional Array: --
$mode = COUNT_RECURSIVE: int(6)
$mode = 1: int(6)
Done
---UEXPECTF--
-*** Testing count() : basic functionality ***
-
--- One Dimensional Array: --
-int(3)
-
--- Two Dimensional Array: --
-$mode = COUNT_NORMAL: int(3)
-$mode = 0: int(3)
-$mode = COUNT_RECURSIVE: int(6)
-$mode = 1: int(6)
-Done
\ No newline at end of file
Warning: count() expects at most 2 parameters, 3 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing count() : error conditions ***
-
--- Testing count() function with Zero arguments --
-
-Warning: count() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing count() function with more than expected no. of arguments --
-
-Warning: count() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing count() : usage variations ***
-- Iteration 1 --
-- Iteration 24 --
int(1)
Done
---UEXPECTF--
-*** Testing count() : usage variations ***
-
--- Iteration 1 --
-int(1)
-
--- Iteration 2 --
-int(1)
-
--- Iteration 3 --
-int(1)
-
--- Iteration 4 --
-int(1)
-
--- Iteration 5 --
-int(1)
-
--- Iteration 6 --
-int(1)
-
--- Iteration 7 --
-int(1)
-
--- Iteration 8 --
-int(1)
-
--- Iteration 9 --
-int(1)
-
--- Iteration 10 --
-int(0)
-
--- Iteration 11 --
-int(0)
-
--- Iteration 12 --
-int(1)
-
--- Iteration 13 --
-int(1)
-
--- Iteration 14 --
-int(1)
-
--- Iteration 15 --
-int(1)
-
--- Iteration 16 --
-int(1)
-
--- Iteration 17 --
-int(1)
-
--- Iteration 18 --
-int(1)
-
--- Iteration 19 --
-int(1)
-
--- Iteration 20 --
-int(1)
-
--- Iteration 21 --
-int(1)
-
--- Iteration 22 --
-int(0)
-
--- Iteration 23 --
-int(0)
-
--- Iteration 24 --
-int(1)
-Done
\ No newline at end of file
-- Iteration 16 --
-Warning: count() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: count() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: count() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: count() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: count() expects parameter 2 to be long, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: count() expects parameter 2 to be long, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-int(3)
-
--- Iteration 23 --
-int(3)
-
--- Iteration 24 --
-
-Warning: count() expects parameter 2 to be long, resource given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing count() : usage variations ***
-
--- Iteration 1 --
-int(3)
-
--- Iteration 2 --
-int(5)
-
--- Iteration 3 --
-int(3)
-
--- Iteration 4 --
-int(3)
-
--- Iteration 5 --
-int(3)
-
--- Iteration 6 --
-int(3)
-
--- Iteration 7 --
-int(3)
-
--- Iteration 8 --
-int(3)
-
--- Iteration 9 --
-int(3)
-
--- Iteration 10 --
-int(3)
-
--- Iteration 11 --
-int(3)
-
--- Iteration 12 --
-int(5)
-
--- Iteration 13 --
-int(3)
-
--- Iteration 14 --
-int(5)
-
--- Iteration 15 --
-int(3)
-
--- Iteration 16 --
-
Warning: count() expects parameter 2 to be long, Unicode string given in %s on line %d
NULL
Warning: count() expects parameter 2 to be long, resource given in %s on line %d
NULL
-Done
\ No newline at end of file
+Done
Warning: count(): recursion detected in %s on line %d
int(12)
Done
---UEXPECTF--
-*** Testing count() : usage variations ***
-
--- $mode not set: --
-int(4)
-
--- $mode = 1: --
-
-Warning: count(): recursion detected in %s on line %d
-int(12)
-Done
var_dump(current($array));
?>
===DONE===
---EXPECTF--
-*** Testing current() : basic functionality ***
-string(4) "zero"
-string(3) "one"
-int(3)
-bool(false)
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing current() : basic functionality ***
unicode(4) "zero"
unicode(3) "one"
Warning: current() expects exactly 1 parameter, 2 given in %s on line %d
NULL
===DONE===
---UEXPECTF--
-*** Testing current() : error conditions ***
-
--- Testing current() function with Zero arguments --
-
-Warning: current() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing current() function with more than expected no. of arguments --
-
-Warning: current() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-===DONE===
-- Iteration 16 --
-Warning: current() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: current() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-
-Warning: current() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 19 --
-
-Warning: current() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: current() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: current() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: current() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: current() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: current() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-===DONE===
---UEXPECTF--
-*** Testing current() : usage variations ***
-
--- Iteration 1 --
-
-Warning: current() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: current() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: current() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: current() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: current() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: current() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: current() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: current() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: current() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: current() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: current() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: current() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: current() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: current() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: current() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 16 --
-
Warning: current() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
-- Iteration 4 : bool data --
bool(true)
--- Iteration 5 : empty string data --
-string(0) ""
-
--- Iteration 6 : empty array data --
-bool(false)
-
--- Iteration 7 : string data --
-string(6) "string"
-
--- Iteration 8 : object data --
-object(classA)#%d (0) {
-}
-
--- Iteration 9 : undefined data --
-NULL
-
--- Iteration 10 : unset data --
-NULL
-
--- Iteration 11 : resource data --
-resource(%d) of type (stream)
-===DONE===
---UEXPECTF--
-*** Testing current() : usage variations ***
-
--- Iteration 1 : int data --
-int(0)
-
--- Iteration 2 : float data --
-float(10.5)
-
--- Iteration 3 : null data --
-NULL
-
--- Iteration 4 : bool data --
-bool(true)
-
-- Iteration 5 : empty string data --
unicode(0) ""
var_dump(current($array2));
?>
===DONE===
---EXPECTF--
-*** Testing current() : usage variations ***
-
--- Initial position of internal pointer --
-string(4) "zero"
-
--- Position after calling next() --
-$array1: string(3) "one"
-$array2: string(3) "one"
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing current() : usage variations ***
-- Initial position of internal pointer --
var_dump(current($multi_array[3][3][3][1]));
?>
===DONE===
---EXPECTF--
-*** Testing current() : usage variations ***
-
--- Two Dimensional Array --
-Initial Position: string(4) "zero"
-Next Position: array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
-}
-End Position: string(3) "two"
-
--- Access an Array Within an Array --
-Initial Position: int(1)
-
--- Recursive, Multidimensional Array --
-Current Position: string(3) "two"
-string(3) "two"
-int(1)
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing current() : usage variations ***
-- Two Dimensional Array --
echo "Done";
?>
---EXPECTF--
-*** Testing each() : basic functionality ***
-
--- Passed array: --
-array(4) {
- ["one"]=>
- int(1)
- [0]=>
- string(4) "zero"
- ["two"]=>
- string(4) "deux"
- [20]=>
- string(6) "twenty"
-}
-
--- Initial position: --
-array(4) {
- [1]=>
- int(1)
- ["value"]=>
- int(1)
- [0]=>
- string(3) "one"
- ["key"]=>
- string(3) "one"
-}
-
--- End position: --
-array(4) {
- [1]=>
- string(6) "twenty"
- ["value"]=>
- string(6) "twenty"
- [0]=>
- int(20)
- ["key"]=>
- int(20)
-}
-
--- Passed the end of array: --
-bool(false)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing each() : basic functionality ***
-- Passed array: --
-- Passed the end of array: --
bool(false)
-Done
\ No newline at end of file
+Done
Warning: Wrong parameter count for each() in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing each() : error conditions ***
-
--- Testing each() function with Zero arguments --
-
-Warning: Wrong parameter count for each() in %s on line %d
-NULL
-
--- Testing each() function with more than expected no. of arguments --
-
-Warning: Wrong parameter count for each() in %s on line %d
-NULL
-Done
\ No newline at end of file
Warning: Variable passed to each() is not an array or object in %s on line %d
NULL
Done
-
---UEXPECTF--
-*** Testing each() : usage variations ***
-
--- Iteration 1 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 22 --
-bool(false)
-
--- Iteration 23 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: Variable passed to each() is not an array or object in %s on line %d
-NULL
-Done
--EXPECTF--
*** Testing each() : usage variations ***
--- Iteration 1: int data --
-array(4) {
- [1]=>
- int(0)
- ["value"]=>
- int(0)
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 2: float data --
-array(4) {
- [1]=>
- float(10.5)
- ["value"]=>
- float(10.5)
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 3: null data --
-array(4) {
- [1]=>
- NULL
- ["value"]=>
- NULL
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 4: bool data --
-array(4) {
- [1]=>
- bool(true)
- ["value"]=>
- bool(true)
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 5: empty string data --
-array(4) {
- [1]=>
- string(0) ""
- ["value"]=>
- string(0) ""
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 6: empty array data --
-bool(false)
-
--- Iteration 7: string data --
-array(4) {
- [1]=>
- string(6) "string"
- ["value"]=>
- string(6) "string"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 8: object data --
-array(4) {
- [1]=>
- object(classA)#%d (0) {
- }
- ["value"]=>
- object(classA)#%d (0) {
- }
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 9: undefined data --
-array(4) {
- [1]=>
- NULL
- ["value"]=>
- NULL
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 10: unset data --
-array(4) {
- [1]=>
- NULL
- ["value"]=>
- NULL
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 11: resource data --
-array(4) {
- [1]=>
- resource(%d) of type (stream)
- ["value"]=>
- resource(%d) of type (stream)
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-Done
---UEXPECTF--
-*** Testing each() : usage variations ***
-
-- Iteration 1: int data --
array(4) {
[1]=>
[u"key"]=>
int(0)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing each() : usage variations ***
-
--- Iteration 1: int data --
-array(4) {
- [1]=>
- string(4) "zero"
- ["value"]=>
- string(4) "zero"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- Iteration 2: float data --
-array(4) {
- [1]=>
- string(8) "positive"
- ["value"]=>
- string(8) "positive"
- [0]=>
- int(10)
- ["key"]=>
- int(10)
-}
-
--- Iteration 3: extreme floats data --
-array(4) {
- [1]=>
- string(5) "large"
- ["value"]=>
- string(5) "large"
- [0]=>
- int(12345678)
- ["key"]=>
- int(12345678)
-}
-
--- Iteration 4: null uppercase data --
-array(4) {
- [1]=>
- string(6) "null 1"
- ["value"]=>
- string(6) "null 1"
- [0]=>
- string(0) ""
- ["key"]=>
- string(0) ""
-}
-
--- Iteration 5: null lowercase data --
-array(4) {
- [1]=>
- string(6) "null 2"
- ["value"]=>
- string(6) "null 2"
- [0]=>
- string(0) ""
- ["key"]=>
- string(0) ""
-}
-
--- Iteration 6: bool lowercase data --
-array(4) {
- [1]=>
- string(6) "lowert"
- ["value"]=>
- string(6) "lowert"
- [0]=>
- int(1)
- ["key"]=>
- int(1)
-}
-
--- Iteration 7: bool uppercase data --
-array(4) {
- [1]=>
- string(6) "uppert"
- ["value"]=>
- string(6) "uppert"
- [0]=>
- int(1)
- ["key"]=>
- int(1)
-}
-
--- Iteration 8: empty double quotes data --
-array(4) {
- [1]=>
- string(6) "emptyd"
- ["value"]=>
- string(6) "emptyd"
- [0]=>
- string(0) ""
- ["key"]=>
- string(0) ""
-}
-
--- Iteration 9: empty single quotes data --
-array(4) {
- [1]=>
- string(6) "emptys"
- ["value"]=>
- string(6) "emptys"
- [0]=>
- string(0) ""
- ["key"]=>
- string(0) ""
-}
-
--- Iteration 10: string data --
-array(4) {
- [1]=>
- string(7) "stringd"
- ["value"]=>
- string(7) "stringd"
- [0]=>
- string(7) "stringd"
- ["key"]=>
- string(7) "stringd"
-}
-
--- Iteration 11: undefined data --
-array(4) {
- [1]=>
- string(9) "undefined"
- ["value"]=>
- string(9) "undefined"
- [0]=>
- string(0) ""
- ["key"]=>
- string(0) ""
-}
-
--- Iteration 12: unset data --
-array(4) {
- [1]=>
- string(5) "unset"
- ["value"]=>
- string(5) "unset"
- [0]=>
- string(0) ""
- ["key"]=>
- string(0) ""
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing each() : usage variations ***
-- Iteration 1: int data --
[u"key"]=>
unicode(0) ""
}
-Done
\ No newline at end of file
+Done
Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
*** Testing each() : usage variations ***
--- Array made up of referenced variables: --
--- Call each until at the end of the array: --
-array(4) {
- [1]=>
- string(3) "foo"
- ["value"]=>
- string(3) "foo"
- [0]=>
- string(3) "one"
- ["key"]=>
- string(3) "one"
-}
-array(4) {
- [1]=>
- string(3) "bar"
- ["value"]=>
- string(3) "bar"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-bool(false)
-
--- Pass an array by reference to each(): --
-array(4) {
- [1]=>
- string(4) "zero"
- ["value"]=>
- string(4) "zero"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
--- Check original array: --
-array(3) {
- [0]=>
- string(4) "zero"
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
-}
-Done
---UEXPECTF--
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-*** Testing each() : usage variations ***
-
-- Array made up of referenced variables: --
-- Call each until at the end of the array: --
array(4) {
echo "Done";
?>
---EXPECTF--
-*** Testing each() : usage variations ***
-
--- Pass each() a two-dimensional array --
-array(4) {
- [1]=>
- string(4) "zero"
- ["value"]=>
- string(4) "zero"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-array(4) {
- [1]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- ["value"]=>
- array(3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- }
- [0]=>
- int(1)
- ["key"]=>
- int(1)
-}
-array(4) {
- [1]=>
- string(2) "un"
- ["value"]=>
- string(2) "un"
- [0]=>
- string(3) "one"
- ["key"]=>
- string(3) "one"
-}
-
--- Pass each() a sub-array --
-array(4) {
- [1]=>
- string(1) "a"
- ["value"]=>
- string(1) "a"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing each() : usage variations ***
-- Pass each() a two-dimensional array --
[u"key"]=>
int(0)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing each() : usage variations ***
-
--- Current position: --
-0 => zero
-
--- Call to each(): --
-array(4) {
- [1]=>
- string(4) "zero"
- ["value"]=>
- string(4) "zero"
- [0]=>
- int(0)
- ["key"]=>
- int(0)
-}
-
--- New position: --
-1 => one
-Done
---UEXPECTF--
+--EXPECT--
*** Testing each() : usage variations ***
-- Current position: --
-- New position: --
1 => one
-Done
\ No newline at end of file
+Done
int(100)
int(100)
-- Iteration 3 --
-string(1) "y"
-string(1) "y"
--- Iteration 4 --
-NULL
-NULL
--- Iteration 5 --
-int(5)
-int(5)
--- Iteration 6 --
-float(-0.9)
-float(-0.9)
--- Iteration 7 --
-float(-4.9999999)
-float(-4.9999999)
--- Iteration 8 --
-bool(false)
-bool(false)
--- Iteration 9 --
-string(3) "SOA"
-string(3) "SOA"
--- Iteration 10 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 11 --
-string(0) ""
-string(0) ""
--- Iteration 12 --
-string(1) " "
-string(1) " "
--- Iteration 13 --
-float(-2147483648)
-float(-2147483648)
--- Iteration 14 --
-float(-2147483648)
-float(-2147483648)
--- Iteration 15 --
-float(2)
-float(2)
-
-*** Testing end() with sub-arrays ***
-array(3) {
- [1]=>
- string(3) "one"
- ["two"]=>
- int(2)
- [""]=>
- string(1) "f"
-}
-string(1) "f"
-
-*** Testing end() when array elements are deleted ***
-
--- Remove first element from array --
-string(7) "neg.008"
-
--- Remove last element from array --
-int(-4)
-int(-4)
-
--- Remove any element from array apart from first and last element --
-int(-4)
-string(1) "b"
-int(-4)
-
-*** Testing end() on objects ***
-object(foo1)#%d (0) {
-}
-array(2) {
- [0]=>
- &object(foo)#%d (0) {
- }
- [1]=>
- &object(foo1)#%d (0) {
- }
-}
-
-*** Testing end() on resource type ***
-resource(%d) of type (stream)
-resource(%d) of type (stream)
-
-*** Testing error conditions ***
-
-Warning: end() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: end() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: end() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-bool(false)
-Done
---UEXPECTF--
-*** Testing end() on different arrays ***
--- Iteration 1 --
-int(0)
-int(0)
--- Iteration 2 --
-int(100)
-int(100)
--- Iteration 3 --
unicode(1) "y"
unicode(1) "y"
-- Iteration 4 --
int(100)
int(100)
-- Iteration 3 --
-string(1) "y"
-string(1) "y"
--- Iteration 4 --
-NULL
-NULL
--- Iteration 5 --
-int(5)
-int(5)
--- Iteration 6 --
-float(-0.9)
-float(-0.9)
--- Iteration 7 --
-float(-4.9999999)
-float(-4.9999999)
--- Iteration 8 --
-bool(false)
-bool(false)
--- Iteration 9 --
-string(3) "SOA"
-string(3) "SOA"
--- Iteration 10 --
-array(0) {
-}
-array(0) {
-}
--- Iteration 11 --
-string(0) ""
-string(0) ""
--- Iteration 12 --
-string(1) " "
-string(1) " "
--- Iteration 13 --
-int(-2147483648)
-int(-2147483648)
--- Iteration 14 --
-int(-2147483648)
-int(-2147483648)
--- Iteration 15 --
-float(2)
-float(2)
-
-*** Testing end() with sub-arrays ***
-array(3) {
- [1]=>
- string(3) "one"
- ["two"]=>
- int(2)
- [""]=>
- string(1) "f"
-}
-string(1) "f"
-
-*** Testing end() when array elements are deleted ***
-
--- Remove first element from array --
-string(7) "neg.008"
-
--- Remove last element from array --
-int(-4)
-int(-4)
-
--- Remove any element from array apart from first and last element --
-int(-4)
-string(1) "b"
-int(-4)
-
-*** Testing end() on objects ***
-object(foo1)#%d (0) {
-}
-array(2) {
- [0]=>
- &object(foo)#%d (0) {
- }
- [1]=>
- &object(foo1)#%d (0) {
- }
-}
-
-*** Testing end() on resource type ***
-resource(%d) of type (stream)
-resource(%d) of type (stream)
-
-*** Testing error conditions ***
-
-Warning: end() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
-Warning: end() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-
-Warning: end() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-bool(false)
-Done
---UEXPECTF--
-*** Testing end() on different arrays ***
--- Iteration 1 --
-int(0)
-int(0)
--- Iteration 2 --
-int(100)
-int(100)
--- Iteration 3 --
unicode(1) "y"
unicode(1) "y"
-- Iteration 4 --
var_dump(end($array));
?>
===DONE===
---EXPECTF--
-*** Testing end() : basic functionality ***
-
--- Initial Position: --
-0 => zero
-
--- Call to end() --
-string(3) "two"
-
--- Current Position: --
-200 => two
-
--- Add a new element to array --
-string(3) "foo"
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing end() : basic functionality ***
-- Initial Position: --
Warning: end() expects exactly 1 parameter, 2 given in %s on line %d
NULL
===DONE===
---UEXPECTF--
-*** Testing end() : error conditions ***
-
--- Testing end() function with Zero arguments --
-
-Warning: end() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing end() function with more than expected no. of arguments --
-
-Warning: end() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-===DONE===
-- Iteration 16 --
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: end() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: end() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: end() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: end() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: end() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-===DONE===
---UEXPECTF--
-*** Testing end() : usage variations ***
-
--- Iteration 1 --
-
-Warning: end() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: end() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: end() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: end() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: end() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: end() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: end() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: end() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: end() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: end() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: end() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: end() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: end() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: end() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: end() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 16 --
-
Warning: end() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
var_dump(end($array_arg[0]));
?>
===DONE===
---EXPECTF--
-*** Testing end() : usage variations ***
-
--- Pass a two-dimensional array as $array_arg --
-array(3) {
- [0]=>
- int(9)
- [1]=>
- int(8)
- [2]=>
- int(7)
-}
-
--- Pass a sub-array as $array_arg --
-int(7)
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing end() : usage variations ***
-- Pass a two-dimensional array as $array_arg --
var_dump(current($array2));
?>
===DONE===
---EXPECTF--
-*** Testing end() : usage variations ***
-
--- Initial position of internal pointer --
-string(4) "zero"
-
--- Position after calling end() --
-$array1: string(3) "two"
-$array2: string(3) "two"
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing end() : usage variations ***
-- Initial position of internal pointer --
Warning: extract() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: extract() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
-Warning: extract() expects at most 3 parameters, 4 given in %s on line %d
-NULL
-
-Warning: extract(): specified extract type requires the prefix parameter in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing Error Conditions ***
-
-Warning: extract() expects at least 1 parameter, 0 given in %s on line %d
-NULL
-
-Notice: A non well formed numeric value encountered in %s on line %d
-
-Warning: extract(): Invalid extract type in %s on line %d
-NULL
-
-Warning: extract(): Invalid extract type in %s on line %d
-NULL
-
-Warning: extract() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
Warning: extract() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
echo "\nDone";
?>
---EXPECTF--
-long(4) refcount(2)
-string(4) "John" refcount(2)
-int(%d)
-long(4) refcount(2)
-string(4) "John" refcount(2)
-
-Done
---UEXPECTF--
+--EXPECT--
long(4) refcount(2)
unicode(4) "John" { 004a 006f 0068 006e } refcount(2)
int(10)
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
-- Iteration 0 --
int(0)
int(0)
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
-- Iteration 0 --
int(0)
int(0)
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
-- Iteration 0 --
int(0)
int(0)
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
-- Iteration 0 --
int(0)
int(0)
echo "Done\n";
?>
---EXPECTF--
-int(1)
-string(3) "aaa"
-int(1)
-string(3) "bbb"
-array(1) {
- ["foo"]=>
- &string(3) "bbb"
-}
-Done
---UEXPECTF--
+--EXPECT--
int(1)
unicode(3) "aaa"
int(1)
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing for EXTR_PREFIX_ALL called twice with same prefix string ***
int(5)
int(11)
echo "\nDone";
?>
---EXPECTF--
+--EXPECT--
*** Testing for Numerical prefixes ***
int(3)
int(1)
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing for object ***
int(1)
Done
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, 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
---UEXPECTF--
-*** 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
echo "Done\n";
?>
---EXPECTF--
-*** Testing in_array() with different needle values ***
--- 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)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing in_array() with different needle values ***
-- Iteration 1 --
bool(false)
echo "Done\n";
?>
---EXPECTF--
-*** Testing in_array() with different haystack values ***
--- 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)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing in_array() with different haystack values ***
-- Iteration 1 --
bool(true)
NULL
bool(true)
Done
---UEXPECTF--
-*** 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)
-Done
echo "Done\n";
?>
---EXPECTF--
-*** 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)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing resource type with in_array() ***
bool(true)
bool(false)
var_dump(key($array));
?>
===DONE===
---EXPECTF--
-*** Testing key() : basic functionality ***
-
--- Initial Position: --
-int(0)
-
--- Next Position: --
-int(99)
-
--- End Position: --
-string(5) "three"
-
--- Past end of the array --
-NULL
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing key() : basic functionality ***
-- Initial Position: --
Warning: key() expects exactly 1 parameter, 2 given in %s on line %d
NULL
===DONE===
---UEXPECTF--
-*** Testing key() : error conditions ***
-
--- Testing key() function with Zero arguments --
-
-Warning: key() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing key() function with more than expected no. of arguments --
-
-Warning: key() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-===DONE===
-- Iteration 16 --
-Warning: key() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: key() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-NULL
-
--- Iteration 19 --
-
-Warning: key() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: key() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: key() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: key() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: key() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: key() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: key() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-===DONE===
---UEXPECTF--
-*** Testing key() : usage variations ***
-
--- Iteration 1 --
-
-Warning: key() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: key() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: key() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: key() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: key() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: key() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: key() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: key() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: key() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: key() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: key() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: key() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: key() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: key() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: key() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 16 --
-
Warning: key() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
};
?>
===DONE===
---EXPECTF--
-*** Testing key() : usage variations ***
-
--- Iteration 1 : int data --
-int(0)
-int(1)
-int(12345)
-int(-2345)
-
--- Iteration 2 : float data --
-int(10)
-int(-10)
-int(0)
-
--- Iteration 3 : extreme floats data --
-int(12345678)
-int(0)
-
--- Iteration 4 : null uppercase data --
-string(0) ""
-
--- Iteration 5 : null lowercase data --
-string(0) ""
-
--- Iteration 6 : bool lowercase data --
-int(1)
-int(0)
-
--- Iteration 7 : bool uppercase data --
-int(1)
-int(0)
-
--- Iteration 8 : empty double quotes data --
-string(0) ""
-
--- Iteration 9 : empty single quotes data --
-string(0) ""
-
--- Iteration 10 : string data --
-string(7) "stringd"
-string(7) "strings"
-string(11) "hello world"
-
--- Iteration 11 : undefined data --
-string(0) ""
-
--- Iteration 12 : unset data --
-string(0) ""
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing key() : usage variations ***
-- Iteration 1 : int data --
var_dump(key($array2));
?>
===DONE===
---EXPECTF--
-*** Testing key() : usage variations ***
-
--- Initial position of internal pointer --
-int(0)
-
--- Position after calling next() --
-$array1: int(1)
-$array2: int(1)
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing key() : usage variations ***
-- Initial position of internal pointer --
var_dump(key($multi_array[3][3][3][1]));
?>
===DONE===
---EXPECTF--
-*** Testing key() : usage variations ***
-
--- Two Dimensional Array --
-Initial Position: int(0)
-Next Position: int(1)
-End Position: int(2)
-
--- Access an Array Within an Array --
-Initial Position: int(0)
-
--- Recursive, Multidimensional Array --
-Current Position: int(2)
-int(2)
-int(0)
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing key() : usage variations ***
-- Two Dimensional Array --
/*
* Testing krsort() by providing array of integer/string values to check the basic functionality
* with following flag values :
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
* 4.SORT_STRING - compare items as strings
// an array containing unsorted numeric values with indices
$unsorted_numerics = array( 100 => 4, 33 => 3, 555 => 2, 22 => 1 );
-echo "\n-- Testing krsort() by supplying string array, 'flag' value is defualt --\n";
+echo "\n-- Testing krsort() by supplying string array, 'flag' value is default --\n";
$temp_array = $unsorted_strings;
var_dump( krsort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
-echo "\n-- Testing krsort() by supplying numeric array, 'flag' value is defualt --\n";
+echo "\n-- Testing krsort() by supplying numeric array, 'flag' value is default --\n";
$temp_array = $unsorted_numerics;
var_dump( krsort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing krsort() : basic functionality ***
--- Testing krsort() by supplying string array, 'flag' value is defualt --
-bool(true)
-array(3) {
- ["orange"]=>
- string(1) "o"
- ["lemon"]=>
- string(1) "l"
- ["banana"]=>
- string(1) "b"
-}
-
--- Testing krsort() by supplying numeric array, 'flag' value is defualt --
-bool(true)
-array(4) {
- [555]=>
- int(2)
- [100]=>
- int(4)
- [33]=>
- int(3)
- [22]=>
- int(1)
-}
-
--- Testing krsort() by supplying string array, 'flag' = SORT_REGULAR --
-bool(true)
-array(3) {
- ["orange"]=>
- string(1) "o"
- ["lemon"]=>
- string(1) "l"
- ["banana"]=>
- string(1) "b"
-}
-
--- Testing krsort() by supplying numeric array, 'flag' = SORT_REGULAR --
-bool(true)
-array(4) {
- [555]=>
- int(2)
- [100]=>
- int(4)
- [33]=>
- int(3)
- [22]=>
- int(1)
-}
-
--- Testing krsort() by supplying string array, 'flag' = SORT_STRING --
-bool(true)
-array(3) {
- ["orange"]=>
- string(1) "o"
- ["lemon"]=>
- string(1) "l"
- ["banana"]=>
- string(1) "b"
-}
-
--- Testing krsort() by supplying numeric array, 'flag' = SORT_NUMERIC --
-bool(true)
-array(4) {
- [555]=>
- int(2)
- [100]=>
- int(4)
- [33]=>
- int(3)
- [22]=>
- int(1)
-}
-Done
---UEXPECTF--
-*** Testing krsort() : basic functionality ***
-
--- Testing krsort() by supplying string array, 'flag' value is defualt --
+-- Testing krsort() by supplying string array, 'flag' value is default --
bool(true)
array(3) {
[u"orange"]=>
unicode(1) "b"
}
--- Testing krsort() by supplying numeric array, 'flag' value is defualt --
+-- Testing krsort() by supplying numeric array, 'flag' value is default --
bool(true)
array(4) {
[555]=>
int(2)
}
Done
---UEXPECTF--
-*** Testing krsort() : error conditions ***
-
--- Testing krsort() function with zero arguments --
-
-Warning: krsort() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing krsort() function with more than expected no. of arguments --
-
-- Sort flag = SORT_REGULAR -
-
-Warning: krsort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-
-- Sort flag = SORT_STRING -
-
-Warning: krsort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-
-- Sort flag = SORT_NUMERIC -
-
-Warning: krsort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-Done
*/
/*
* testing krsort() by providing array of integer/string objects with following flag values:
- * 1.Defualt flag value
+ * 1.default flag value
* 2.SORT_REGULAR - compare items normally
*/
);
-echo "\n-- Testing krsort() by supplying various object arrays, 'flag' value is defualt --\n";
+echo "\n-- Testing krsort() by supplying various object arrays, 'flag' value is default --\n";
-// testing krsort() function by supplying integer object array, flag value is defualt
+// testing krsort() function by supplying integer object array, flag value is default
$temp_array = $unsorted_int_obj;
var_dump(krsort($temp_array) );
var_dump($temp_array);
-// testing krsort() function by supplying string object array, flag value is defualt
+// testing krsort() function by supplying string object array, flag value is default
$temp_array = $unsorted_str_obj;
var_dump(krsort($temp_array) );
var_dump($temp_array);
--EXPECTF--
*** Testing krsort() : object functionality ***
--- Testing krsort() by supplying various object arrays, 'flag' value is defualt --
-bool(true)
-array(6) {
- [50]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- float(0.001)
- }
- [20]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(66)
- }
- [10]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(11)
- }
- [6]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(0)
- }
- [4]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(-5)
- }
- [3]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(23)
- }
-}
-bool(true)
-array(8) {
- ["w"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(1) "w"
- }
- ["t"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(1) "t"
- }
- ["py"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(2) "py"
- }
- ["axx"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(3) "axx"
- }
- ["apple"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(5) "apple"
- }
- ["aPPle"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(5) "aPPle"
- }
- ["Orange"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(6) "Orange"
- }
- ["Lemon"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(5) "Lemon"
- }
-}
-
--- Testing krsort() by supplying various object arrays, 'flag' value is SORT_REGULAR --
-bool(true)
-array(6) {
- [50]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- float(0.001)
- }
- [20]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(66)
- }
- [10]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(11)
- }
- [6]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(0)
- }
- [4]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(-5)
- }
- [3]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(23)
- }
-}
-bool(true)
-array(8) {
- ["w"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(1) "w"
- }
- ["t"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(1) "t"
- }
- ["py"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(2) "py"
- }
- ["axx"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(3) "axx"
- }
- ["apple"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(5) "apple"
- }
- ["aPPle"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(5) "aPPle"
- }
- ["Orange"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(6) "Orange"
- }
- ["Lemon"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(5) "Lemon"
- }
-}
-Done
---UEXPECTF--
-*** Testing krsort() : object functionality ***
-
--- Testing krsort() by supplying various object arrays, 'flag' value is defualt --
+-- Testing krsort() by supplying various object arrays, 'flag' value is default --
bool(true)
array(6) {
[50]=>
/*
* testing krsort() by providing different unexpected values for array argument
* with following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
* 4.SORT_STRING - compare items as strings
// loop though each element of the array and check the working of krsort()
// when $array arugment is supplied with different values from $unexpected_values
echo "\n-- Testing krsort() by supplying different unexpected values for 'array' argument --\n";
-echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
+echo "\n-- Flag values are default, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
$counter = 1;
for($index = 0; $index < count($unexpected_values); $index ++) {
-- Testing krsort() by supplying different unexpected values for 'array' argument --
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
--- Iteration 1 --
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: krsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Done
---UEXPECTF--
-*** Testing krsort() : usage variations ***
-
--- Testing krsort() by supplying different unexpected values for 'array' argument --
-
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
+-- Flag values are default, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
-- Iteration 1 --
Warning: krsort() expects parameter 1 to be array, integer given in %s on line %d
/*
* testing krsort() by providing array of heredoc strings for $array argument with
* following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_STRING - compare items as strings
*/
$multiline_heredoc => "heredoc string\twith!@# and 123\nTest this!!!"
);
-echo "\n-- Testing krsort() by supplying heredoc string array, 'flag' value is defualt --\n";
+echo "\n-- Testing krsort() by supplying heredoc string array, 'flag' value is default --\n";
$temp_array = $array;
var_dump(krsort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing krsort() : usage variations ***
--- Testing krsort() by supplying heredoc string array, 'flag' value is defualt --
-bool(true)
-array(3) {
- ["heredoc string with!@# and 123
-Test this!!!"]=>
- string(43) "heredoc string with!@# and 123
-Test this!!!"
- ["Heredoc"]=>
- string(7) "Heredoc"
- ["HEREDOC"]=>
- string(7) "HEREDOC"
-}
-
--- Testing krsort() by supplying heredoc string array, 'flag' = SORT_REGULAR --
-bool(true)
-array(3) {
- ["heredoc string with!@# and 123
-Test this!!!"]=>
- string(43) "heredoc string with!@# and 123
-Test this!!!"
- ["Heredoc"]=>
- string(7) "Heredoc"
- ["HEREDOC"]=>
- string(7) "HEREDOC"
-}
-
--- Testing krsort() by supplying heredoc string array, 'flag' = SORT_STRING --
-bool(true)
-array(3) {
- ["heredoc string with!@# and 123
-Test this!!!"]=>
- string(43) "heredoc string with!@# and 123
-Test this!!!"
- ["Heredoc"]=>
- string(7) "Heredoc"
- ["HEREDOC"]=>
- string(7) "HEREDOC"
-}
-Done
---UEXPECTF--
-*** Testing krsort() : usage variations ***
-
--- Testing krsort() by supplying heredoc string array, 'flag' value is defualt --
+-- Testing krsort() by supplying heredoc string array, 'flag' value is default --
bool(true)
array(3) {
[u"heredoc string with!@# and 123
/*
* testing krsort() by providing array of boolean values for $array argument with following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
*/
// bool value array
$bool_values = array (true => true, false => false, TRUE => TRUE, FALSE => FALSE);
-echo "\n-- Testing krsort() by supplying boolean value array, 'flag' value is defualt --\n";
+echo "\n-- Testing krsort() by supplying boolean value array, 'flag' value is default --\n";
$temp_array = $bool_values;
var_dump(krsort($temp_array) );
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing krsort() : usage variations ***
--- Testing krsort() by supplying boolean value array, 'flag' value is defualt --
-bool(true)
-array(2) {
- [1]=>
- bool(true)
- [0]=>
- bool(false)
-}
-
--- Testing krsort() by supplying boolean value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(2) {
- [1]=>
- bool(true)
- [0]=>
- bool(false)
-}
-
--- Testing krsort() by supplying boolean value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(2) {
- [1]=>
- bool(true)
- [0]=>
- bool(false)
-}
-
--- Testing krsort() by supplying boolean value array, 'flag' value is SORT_STRING --
-bool(true)
-array(2) {
- [1]=>
- bool(true)
- [0]=>
- bool(false)
-}
-Done
---UEXPECTF--
-*** Testing krsort() : usage variations ***
-
--- Testing krsort() by supplying boolean value array, 'flag' value is defualt --
+-- Testing krsort() by supplying boolean value array, 'flag' value is default --
bool(true)
array(2) {
[1]=>
}
-- Iteration 13 --
-Warning: krsort() expects parameter 2 to be long, string given in %s on line %d%d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 14 --
-
-Warning: krsort() expects parameter 2 to be long, string given in %s on line %d%d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 15 --
-
-Warning: krsort() expects parameter 2 to be long, string given in %s on line %d%d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 16 --
-
-Warning: krsort() expects parameter 2 to be long, string given in %s on line %d%d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 17 --
-
-Warning: krsort() expects parameter 2 to be long, object given in %s on line %d%d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 18 --
-
-Warning: krsort() expects parameter 2 to be long, string given in %s on line %d%d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 19 --
-
-Warning: krsort() expects parameter 2 to be long, string given in %s on line %d%d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 20 --
-
-Warning: krsort() expects parameter 2 to be long, resource given in %s on line %d%d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
-Done
---UEXPECTF--
-*** Testing krsort() : usage variations ***
-
--- Testing krsort() by supplying different unexpected values for 'sort_flags' argument --
--- Iteration 1 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 2 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 3 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 4 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 5 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 6 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 7 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 8 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 9 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 10 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 11 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 12 --
-bool(true)
-array(3) {
- [45]=>
- int(45)
- [10]=>
- int(10)
- [2]=>
- int(2)
-}
--- Iteration 13 --
-
Warning: krsort() expects parameter 2 to be long, Unicode string given in %s on line %d
bool(false)
array(3) {
/*
* Testing krsort() by providing array of integer/float/mixed values for $array argument
* with following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
- echo "- With defualt sort flag -\n";
+ echo "- With default sort flag -\n";
$temp_array = $array;
var_dump(krsort($temp_array) );
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing krsort() : usage variations ***
-- Testing krsort() by supplying various integer/float arrays --
-- Iteration 1 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(9) {
[8]=>
}
-- Iteration 2 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(6) {
[6]=>
}
-- Iteration 3 --
-- With defualt sort flag -
-bool(true)
-array(11) {
- [11]=>
- int(33)
- [9]=>
- float(0.106)
- [7]=>
- int(2)
- [6]=>
- float(0.09)
- [5]=>
- int(0)
- [4]=>
- int(-1)
- [2]=>
- float(0.0021)
- [1]=>
- float(0.0001)
- [-3]=>
- float(-0.01)
- [-8]=>
- float(-0.9)
- [-10]=>
- float(-0.106)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(11) {
- [11]=>
- int(33)
- [9]=>
- float(0.106)
- [7]=>
- int(2)
- [6]=>
- float(0.09)
- [5]=>
- int(0)
- [4]=>
- int(-1)
- [2]=>
- float(0.0021)
- [1]=>
- float(0.0001)
- [-3]=>
- float(-0.01)
- [-8]=>
- float(-0.9)
- [-10]=>
- float(-0.106)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(11) {
- [11]=>
- int(33)
- [9]=>
- float(0.106)
- [7]=>
- int(2)
- [6]=>
- float(0.09)
- [5]=>
- int(0)
- [4]=>
- int(-1)
- [2]=>
- float(0.0021)
- [1]=>
- float(0.0001)
- [-3]=>
- float(-0.01)
- [-8]=>
- float(-0.9)
- [-10]=>
- float(-0.106)
-}
-Done
---UEXPECTF--
-*** Testing krsort() : usage variations ***
-
--- Testing krsort() by supplying various integer/float arrays --
-
--- Iteration 1 --
-- With defualt sort flag -
-bool(true)
-array(9) {
- [8]=>
- int(41)
- [7]=>
- int(0)
- [5]=>
- int(31)
- [3]=>
- int(21)
- [1]=>
- int(11)
- [-2]=>
- int(-11)
- [-4]=>
- int(-21)
- [-6]=>
- int(-31)
- [-10]=>
- int(-41)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(9) {
- [8]=>
- int(41)
- [7]=>
- int(0)
- [5]=>
- int(31)
- [3]=>
- int(21)
- [1]=>
- int(11)
- [-2]=>
- int(-11)
- [-4]=>
- int(-21)
- [-6]=>
- int(-31)
- [-10]=>
- int(-41)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(9) {
- [8]=>
- int(41)
- [7]=>
- int(0)
- [5]=>
- int(31)
- [3]=>
- int(21)
- [1]=>
- int(11)
- [-2]=>
- int(-11)
- [-4]=>
- int(-21)
- [-6]=>
- int(-31)
- [-10]=>
- int(-41)
-}
-
--- Iteration 2 --
-- With defualt sort flag -
-bool(true)
-array(6) {
- [6]=>
- float(0.0001)
- [4]=>
- float(0.106)
- [3]=>
- float(1050)
- [1]=>
- float(10.5)
- [0]=>
- float(0.5)
- [-7]=>
- float(-0.1)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(6) {
- [6]=>
- float(0.0001)
- [4]=>
- float(0.106)
- [3]=>
- float(1050)
- [1]=>
- float(10.5)
- [0]=>
- float(0.5)
- [-7]=>
- float(-0.1)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(6) {
- [6]=>
- float(0.0001)
- [4]=>
- float(0.106)
- [3]=>
- float(1050)
- [1]=>
- float(10.5)
- [0]=>
- float(0.5)
- [-7]=>
- float(-0.1)
-}
-
--- Iteration 3 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(11) {
[11]=>
/*
* testing krsort() by providing array of octal values for $array argument
* with following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
077 => 06, -066 => -01, -0345 => -02, 0 => 0
);
-echo "\n-- Testing krsort() by supplying octal value array, 'flag' value is defualt --\n";
+echo "\n-- Testing krsort() by supplying octal value array, 'flag' value is default --\n";
$temp_array = $unsorted_oct_array;
var_dump( krsort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing krsort() : usage variations ***
--- Testing krsort() by supplying octal value array, 'flag' value is defualt --
-bool(true)
-array(9) {
- [669]=>
- int(1)
- [506]=>
- int(5)
- [229]=>
- int(3)
- [209]=>
- int(2)
- [63]=>
- int(6)
- [54]=>
- int(4)
- [0]=>
- int(0)
- [-54]=>
- int(-1)
- [-229]=>
- int(-2)
-}
-
--- Testing krsort() by supplying octal value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(9) {
- [669]=>
- int(1)
- [506]=>
- int(5)
- [229]=>
- int(3)
- [209]=>
- int(2)
- [63]=>
- int(6)
- [54]=>
- int(4)
- [0]=>
- int(0)
- [-54]=>
- int(-1)
- [-229]=>
- int(-2)
-}
-
--- Testing krsort() by supplying octal value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(9) {
- [669]=>
- int(1)
- [506]=>
- int(5)
- [229]=>
- int(3)
- [209]=>
- int(2)
- [63]=>
- int(6)
- [54]=>
- int(4)
- [0]=>
- int(0)
- [-54]=>
- int(-1)
- [-229]=>
- int(-2)
-}
-Done
---UEXPECTF--
-*** Testing krsort() : usage variations ***
-
--- Testing krsort() by supplying octal value array, 'flag' value is defualt --
+-- Testing krsort() by supplying octal value array, 'flag' value is default --
bool(true)
array(9) {
[669]=>
/*
* testing krsort() by providing array of string values for $array argument with
* following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_STRING - compare items as strings
*/
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
- echo "- With defualt sort flag -\n";
+ echo "- With default sort flag -\n";
$temp_array = $array;
var_dump(krsort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing krsort() : usage variations ***
-- Testing krsort() by supplying various string arrays --
-- Iteration 1 --
-- With defualt sort flag -
-bool(true)
-array(11) {
- ["\xhh"]=>
- string(4) "\xhh"
- ["\e"]=>
- string(2) "\e"
- ["\ddd"]=>
- string(4) "\ddd"
- ["\cx"]=>
- string(3) "\cx"
- ["\a"]=>
- string(2) "\a"
- ["
-"]=>
- string(1) "
-"
- ["\f"]=>
- string(1) "\f"
- ["\v"]=>
- string(1) "\v"
- ["
-"]=>
- string(1) "
-"
- [" "]=>
- string(1) " "
- [""]=>
- NULL
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(11) {
- ["\xhh"]=>
- string(4) "\xhh"
- ["\e"]=>
- string(2) "\e"
- ["\ddd"]=>
- string(4) "\ddd"
- ["\cx"]=>
- string(3) "\cx"
- ["\a"]=>
- string(2) "\a"
- ["
-"]=>
- string(1) "
-"
- ["\f"]=>
- string(1) "\f"
- ["\v"]=>
- string(1) "\v"
- ["
-"]=>
- string(1) "
-"
- [" "]=>
- string(1) " "
- [""]=>
- NULL
-}
-- Sort flag = SORT_STRING -
-bool(true)
-array(11) {
- ["\xhh"]=>
- string(4) "\xhh"
- ["\e"]=>
- string(2) "\e"
- ["\ddd"]=>
- string(4) "\ddd"
- ["\cx"]=>
- string(3) "\cx"
- ["\a"]=>
- string(2) "\a"
- ["
-"]=>
- string(1) "
-"
- ["\f"]=>
- string(1) "\f"
- ["\v"]=>
- string(1) "\v"
- ["
-"]=>
- string(1) "
-"
- [" "]=>
- string(1) " "
- [""]=>
- NULL
-}
-
--- Iteration 2 --
-- With defualt sort flag -
-bool(true)
-array(11) {
- ["x"]=>
- string(1) "X"
- ["te"]=>
- string(4) "Test"
- ["t"]=>
- string(4) "TTTT"
- ["o"]=>
- string(6) "Orange"
- ["X"]=>
- string(1) "x"
- ["W"]=>
- string(2) "ww"
- ["T"]=>
- string(3) "ttt"
- ["O"]=>
- string(6) "oraNGe"
- ["Lemon"]=>
- string(5) "lemoN"
- ["B"]=>
- string(6) "BANANA"
- ["Apple"]=>
- string(5) "apple"
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(11) {
- ["x"]=>
- string(1) "X"
- ["te"]=>
- string(4) "Test"
- ["t"]=>
- string(4) "TTTT"
- ["o"]=>
- string(6) "Orange"
- ["X"]=>
- string(1) "x"
- ["W"]=>
- string(2) "ww"
- ["T"]=>
- string(3) "ttt"
- ["O"]=>
- string(6) "oraNGe"
- ["Lemon"]=>
- string(5) "lemoN"
- ["B"]=>
- string(6) "BANANA"
- ["Apple"]=>
- string(5) "apple"
-}
-- Sort flag = SORT_STRING -
-bool(true)
-array(11) {
- ["x"]=>
- string(1) "X"
- ["te"]=>
- string(4) "Test"
- ["t"]=>
- string(4) "TTTT"
- ["o"]=>
- string(6) "Orange"
- ["X"]=>
- string(1) "x"
- ["W"]=>
- string(2) "ww"
- ["T"]=>
- string(3) "ttt"
- ["O"]=>
- string(6) "oraNGe"
- ["Lemon"]=>
- string(5) "lemoN"
- ["B"]=>
- string(6) "BANANA"
- ["Apple"]=>
- string(5) "apple"
-}
-Done
---UEXPECTF--
-*** Testing krsort() : usage variations ***
-
--- Testing krsort() by supplying various string arrays --
-
--- Iteration 1 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(11) {
[u"\xhh"]=>
}
-- Iteration 2 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(11) {
[u"x"]=>
/*
* testing krsort() by providing array of hexa-decimal values for $array argument
* with following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
0x1ab => 0x1ab, 0xff => 0xff, -0xff => -0xFF, 0 => 0, -0x2aa => -0x2aa
);
-echo "\n-- Testing krsort() by supplying hexadecimal value array, 'flag' value is defualt --\n";
+echo "\n-- Testing krsort() by supplying hexadecimal value array, 'flag' value is default --\n";
$temp_array = $unsorted_hex_array;
var_dump(krsort( $temp_array) ); // expecting : bool(true)
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing krsort() : usage variations ***
--- Testing krsort() by supplying hexadecimal value array, 'flag' value is defualt --
-bool(true)
-array(9) {
- [4095]=>
- int(4095)
- [682]=>
- int(682)
- [427]=>
- int(427)
- [255]=>
- int(255)
- [187]=>
- int(187)
- [15]=>
- int(15)
- [0]=>
- int(0)
- [-255]=>
- int(-255)
- [-682]=>
- int(-682)
-}
-
--- Testing krsort() by supplying hexadecimal value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(9) {
- [4095]=>
- int(4095)
- [682]=>
- int(682)
- [427]=>
- int(427)
- [255]=>
- int(255)
- [187]=>
- int(187)
- [15]=>
- int(15)
- [0]=>
- int(0)
- [-255]=>
- int(-255)
- [-682]=>
- int(-682)
-}
-
--- Testing krsort() by supplying hexadecimal value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(9) {
- [4095]=>
- int(4095)
- [682]=>
- int(682)
- [427]=>
- int(427)
- [255]=>
- int(255)
- [187]=>
- int(187)
- [15]=>
- int(15)
- [0]=>
- int(0)
- [-255]=>
- int(-255)
- [-682]=>
- int(-682)
-}
-Done
---UEXPECTF--
-*** Testing krsort() : usage variations ***
-
--- Testing krsort() by supplying hexadecimal value array, 'flag' value is defualt --
+-- Testing krsort() by supplying hexadecimal value array, 'flag' value is default --
bool(true)
array(9) {
[4095]=>
/*
* testing krsort() by providing arrays contains sub arrays for $array argument
* with flowing flag values
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
*/
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
- echo "- With defualt sort flag -\n";
+ echo "- With default sort flag -\n";
$temp_array = $array;
var_dump( krsort($temp_array) );
var_dump($temp_array);
-- Testing krsort() by supplying various arrays containing sub arrays --
-- Iteration 1 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(0) {
}
}
-- Iteration 2 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(1) {
[1]=>
}
-- Iteration 3 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(3) {
[4]=>
}
-- Iteration 4 --
-- With defualt sort flag -
-bool(true)
-array(4) {
- [3]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
- [2]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- [1]=>
- array(1) {
- [0]=>
- int(11)
- }
- [0]=>
- array(0) {
- }
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(4) {
- [3]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
- [2]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- [1]=>
- array(1) {
- [0]=>
- int(11)
- }
- [0]=>
- array(0) {
- }
-}
-Done
---UEXPECTF--
-*** Testing krsort() : usage variations ***
-
--- Testing krsort() by supplying various arrays containing sub arrays --
-
--- Iteration 1 --
-- With defualt sort flag -
-bool(true)
-array(0) {
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(0) {
-}
-
--- Iteration 2 --
-- With defualt sort flag -
-bool(true)
-array(1) {
- [1]=>
- array(0) {
- }
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(1) {
- [1]=>
- array(0) {
- }
-}
-
--- Iteration 3 --
-- With defualt sort flag -
-bool(true)
-array(3) {
- [4]=>
- int(44)
- [3]=>
- array(2) {
- [0]=>
- int(64)
- [1]=>
- int(61)
- }
- [1]=>
- int(11)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(3) {
- [4]=>
- int(44)
- [3]=>
- array(2) {
- [0]=>
- int(64)
- [1]=>
- int(61)
- }
- [1]=>
- int(11)
-}
-
--- Iteration 4 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(4) {
[3]=>
/*
* Testing krsort() by providing arrays with/without key values for $array argument
* with following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
*/
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
- echo "- With defualt sort flag -\n";
+ echo "- With default sort flag -\n";
$temp_array = $array;
var_dump( krsort($temp_array) );
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing krsort() : usage variations ***
-- Testing krsort() by supplying various arrays with/without key values --
-- Iteration 1 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(5) {
[9]=>
}
-- Iteration 2 --
-- With defualt sort flag -
-bool(true)
-array(3) {
- ["c"]=>
- string(5) "apple"
- [0]=>
- string(6) "banana"
- ["a"]=>
- string(6) "orange"
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(3) {
- ["c"]=>
- string(5) "apple"
- [0]=>
- string(6) "banana"
- ["a"]=>
- string(6) "orange"
-}
-
--- Iteration 3 --
-- With defualt sort flag -
-bool(true)
-array(6) {
- [5]=>
- int(6)
- [4]=>
- int(5)
- [3]=>
- int(4)
- [2]=>
- int(3)
- [1]=>
- int(2)
- [0]=>
- int(1)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(6) {
- [5]=>
- int(6)
- [4]=>
- int(5)
- [3]=>
- int(4)
- [2]=>
- int(3)
- [1]=>
- int(2)
- [0]=>
- int(1)
-}
-
--- Iteration 4 --
-- With defualt sort flag -
-bool(true)
-array(3) {
- [5]=>
- string(6) "second"
- [1]=>
- string(5) "third"
- [0]=>
- string(5) "first"
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(3) {
- [5]=>
- string(6) "second"
- [1]=>
- string(5) "third"
- [0]=>
- string(5) "first"
-}
-
--- Iteration 5 --
-- With defualt sort flag -
-bool(true)
-array(6) {
- [9]=>
- int(19)
- [8]=>
- int(1)
- [4]=>
- int(1)
- [3]=>
- int(13)
- [1]=>
- int(1)
- [0]=>
- int(1)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(6) {
- [9]=>
- int(19)
- [8]=>
- int(1)
- [4]=>
- int(1)
- [3]=>
- int(13)
- [1]=>
- int(1)
- [0]=>
- int(1)
-}
-
--- Iteration 6 --
-- With defualt sort flag -
-bool(true)
-array(2) {
- ["foo"]=>
- int(1)
- ["bar"]=>
- string(3) "baz"
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(2) {
- ["foo"]=>
- int(1)
- ["bar"]=>
- string(3) "baz"
-}
-
--- Iteration 7 --
-- With defualt sort flag -
-bool(true)
-array(4) {
- ["d"]=>
- int(5)
- ["c"]=>
- array(1) {
- ["g"]=>
- int(4)
- }
- ["b"]=>
- array(2) {
- ["e"]=>
- int(2)
- ["f"]=>
- int(3)
- }
- ["a"]=>
- int(1)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(4) {
- ["d"]=>
- int(5)
- ["c"]=>
- array(1) {
- ["g"]=>
- int(4)
- }
- ["b"]=>
- array(2) {
- ["e"]=>
- int(2)
- ["f"]=>
- int(3)
- }
- ["a"]=>
- int(1)
-}
-Done
---UEXPECTF--
-*** Testing krsort() : usage variations ***
-
--- Testing krsort() by supplying various arrays with/without key values --
-
--- Iteration 1 --
-- With defualt sort flag -
-bool(true)
-array(5) {
- [9]=>
- int(11)
- [8]=>
- int(33)
- [7]=>
- int(22)
- [6]=>
- int(66)
- [5]=>
- int(55)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(5) {
- [9]=>
- int(11)
- [8]=>
- int(33)
- [7]=>
- int(22)
- [6]=>
- int(66)
- [5]=>
- int(55)
-}
-
--- Iteration 2 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(3) {
[u"c"]=>
}
-- Iteration 3 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(6) {
[5]=>
}
-- Iteration 4 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(3) {
[5]=>
}
-- Iteration 5 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(6) {
[9]=>
}
-- Iteration 6 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(2) {
[u"foo"]=>
}
-- Iteration 7 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(4) {
[u"d"]=>
/*
* Testing ksort() by providing array of integer/string values to check the basic functionality with following flag values :
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
* 4.SORT_STRING - compare items as strings
// an array containing unsorted numeric values with indices
$unsorted_numerics = array( 100 => 4, 33 => 3, 555 => 2, 22 => 1 );
-echo "\n-- Testing ksort() by supplying string array, 'flag' value is defualt --\n";
+echo "\n-- Testing ksort() by supplying string array, 'flag' value is default --\n";
$temp_array = $unsorted_strings;
var_dump( ksort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
-echo "\n-- Testing ksort() by supplying numeric array, 'flag' value is defualt --\n";
+echo "\n-- Testing ksort() by supplying numeric array, 'flag' value is default --\n";
$temp_array = $unsorted_numerics;
var_dump( ksort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing ksort() : basic functionality ***
--- Testing ksort() by supplying string array, 'flag' value is defualt --
-bool(true)
-array(3) {
- ["banana"]=>
- string(1) "b"
- ["lemon"]=>
- string(1) "l"
- ["orange"]=>
- string(1) "o"
-}
-
--- Testing ksort() by supplying numeric array, 'flag' value is defualt --
-bool(true)
-array(4) {
- [22]=>
- int(1)
- [33]=>
- int(3)
- [100]=>
- int(4)
- [555]=>
- int(2)
-}
-
--- Testing ksort() by supplying string array, 'flag' = SORT_REGULAR --
-bool(true)
-array(3) {
- ["banana"]=>
- string(1) "b"
- ["lemon"]=>
- string(1) "l"
- ["orange"]=>
- string(1) "o"
-}
-
--- Testing ksort() by supplying numeric array, 'flag' = SORT_REGULAR --
-bool(true)
-array(4) {
- [22]=>
- int(1)
- [33]=>
- int(3)
- [100]=>
- int(4)
- [555]=>
- int(2)
-}
-
--- Testing ksort() by supplying string array, 'flag' = SORT_STRING --
-bool(true)
-array(3) {
- ["banana"]=>
- string(1) "b"
- ["lemon"]=>
- string(1) "l"
- ["orange"]=>
- string(1) "o"
-}
-
--- Testing ksort() by supplying numeric array, 'flag' = SORT_NUMERIC --
-bool(true)
-array(4) {
- [22]=>
- int(1)
- [33]=>
- int(3)
- [100]=>
- int(4)
- [555]=>
- int(2)
-}
-Done
---UEXPECTF--
-*** Testing ksort() : basic functionality ***
-
--- Testing ksort() by supplying string array, 'flag' value is defualt --
+-- Testing ksort() by supplying string array, 'flag' value is default --
bool(true)
array(3) {
[u"banana"]=>
unicode(1) "o"
}
--- Testing ksort() by supplying numeric array, 'flag' value is defualt --
+-- Testing ksort() by supplying numeric array, 'flag' value is default --
bool(true)
array(4) {
[22]=>
int(2)
}
Done
---UEXPECTF--
-*** Testing ksort() : error conditions ***
-
--- Testing ksort() function with Zero arguments --
-
-Warning: ksort() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing ksort() function with more than expected no. of arguments --
-
-- Sort flag = SORT_REGULAR -
-
-Warning: ksort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-
-- Sort flag = SORT_STRING -
-
-Warning: ksort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-
-- Sort flag = SORT_NUMERIC -
-
-Warning: ksort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [1]=>
- int(1)
- [2]=>
- int(2)
-}
-Done
"apple" => new String("apple"), "Orange" => new String("Orange"),
"Lemon" => new String("Lemon"), "aPPle" => new String("aPPle")
);
-echo "\n-- Testing ksort() by supplying various object arrays, 'flag' value is defualt --\n";
+echo "\n-- Testing ksort() by supplying various object arrays, 'flag' value is default --\n";
-// testing ksort() function by supplying integer object array, flag value is defualt
+// testing ksort() function by supplying integer object array, flag value is default
$temp_array = $unsorted_int_obj;
var_dump(ksort($temp_array) );
var_dump($temp_array);
-// testing ksort() function by supplying string object array, flag value is defualt
+// testing ksort() function by supplying string object array, flag value is default
$temp_array = $unsorted_str_obj;
var_dump(ksort($temp_array) );
var_dump($temp_array);
--EXPECTF--
*** Testing ksort() : object functionality ***
--- Testing ksort() by supplying various object arrays, 'flag' value is defualt --
-bool(true)
-array(6) {
- [-5]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(-5)
- }
- [0]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(0)
- }
- [1]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- float(0.001)
- }
- [11]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(11)
- }
- [23]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(23)
- }
- [66]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(66)
- }
-}
-bool(true)
-array(8) {
- ["Lemon"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(5) "Lemon"
- }
- ["Orange"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(6) "Orange"
- }
- ["aPPle"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(5) "aPPle"
- }
- ["apple"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(5) "apple"
- }
- ["axx"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(3) "axx"
- }
- ["py"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(2) "py"
- }
- ["t"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(1) "t"
- }
- ["w"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(1) "w"
- }
-}
-
--- Testing ksort() by supplying various object arrays, 'flag' value is SORT_REGULAR --
-bool(true)
-array(6) {
- [-5]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(-5)
- }
- [0]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(0)
- }
- [1]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- float(0.001)
- }
- [11]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(11)
- }
- [23]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(23)
- }
- [66]=>
- object(Integer)#%d (1) {
- ["class_value"]=>
- int(66)
- }
-}
-bool(true)
-array(8) {
- ["Lemon"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(5) "Lemon"
- }
- ["Orange"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(6) "Orange"
- }
- ["aPPle"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(5) "aPPle"
- }
- ["apple"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(5) "apple"
- }
- ["axx"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(3) "axx"
- }
- ["py"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(2) "py"
- }
- ["t"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(1) "t"
- }
- ["w"]=>
- object(String)#%d (1) {
- ["class_value"]=>
- string(1) "w"
- }
-}
-Done
---UEXPECTF--
-*** Testing ksort() : object functionality ***
-
--- Testing ksort() by supplying various object arrays, 'flag' value is defualt --
+-- Testing ksort() by supplying various object arrays, 'flag' value is default --
bool(true)
array(6) {
[-5]=>
/*
* testing ksort() by providing different unexpected values for array argument with following flag values:
- * 1. flag value as defualt
+ * 1. flag value as default
* 2. SORT_REGULAR - compare items normally
* 3. SORT_NUMERIC - compare items numerically
* 4. SORT_STRING - compare items as strings
// loop though each element of the array and check the working of ksort()
// when $array arugment is supplied with different values from $unexpected_values
echo "\n-- Testing ksort() by supplying different unexpected values for 'array' argument --\n";
-echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
+echo "\n-- Flag values are default, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
$counter = 1;
for($index = 0; $index < count($unexpected_values); $index ++) {
-- Testing ksort() by supplying different unexpected values for 'array' argument --
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
--- Iteration 1 --
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: ksort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Done
---UEXPECTF--
-*** Testing ksort() : usage variations ***
-
--- Testing ksort() by supplying different unexpected values for 'array' argument --
-
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
+-- Flag values are default, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
-- Iteration 1 --
Warning: ksort() expects parameter 1 to be array, integer given in %s on line %d
/*
* testing ksort() by providing array of octal values for $array argument with following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
077 => 06, -066 => -01, -0345 => -02, 0 => 0
);
-echo "\n-- Testing ksort() by supplying octal value array, 'flag' value is defualt --\n";
+echo "\n-- Testing ksort() by supplying octal value array, 'flag' value is default --\n";
$temp_array = $unsorted_oct_array;
var_dump( ksort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing ksort() : usage variations ***
--- Testing ksort() by supplying octal value array, 'flag' value is defualt --
-bool(true)
-array(9) {
- [-229]=>
- int(-2)
- [-54]=>
- int(-1)
- [0]=>
- int(0)
- [54]=>
- int(4)
- [63]=>
- int(6)
- [209]=>
- int(2)
- [229]=>
- int(3)
- [506]=>
- int(5)
- [669]=>
- int(1)
-}
-
--- Testing ksort() by supplying octal value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(9) {
- [-229]=>
- int(-2)
- [-54]=>
- int(-1)
- [0]=>
- int(0)
- [54]=>
- int(4)
- [63]=>
- int(6)
- [209]=>
- int(2)
- [229]=>
- int(3)
- [506]=>
- int(5)
- [669]=>
- int(1)
-}
-
--- Testing ksort() by supplying octal value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(9) {
- [-229]=>
- int(-2)
- [-54]=>
- int(-1)
- [0]=>
- int(0)
- [54]=>
- int(4)
- [63]=>
- int(6)
- [209]=>
- int(2)
- [229]=>
- int(3)
- [506]=>
- int(5)
- [669]=>
- int(1)
-}
-Done
---UEXPECTF--
-*** Testing ksort() : usage variations ***
-
--- Testing ksort() by supplying octal value array, 'flag' value is defualt --
+-- Testing ksort() by supplying octal value array, 'flag' value is default --
bool(true)
array(9) {
[-229]=>
/*
* testing ksort() by providing array of heredoc strings for $array argument with
* following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_STRING - compare items as strings
*/
$multiline_heredoc => "heredoc string\twith!@# and 123\nTest this!!!"
);
-echo "\n-- Testing ksort() by supplying heredoc string array, 'flag' value is defualt --\n";
+echo "\n-- Testing ksort() by supplying heredoc string array, 'flag' value is default --\n";
$temp_array = $array;
var_dump(ksort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing ksort() : usage variations ***
--- Testing ksort() by supplying heredoc string array, 'flag' value is defualt --
-bool(true)
-array(3) {
- ["HEREDOC"]=>
- string(7) "HEREDOC"
- ["Heredoc"]=>
- string(7) "Heredoc"
- ["heredoc string with!@# and 123
-Test this!!!"]=>
- string(43) "heredoc string with!@# and 123
-Test this!!!"
-}
-
--- Testing ksort() by supplying heredoc string array, 'flag' = SORT_REGULAR --
-bool(true)
-array(3) {
- ["HEREDOC"]=>
- string(7) "HEREDOC"
- ["Heredoc"]=>
- string(7) "Heredoc"
- ["heredoc string with!@# and 123
-Test this!!!"]=>
- string(43) "heredoc string with!@# and 123
-Test this!!!"
-}
-
--- Testing ksort() by supplying heredoc string array, 'flag' = SORT_STRING --
-bool(true)
-array(3) {
- ["HEREDOC"]=>
- string(7) "HEREDOC"
- ["Heredoc"]=>
- string(7) "Heredoc"
- ["heredoc string with!@# and 123
-Test this!!!"]=>
- string(43) "heredoc string with!@# and 123
-Test this!!!"
-}
-Done
---UEXPECTF--
-*** Testing ksort() : usage variations ***
-
--- Testing ksort() by supplying heredoc string array, 'flag' value is defualt --
+-- Testing ksort() by supplying heredoc string array, 'flag' value is default --
bool(true)
array(3) {
[u"HEREDOC"]=>
unicode(43) "heredoc string with!@# and 123
Test this!!!"
}
-Done
\ No newline at end of file
+Done
}
-- Iteration 13 --
-Warning: ksort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 14 --
-
-Warning: ksort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 15 --
-
-Warning: ksort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 16 --
-
-Warning: ksort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 17 --
-
-Warning: ksort() expects parameter 2 to be long, object given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 18 --
-
-Warning: ksort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 19 --
-
-Warning: ksort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
--- Iteration 20 --
-
-Warning: ksort() expects parameter 2 to be long, resource given in %s on line %d
-bool(false)
-array(3) {
- [10]=>
- int(10)
- [2]=>
- int(2)
- [45]=>
- int(45)
-}
-Done
---UEXPECTF--
-*** Testing ksort() : usage variations ***
-
--- Testing ksort() by supplying different unexpected values for 'sort_flags' argument --
--- Iteration 1 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 2 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 3 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 4 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 5 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 6 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 7 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 8 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 9 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 10 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 11 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 12 --
-bool(true)
-array(3) {
- [2]=>
- int(2)
- [10]=>
- int(10)
- [45]=>
- int(45)
-}
--- Iteration 13 --
-
Warning: ksort() expects parameter 2 to be long, Unicode string given in %s on line %d
bool(false)
array(3) {
/*
* Testing ksort() by providing array of integer/float/mixed values for $array argument
* with following flag values:
- * 1. flag value as defualt
+ * 1. flag value as default
* 2. SORT_REGULAR - compare items normally
* 3. SORT_NUMERIC - compare items numerically
*/
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
- echo "- With defualt sort flag -\n";
+ echo "- With default sort flag -\n";
$temp_array = $array;
var_dump(ksort($temp_array) );
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing ksort() : usage variations ***
-- Testing ksort() by supplying various integer/float arrays --
-- Iteration 1 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(9) {
[-10]=>
}
-- Iteration 2 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(6) {
[-7]=>
}
-- Iteration 3 --
-- With defualt sort flag -
-bool(true)
-array(11) {
- [-10]=>
- float(-0.106)
- [-8]=>
- float(-0.9)
- [-3]=>
- float(-0.01)
- [1]=>
- float(0.0001)
- [2]=>
- float(0.0021)
- [4]=>
- int(-1)
- [5]=>
- int(0)
- [6]=>
- float(0.09)
- [7]=>
- int(2)
- [9]=>
- float(0.106)
- [11]=>
- int(33)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(11) {
- [-10]=>
- float(-0.106)
- [-8]=>
- float(-0.9)
- [-3]=>
- float(-0.01)
- [1]=>
- float(0.0001)
- [2]=>
- float(0.0021)
- [4]=>
- int(-1)
- [5]=>
- int(0)
- [6]=>
- float(0.09)
- [7]=>
- int(2)
- [9]=>
- float(0.106)
- [11]=>
- int(33)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(11) {
- [-10]=>
- float(-0.106)
- [-8]=>
- float(-0.9)
- [-3]=>
- float(-0.01)
- [1]=>
- float(0.0001)
- [2]=>
- float(0.0021)
- [4]=>
- int(-1)
- [5]=>
- int(0)
- [6]=>
- float(0.09)
- [7]=>
- int(2)
- [9]=>
- float(0.106)
- [11]=>
- int(33)
-}
-Done
---UEXPECTF--
-*** Testing ksort() : usage variations ***
-
--- Testing ksort() by supplying various integer/float arrays --
-
--- Iteration 1 --
-- With defualt sort flag -
-bool(true)
-array(9) {
- [-10]=>
- int(-41)
- [-6]=>
- int(-31)
- [-4]=>
- int(-21)
- [-2]=>
- int(-11)
- [1]=>
- int(11)
- [3]=>
- int(21)
- [5]=>
- int(31)
- [7]=>
- int(0)
- [8]=>
- int(41)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(9) {
- [-10]=>
- int(-41)
- [-6]=>
- int(-31)
- [-4]=>
- int(-21)
- [-2]=>
- int(-11)
- [1]=>
- int(11)
- [3]=>
- int(21)
- [5]=>
- int(31)
- [7]=>
- int(0)
- [8]=>
- int(41)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(9) {
- [-10]=>
- int(-41)
- [-6]=>
- int(-31)
- [-4]=>
- int(-21)
- [-2]=>
- int(-11)
- [1]=>
- int(11)
- [3]=>
- int(21)
- [5]=>
- int(31)
- [7]=>
- int(0)
- [8]=>
- int(41)
-}
-
--- Iteration 2 --
-- With defualt sort flag -
-bool(true)
-array(6) {
- [-7]=>
- float(-0.1)
- [0]=>
- float(0.5)
- [1]=>
- float(10.5)
- [3]=>
- float(1050)
- [4]=>
- float(0.106)
- [6]=>
- float(0.0001)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(6) {
- [-7]=>
- float(-0.1)
- [0]=>
- float(0.5)
- [1]=>
- float(10.5)
- [3]=>
- float(1050)
- [4]=>
- float(0.106)
- [6]=>
- float(0.0001)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(6) {
- [-7]=>
- float(-0.1)
- [0]=>
- float(0.5)
- [1]=>
- float(10.5)
- [3]=>
- float(1050)
- [4]=>
- float(0.106)
- [6]=>
- float(0.0001)
-}
-
--- Iteration 3 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(11) {
[-10]=>
/*
* testing ksort() by providing array of boolean values for $array argument with following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
*/
// bool value array
$bool_values = array (true => true, false => false, TRUE => TRUE, FALSE => FALSE);
-echo "\n-- Testing ksort() by supplying boolean value array, 'flag' value is defualt --\n";
+echo "\n-- Testing ksort() by supplying boolean value array, 'flag' value is default --\n";
$temp_array = $bool_values;
var_dump(ksort($temp_array) );
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing ksort() : usage variations ***
--- Testing ksort() by supplying boolean value array, 'flag' value is defualt --
-bool(true)
-array(2) {
- [0]=>
- bool(false)
- [1]=>
- bool(true)
-}
-
--- Testing ksort() by supplying boolean value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(2) {
- [0]=>
- bool(false)
- [1]=>
- bool(true)
-}
-
--- Testing ksort() by supplying boolean value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(2) {
- [0]=>
- bool(false)
- [1]=>
- bool(true)
-}
-
--- Testing ksort() by supplying boolean value array, 'flag' value is SORT_STRING --
-bool(true)
-array(2) {
- [0]=>
- bool(false)
- [1]=>
- bool(true)
-}
-Done
---UEXPECTF--
-*** Testing ksort() : usage variations ***
-
--- Testing ksort() by supplying boolean value array, 'flag' value is defualt --
+-- Testing ksort() by supplying boolean value array, 'flag' value is default --
bool(true)
array(2) {
[0]=>
/*
* testing ksort() by providing array of string values for $array argument with
* following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_STRING - compare items as strings
*/
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
- echo "- With defualt sort flag -\n";
+ echo "- With default sort flag -\n";
$temp_array = $array;
var_dump(ksort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing ksort() : usage variations ***
-- Testing ksort() by supplying various string arrays --
-- Iteration 1 --
-- With defualt sort flag -
-bool(true)
-array(11) {
- [""]=>
- NULL
- [" "]=>
- string(1) " "
- ["
-"]=>
- string(1) "
-"
- ["\v"]=>
- string(1) "\v"
- ["\f"]=>
- string(1) "\f"
- ["
-"]=>
- string(1) "
-"
- ["\a"]=>
- string(2) "\a"
- ["\cx"]=>
- string(3) "\cx"
- ["\ddd"]=>
- string(4) "\ddd"
- ["\e"]=>
- string(2) "\e"
- ["\xhh"]=>
- string(4) "\xhh"
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(11) {
- [""]=>
- NULL
- [" "]=>
- string(1) " "
- ["
-"]=>
- string(1) "
-"
- ["\v"]=>
- string(1) "\v"
- ["\f"]=>
- string(1) "\f"
- ["
-"]=>
- string(1) "
-"
- ["\a"]=>
- string(2) "\a"
- ["\cx"]=>
- string(3) "\cx"
- ["\ddd"]=>
- string(4) "\ddd"
- ["\e"]=>
- string(2) "\e"
- ["\xhh"]=>
- string(4) "\xhh"
-}
-- Sort flag = SORT_STRING -
-bool(true)
-array(11) {
- [""]=>
- NULL
- [" "]=>
- string(1) " "
- ["
-"]=>
- string(1) "
-"
- ["\v"]=>
- string(1) "\v"
- ["\f"]=>
- string(1) "\f"
- ["
-"]=>
- string(1) "
-"
- ["\a"]=>
- string(2) "\a"
- ["\cx"]=>
- string(3) "\cx"
- ["\ddd"]=>
- string(4) "\ddd"
- ["\e"]=>
- string(2) "\e"
- ["\xhh"]=>
- string(4) "\xhh"
-}
-
--- Iteration 2 --
-- With defualt sort flag -
-bool(true)
-array(11) {
- ["Apple"]=>
- string(5) "apple"
- ["B"]=>
- string(6) "BANANA"
- ["Lemon"]=>
- string(5) "lemoN"
- ["O"]=>
- string(6) "oraNGe"
- ["T"]=>
- string(3) "ttt"
- ["W"]=>
- string(2) "ww"
- ["X"]=>
- string(1) "x"
- ["o"]=>
- string(6) "Orange"
- ["t"]=>
- string(4) "TTTT"
- ["te"]=>
- string(4) "Test"
- ["x"]=>
- string(1) "X"
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(11) {
- ["Apple"]=>
- string(5) "apple"
- ["B"]=>
- string(6) "BANANA"
- ["Lemon"]=>
- string(5) "lemoN"
- ["O"]=>
- string(6) "oraNGe"
- ["T"]=>
- string(3) "ttt"
- ["W"]=>
- string(2) "ww"
- ["X"]=>
- string(1) "x"
- ["o"]=>
- string(6) "Orange"
- ["t"]=>
- string(4) "TTTT"
- ["te"]=>
- string(4) "Test"
- ["x"]=>
- string(1) "X"
-}
-- Sort flag = SORT_STRING -
-bool(true)
-array(11) {
- ["Apple"]=>
- string(5) "apple"
- ["B"]=>
- string(6) "BANANA"
- ["Lemon"]=>
- string(5) "lemoN"
- ["O"]=>
- string(6) "oraNGe"
- ["T"]=>
- string(3) "ttt"
- ["W"]=>
- string(2) "ww"
- ["X"]=>
- string(1) "x"
- ["o"]=>
- string(6) "Orange"
- ["t"]=>
- string(4) "TTTT"
- ["te"]=>
- string(4) "Test"
- ["x"]=>
- string(1) "X"
-}
-Done
---UEXPECTF--
-*** Testing ksort() : usage variations ***
-
--- Testing ksort() by supplying various string arrays --
-
--- Iteration 1 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(11) {
[u""]=>
}
-- Iteration 2 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(11) {
[u"Apple"]=>
[u"x"]=>
unicode(1) "X"
}
-Done
\ No newline at end of file
+Done
/*
* testing ksort() by providing array of hexa-decimal values for $array argument with following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
0x1ab => 0x1ab, 0xff => 0xff, -0xff => -0xFF, 0 => 0, -0x2aa => -0x2aa
);
-echo "\n-- Testing ksort() by supplying hexadecimal value array, 'flag' value is defualt --\n";
+echo "\n-- Testing ksort() by supplying hexadecimal value array, 'flag' value is default --\n";
$temp_array = $unsorted_hex_array;
var_dump(ksort( $temp_array) ); // expecting : bool(true)
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing ksort() : usage variations ***
--- Testing ksort() by supplying hexadecimal value array, 'flag' value is defualt --
-bool(true)
-array(9) {
- [-682]=>
- int(-682)
- [-255]=>
- int(-255)
- [0]=>
- int(0)
- [15]=>
- int(15)
- [187]=>
- int(187)
- [255]=>
- int(255)
- [427]=>
- int(427)
- [682]=>
- int(682)
- [4095]=>
- int(4095)
-}
-
--- Testing ksort() by supplying hexadecimal value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(9) {
- [-682]=>
- int(-682)
- [-255]=>
- int(-255)
- [0]=>
- int(0)
- [15]=>
- int(15)
- [187]=>
- int(187)
- [255]=>
- int(255)
- [427]=>
- int(427)
- [682]=>
- int(682)
- [4095]=>
- int(4095)
-}
-
--- Testing ksort() by supplying hexadecimal value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(9) {
- [-682]=>
- int(-682)
- [-255]=>
- int(-255)
- [0]=>
- int(0)
- [15]=>
- int(15)
- [187]=>
- int(187)
- [255]=>
- int(255)
- [427]=>
- int(427)
- [682]=>
- int(682)
- [4095]=>
- int(4095)
-}
-Done
---UEXPECTF--
-*** Testing ksort() : usage variations ***
-
--- Testing ksort() by supplying hexadecimal value array, 'flag' value is defualt --
+-- Testing ksort() by supplying hexadecimal value array, 'flag' value is default --
bool(true)
array(9) {
[-682]=>
/*
* testing ksort() by providing arrays containing sub arrays for $array argument
* with flowing flag values:
- * 1. flag value as defualt
+ * 1. flag value as default
* 2. SORT_REGULAR - compare items normally
*/
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
- echo "- With defualt sort flag -\n";
+ echo "- With default sort flag -\n";
$temp_array = $array;
var_dump( ksort($temp_array) );
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing ksort() : usage variations ***
-- Testing ksort() by supplying various arrays containing sub arrays --
-- Iteration 1 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(0) {
}
}
-- Iteration 2 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(1) {
[1]=>
}
-- Iteration 3 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(3) {
[1]=>
}
-- Iteration 4 --
-- With defualt sort flag -
-bool(true)
-array(4) {
- [0]=>
- array(0) {
- }
- [1]=>
- array(1) {
- [0]=>
- int(11)
- }
- [2]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- [3]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(4) {
- [0]=>
- array(0) {
- }
- [1]=>
- array(1) {
- [0]=>
- int(11)
- }
- [2]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- [3]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
-}
-Done
---UEXPECTF--
-*** Testing ksort() : usage variations ***
-
--- Testing ksort() by supplying various arrays containing sub arrays --
-
--- Iteration 1 --
-- With defualt sort flag -
-bool(true)
-array(0) {
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(0) {
-}
-
--- Iteration 2 --
-- With defualt sort flag -
-bool(true)
-array(1) {
- [1]=>
- array(0) {
- }
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(1) {
- [1]=>
- array(0) {
- }
-}
-
--- Iteration 3 --
-- With defualt sort flag -
-bool(true)
-array(3) {
- [1]=>
- int(11)
- [3]=>
- array(2) {
- [0]=>
- int(64)
- [1]=>
- int(61)
- }
- [4]=>
- int(44)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(3) {
- [1]=>
- int(11)
- [3]=>
- array(2) {
- [0]=>
- int(64)
- [1]=>
- int(61)
- }
- [4]=>
- int(44)
-}
-
--- Iteration 4 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(4) {
[0]=>
/*
* Testing ksort() by providing arrays with/without key values for $array argument with following flag values:
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
*/
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
- echo "- With defualt sort flag -\n";
+ echo "- With default sort flag -\n";
$temp_array = $array;
var_dump( ksort($temp_array) );
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing ksort() : usage variations ***
-- Testing ksort() by supplying various arrays with/without key values --
-- Iteration 1 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(5) {
[5]=>
}
-- Iteration 2 --
-- With defualt sort flag -
-bool(true)
-array(3) {
- ["c"]=>
- string(5) "apple"
- [0]=>
- string(6) "banana"
- ["a"]=>
- string(6) "orange"
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(3) {
- ["c"]=>
- string(5) "apple"
- [0]=>
- string(6) "banana"
- ["a"]=>
- string(6) "orange"
-}
-
--- Iteration 3 --
-- With defualt sort flag -
-bool(true)
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
-}
-
--- Iteration 4 --
-- With defualt sort flag -
-bool(true)
-array(3) {
- [0]=>
- string(5) "first"
- [1]=>
- string(5) "third"
- [5]=>
- string(6) "second"
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(3) {
- [0]=>
- string(5) "first"
- [1]=>
- string(5) "third"
- [5]=>
- string(6) "second"
-}
-
--- Iteration 5 --
-- With defualt sort flag -
-bool(true)
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(1)
- [3]=>
- int(13)
- [4]=>
- int(1)
- [8]=>
- int(1)
- [9]=>
- int(19)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(1)
- [3]=>
- int(13)
- [4]=>
- int(1)
- [8]=>
- int(1)
- [9]=>
- int(19)
-}
-
--- Iteration 6 --
-- With defualt sort flag -
-bool(true)
-array(2) {
- ["bar"]=>
- string(3) "baz"
- ["foo"]=>
- int(1)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(2) {
- ["bar"]=>
- string(3) "baz"
- ["foo"]=>
- int(1)
-}
-
--- Iteration 7 --
-- With defualt sort flag -
-bool(true)
-array(4) {
- ["a"]=>
- int(1)
- ["b"]=>
- array(2) {
- ["e"]=>
- int(2)
- ["f"]=>
- int(3)
- }
- ["c"]=>
- array(1) {
- ["g"]=>
- int(4)
- }
- ["d"]=>
- int(5)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(4) {
- ["a"]=>
- int(1)
- ["b"]=>
- array(2) {
- ["e"]=>
- int(2)
- ["f"]=>
- int(3)
- }
- ["c"]=>
- array(1) {
- ["g"]=>
- int(4)
- }
- ["d"]=>
- int(5)
-}
-Done
---UEXPECTF--
-*** Testing ksort() : usage variations ***
-
--- Testing ksort() by supplying various arrays with/without key values --
-
--- Iteration 1 --
-- With defualt sort flag -
-bool(true)
-array(5) {
- [5]=>
- int(55)
- [6]=>
- int(66)
- [7]=>
- int(22)
- [8]=>
- int(33)
- [9]=>
- int(11)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(5) {
- [5]=>
- int(55)
- [6]=>
- int(66)
- [7]=>
- int(22)
- [8]=>
- int(33)
- [9]=>
- int(11)
-}
-
--- Iteration 2 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(3) {
[u"c"]=>
}
-- Iteration 3 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(6) {
[0]=>
}
-- Iteration 4 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(3) {
[0]=>
}
-- Iteration 5 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(6) {
[0]=>
}
-- Iteration 6 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(2) {
[u"bar"]=>
}
-- Iteration 7 --
-- With defualt sort flag -
+- With default sort flag -
bool(true)
array(4) {
[u"a"]=>
asort($table, SORT_LOCALE_STRING);
var_dump($table);
?>
---EXPECT--
-array(13) {
- ["AB"]=>
- string(7) "Alberta"
- ["BC"]=>
- string(20) "Colombie-Britannique"
- ["PE"]=>
- string(21) "Île-du-Prince-Édouard"
- ["MB"]=>
- string(8) "Manitoba"
- ["NB"]=>
- string(17) "Nouveau-Brunswick"
- ["NS"]=>
- string(15) "Nouvelle-Écosse"
- ["NU"]=>
- string(7) "Nunavut"
- ["ON"]=>
- string(7) "Ontario"
- ["QC"]=>
- string(6) "Québec"
- ["SK"]=>
- string(12) "Saskatchewan"
- ["NL"]=>
- string(23) "Terre-Neuve-et-Labrador"
- ["YT"]=>
- string(19) "Territoire du Yukon"
- ["NT"]=>
- string(25) "Territoires du Nord-Ouest"
-}
---UEXPECTF--
+--EXPECTF--
Deprecated: setlocale(): deprecated in Unicode mode, please use ICU locale functions in %s on line %d
array(13) {
[u"AB"]=>
echo "Done\n";
?>
---EXPECTF--
-Warning: max(): At least one value should be passed in %s on line %d
-NULL
-
-Warning: Wrong parameter count for max() in %s on line %d
-NULL
-
-Warning: max(): Array must contain at least one element in %s on line %d
-bool(false)
-
-Warning: Wrong parameter count for max() in %s on line %d
-NULL
-int(2)
-float(2.11)
-string(1) "t"
-bool(true)
-bool(true)
-int(1)
-bool(true)
-Done
---UEXPECTF--
+--EXPECTF--
Warning: max(): At least one value should be passed in %s on line %d
NULL
?>
--EXPECT--
-*** Testing sequences of numbers ***
-int(2)
-int(2)
-float(2.11)
-string(1) "t"
-bool(true)
-bool(true)
-int(1)
-bool(true)
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-
-Done
---UEXPECT--
-
*** Testing sequences of numbers ***
int(2)
int(2)
int(3)
}
-Done
\ No newline at end of file
+Done
Warning: Wrong parameter count for max() in %s on line %d
NULL
---UEXPECTF--
-
-*** Testing Error Conditions ***
-
-Warning: max(): At least one %s on line %d
-NULL
-
-Warning: Wrong parameter count for max() in %s on line %d
-NULL
-
-Warning: max(): Array must contain at least one element in %s on line %d
-bool(false)
-
-Warning: Wrong parameter count for max() in %s on line %d
-NULL
int(21)
Done
---UEXPECTF--
-
-*** Testing boundary conditions ***
-int(2147483646)
-%s(2147483648)
-%s(2147483648)
-int(-2147483646)
-int(-2147483647)
-int(-2147483647)
-
-*** Testing large number of arguments ***
-int(21)
-
-Done
?>
--EXPECTF--
-*** Testing arrays ***
-int(2)
-int(2)
-float(2.11)
-string(1) "t"
-bool(true)
-bool(true)
-int(1)
-bool(true)
-array(2) {
- [0]=>
- int(2)
- [1]=>
- int(3)
-}
-int(2147483646)
-%s(2147483648)
-%s(2147483648)
-int(-2147483646)
-int(-2147483647)
-int(-2147483647)
-
-Done
---UEXPECTF--
-
*** Testing arrays ***
int(2)
int(2)
echo "Done\n";
?>
---EXPECTF--
-Warning: min(): At least one value should be passed in %s on line %d
-NULL
-
-Warning: Wrong parameter count for min() in %s on line %d
-NULL
-
-Warning: min(): Array must contain at least one element in %s on line %d
-bool(false)
-
-Warning: Wrong parameter count for min() in %s on line %d
-NULL
-int(1)
-float(2.09)
-string(0) ""
-bool(false)
-bool(false)
-bool(false)
-int(0)
-Done
---UEXPECTF--
+--EXPECTF--
Warning: min(): At least one value should be passed in %s on line %d
NULL
?>
--EXPECT--
-*** Testing sequences of numbers ***
-int(1)
-int(-2)
-float(2.09)
-string(0) ""
-bool(false)
-bool(false)
-bool(false)
-int(0)
-int(0)
-
-Done
---UEXPECT--
-
*** Testing sequences of numbers ***
int(1)
int(-2)
int(0)
int(0)
-Done
\ No newline at end of file
+Done
Warning: Wrong parameter count for min() in %s on line %d
NULL
---UEXPECTF--
-
-*** Testing Error Conditions ***
-
-Warning: min(): At least one %s on line %d
-NULL
-
-Warning: Wrong parameter count for min() in %s on line %d
-NULL
-
-Warning: min(): Array must contain at least one element in %s on line %d
-bool(false)
-
-Warning: Wrong parameter count for min() in %s on line %d
-NULL
-
int(0)
Done
---UEXPECTF--
-
-*** Testing boundary conditions ***
-int(2147483645)
-int(2147483647)
-int(2147483646)
-int(-2147483647)
-%s(-2147483648)
-%s(-2147483649)
-
-*** Testing large number of arguments ***
-int(0)
-
-Done
?>
--EXPECTF--
-*** Testing arrays ***
-int(1)
-int(-2)
-float(2.09)
-string(0) ""
-bool(false)
-bool(false)
-bool(false)
-int(0)
-int(0)
-int(2147483645)
-int(2147483647)
-int(2147483646)
-int(-2147483647)
-%s(-2147483648)
-%s(-2147483649)
-
-Done
---UEXPECTF--
-
*** Testing arrays ***
int(1)
int(-2)
echo "Done";
?>
---EXPECTF--
-*** Testing natcasesort() : basic functionality ***
-
--- Before sorting: --
-array(5) {
- [0]=>
- string(3) "A01"
- [1]=>
- string(2) "a1"
- [2]=>
- string(3) "b10"
- [3]=>
- string(3) "a01"
- [4]=>
- string(3) "b01"
-}
-
--- After Sorting: --
-bool(true)
-array(5) {
- [3]=>
- string(3) "a01"
- [0]=>
- string(3) "A01"
- [1]=>
- string(2) "a1"
- [4]=>
- string(3) "b01"
- [2]=>
- string(3) "b10"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing natcasesort() : basic functionality ***
-- Before sorting: --
[2]=>
unicode(3) "b10"
}
-Done
\ No newline at end of file
+Done
Warning: natcasesort() expects exactly 1 parameter, 2 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing natcasesort() : error conditions ***
-
--- Testing natcasesort() function with Zero arguments --
-
-Warning: natcasesort() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing natcasesort() function with more than expected no. of arguments --
-
-Warning: natcasesort() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-Done
\ No newline at end of file
--EXPECTF--
*** Testing natcasesort() : object functionality ***
--- Testing natcasesort() by supplying various object arrays --
-bool(true)
-array(8) {
- [4]=>
- object(for_string_natcasesort)#%d (1) {
- ["class_value"]=>
- string(5) "apple"
- }
- [7]=>
- object(for_string_natcasesort)#%d (1) {
- ["class_value"]=>
- string(5) "aPPle"
- }
- [0]=>
- object(for_string_natcasesort)#%d (1) {
- ["class_value"]=>
- string(3) "axx"
- }
- [6]=>
- object(for_string_natcasesort)#%d (1) {
- ["class_value"]=>
- string(5) "Lemon"
- }
- [5]=>
- object(for_string_natcasesort)#%d (1) {
- ["class_value"]=>
- string(6) "Orange"
- }
- [3]=>
- object(for_string_natcasesort)#%d (1) {
- ["class_value"]=>
- string(2) "py"
- }
- [1]=>
- object(for_string_natcasesort)#%d (1) {
- ["class_value"]=>
- string(1) "t"
- }
- [2]=>
- object(for_string_natcasesort)#%d (1) {
- ["class_value"]=>
- string(1) "w"
- }
-}
-Done
---UEXPECTF--
-*** Testing natcasesort() : object functionality ***
-
-- Testing natcasesort() by supplying various object arrays --
bool(true)
array(8) {
unicode(1) "w"
}
}
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing natcasesort() : object functionality ***
--- Testing natcasesort() by supplying object arrays --
-bool(true)
-array(4) {
- [0]=>
- object(for_string_natcasesort)#%d (3) {
- ["public_class_value"]=>
- string(3) "axx"
- ["private_class_value":"for_string_natcasesort":private]=>
- string(3) "AXX"
- ["protected_class_value":protected]=>
- string(3) "ass"
- }
- [3]=>
- object(for_string_natcasesort)#%d (3) {
- ["public_class_value"]=>
- string(2) "py"
- ["private_class_value":"for_string_natcasesort":private]=>
- string(2) "PY"
- ["protected_class_value":protected]=>
- string(2) "pt"
- }
- [1]=>
- object(for_string_natcasesort)#%d (3) {
- ["public_class_value"]=>
- string(1) "t"
- ["private_class_value":"for_string_natcasesort":private]=>
- string(3) "eee"
- ["protected_class_value":protected]=>
- string(3) "abb"
- }
- [2]=>
- object(for_string_natcasesort)#%d (3) {
- ["public_class_value"]=>
- string(1) "w"
- ["private_class_value":"for_string_natcasesort":private]=>
- string(1) "W"
- ["protected_class_value":protected]=>
- string(1) "c"
- }
-}
-Done
---UEXPECTF--
-*** Testing natcasesort() : object functionality ***
-
-- Testing natcasesort() by supplying object arrays --
bool(true)
array(4) {
unicode(1) "c"
}
}
-Done
\ No newline at end of file
+Done
Warning: natcasesort(): The argument should be an array in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing natcasesort() : usage variation ***
-
--- Iteration 1 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 16 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(true)
-
--- Iteration 19 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 22 --
-bool(true)
-
--- Iteration 23 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: natcasesort(): The argument should be an array in %s on line %d
-NULL
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
-*** Testing natcasesort() : usage variations ***
-
--- Initial Position of Internal Pointer: --
-0 => img13
-
--- Call natcasesort() --
-bool(true)
-array(4) {
- [3]=>
- string(4) "img1"
- [2]=>
- string(4) "img2"
- [0]=>
- string(5) "img13"
- [1]=>
- string(5) "img20"
-}
-
--- Position of Internal Pointer in Passed Array: --
-3 => img1
-Done
-
---UEXPECTF--
+--EXPECT--
*** Testing natcasesort() : usage variations ***
-- Initial Position of Internal Pointer: --
echo "Done";
?>
---EXPECTF--
-*** Testing natcasesort() : usage variations ***
-
--- Iteration 1 --
-bool(true)
-array(4) {
- [-2345]=>
- string(8) "negative"
- [1]=>
- string(3) "one"
- [12345]=>
- string(8) "positive"
- [0]=>
- string(4) "zero"
-}
-
--- Iteration 2 --
-bool(true)
-array(3) {
- [0]=>
- string(4) "half"
- [-10]=>
- string(8) "negative"
- [10]=>
- string(8) "positive"
-}
-
--- Iteration 3 --
-bool(true)
-array(2) {
- [12345678]=>
- string(5) "large"
- [0]=>
- string(5) "small"
-}
-
--- Iteration 4 --
-bool(true)
-array(1) {
- [""]=>
- string(6) "null 1"
-}
-
--- Iteration 5 --
-bool(true)
-array(1) {
- [""]=>
- string(6) "null 2"
-}
-
--- Iteration 6 --
-bool(true)
-array(2) {
- [0]=>
- string(6) "lowerf"
- [1]=>
- string(6) "lowert"
-}
-
--- Iteration 7 --
-bool(true)
-array(2) {
- [0]=>
- string(6) "upperf"
- [1]=>
- string(6) "uppert"
-}
-
--- Iteration 8 --
-bool(true)
-array(1) {
- [""]=>
- string(6) "emptyd"
-}
-
--- Iteration 9 --
-bool(true)
-array(1) {
- [""]=>
- string(6) "emptys"
-}
-
--- Iteration 10 --
-bool(true)
-array(3) {
- ["stringd"]=>
- string(7) "stringd"
- ["hello world"]=>
- string(7) "stringh"
- ["strings"]=>
- string(7) "strings"
-}
-
--- Iteration 11 --
-bool(true)
-array(1) {
- [""]=>
- string(9) "undefined"
-}
-
--- Iteration 12 --
-bool(true)
-array(1) {
- [""]=>
- string(5) "unset"
-}
-
--- Iteration 13 --
-bool(true)
-array(3) {
- ["foo"]=>
- string(3) "bar"
- ["baz"]=>
- string(3) "bar"
- ["hello"]=>
- string(5) "world"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing natcasesort() : usage variations ***
-- Iteration 1 --
[u"hello"]=>
unicode(5) "world"
}
-Done
\ No newline at end of file
+Done
bool(true)
}
--- Iteration 5 --
-bool(true)
-array(2) {
- [1]=>
- string(0) ""
- [0]=>
- string(0) ""
-}
-
--- Iteration 6 --
-bool(true)
-array(0) {
-}
-
--- Iteration 7 --
-bool(true)
-array(3) {
- [2]=>
- string(11) "hello world"
- [1]=>
- string(6) "string"
- [0]=>
- string(6) "string"
-}
-
--- Iteration 8 --
-bool(true)
-array(1) {
- [0]=>
- object(classA)#%d (0) {
- }
-}
-
--- Iteration 9 --
-bool(true)
-array(1) {
- [0]=>
- NULL
-}
-
--- Iteration 10 --
-bool(true)
-array(1) {
- [0]=>
- NULL
-}
-
--- Iteration 11 --
-bool(true)
-array(1) {
- [0]=>
- resource(%d) of type (stream)
-}
-Done
---UEXPECTF--
-*** Testing natcasesort() : usage variation ***
-
--- Iteration 1 --
-bool(true)
-array(4) {
- [3]=>
- int(-2345)
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(12345)
-}
-
--- Iteration 2 --
-bool(true)
-array(5) {
- [1]=>
- float(-10.5)
- [4]=>
- float(0.5)
- [3]=>
- float(1.23456789E-9)
- [0]=>
- float(10.5)
- [2]=>
- float(123456789000)
-}
-
--- Iteration 3 --
-bool(true)
-array(2) {
- [1]=>
- NULL
- [0]=>
- NULL
-}
-
--- Iteration 4 --
-bool(true)
-array(4) {
- [3]=>
- bool(false)
- [1]=>
- bool(false)
- [0]=>
- bool(true)
- [2]=>
- bool(true)
-}
-
-- Iteration 5 --
bool(true)
array(2) {
[0]=>
resource(%d) of type (stream)
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
-*** Testing natcasesort() : usage variation ***
-
--- Iteration 1 --
-bool(true)
-array(9) {
- [1]=>
- int(-11)
- [3]=>
- int(-21)
- [5]=>
- int(-31)
- [8]=>
- int(-41)
- [6]=>
- int(0)
- [0]=>
- int(11)
- [2]=>
- int(21)
- [4]=>
- int(31)
- [7]=>
- int(41)
-}
-
--- Iteration 1 --
-bool(true)
-array(7) {
- [6]=>
- float(-0.1)
- [1]=>
- float(-10.5)
- [5]=>
- float(0.01)
- [4]=>
- float(0.5)
- [3]=>
- float(0.106)
- [0]=>
- float(10.5)
- [2]=>
- float(1050)
-}
-
--- Iteration 1 --
-bool(true)
-array(11) {
- [2]=>
- float(-0.01)
- [7]=>
- float(-0.9)
- [9]=>
- float(-0.106)
- [3]=>
- int(-1)
- [4]=>
- int(0)
- [0]=>
- float(0.0001)
- [1]=>
- float(0.0021)
- [5]=>
- float(0.09)
- [8]=>
- float(0.106)
- [6]=>
- int(2)
- [10]=>
- int(33)
-}
-
--- Iteration 1 --
-bool(true)
-array(7) {
- [2]=>
- int(-2147483647)
- [3]=>
- float(-2147483648)
- [6]=>
- float(-2147483649)
- [5]=>
- int(0)
- [4]=>
- int(0)
- [0]=>
- int(2147483647)
- [1]=>
- float(2147483648)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing natcasesort() : usage variation ***
-- Iteration 1 --
echo "Done";
?>
---EXPECTF--
-*** Testing natcasesort() : usage variation ***
-bool(true)
-array(11) {
- [6]=>
- string(1) "
-"
- [7]=>
- string(1) " "
- [10]=>
- string(1) "\v"
- [0]=>
- NULL
- [5]=>
- string(1) "\f"
- [1]=>
- NULL
- [2]=>
- string(2) "\a"
- [3]=>
- string(3) "\cx"
- [9]=>
- string(4) "\ddd"
- [4]=>
- string(2) "\e"
- [8]=>
- string(4) "\xhh"
-}
-bool(true)
-array(12) {
- [3]=>
- string(5) "apple"
- [11]=>
- string(6) "BANANA"
- [2]=>
- string(6) "banana"
- [0]=>
- string(5) "lemoN"
- [10]=>
- string(6) "oraNGe"
- [1]=>
- string(6) "Orange"
- [4]=>
- string(4) "Test"
- [6]=>
- string(3) "ttt"
- [5]=>
- string(4) "TTTT"
- [7]=>
- string(2) "ww"
- [8]=>
- string(1) "x"
- [9]=>
- string(1) "X"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing natcasesort() : usage variation ***
bool(true)
array(11) {
[9]=>
unicode(1) "X"
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing natcasesort() : usage variation ***
bool(true)
array(11) {
int(4095)
}
Done
---UEXPECTF--
-*** Testing natcasesort() : usage variation ***
-bool(true)
-array(11) {
- [8]=>
- int(-255)
- [10]=>
- int(-682)
- [9]=>
- int(0)
- [2]=>
- int(15)
- [5]=>
- int(187)
- [3]=>
- int(255)
- [7]=>
- int(255)
- [0]=>
- int(427)
- [6]=>
- int(427)
- [4]=>
- int(682)
- [1]=>
- int(4095)
-}
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing natcasesort() : usage variation ***
-- Initial test --
&int(555)
}
Done
---UEXPECTF--
-*** Testing natcasesort() : usage variation ***
-
--- Initial test --
-bool(true)
-array(3) {
- [1]=>
- &int(33)
- [0]=>
- &int(100)
- [2]=>
- &int(555)
-}
-
--- Change $value1 --
-bool(true)
-array(3) {
- [0]=>
- &int(-29)
- [1]=>
- &int(33)
- [2]=>
- &int(555)
-}
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
-*** Testing natcasesort() : usage variations ***
-array(5) {
- [0]=>
- int(1)
- [1]=>
- float(3)
- [2]=>
- string(4) "zero"
- [3]=>
- string(1) "2"
- [4]=>
- &array(5) {
- [0]=>
- int(1)
- [1]=>
- float(3)
- [2]=>
- string(4) "zero"
- [3]=>
- string(1) "2"
- [4]=>
- &array(5) {
- [0]=>
- int(1)
- [1]=>
- float(3)
- [2]=>
- string(4) "zero"
- [3]=>
- string(1) "2"
- [4]=>
- *RECURSION*
- }
- }
-}
-bool(true)
-array(5) {
- [0]=>
- int(1)
- [3]=>
- string(1) "2"
- [1]=>
- float(3)
- [4]=>
- &array(5) {
- [0]=>
- int(1)
- [3]=>
- string(1) "2"
- [1]=>
- float(3)
- [4]=>
- &array(5) {
- [0]=>
- int(1)
- [3]=>
- string(1) "2"
- [1]=>
- float(3)
- [4]=>
- *RECURSION*
- [2]=>
- string(4) "zero"
- }
- [2]=>
- string(4) "zero"
- }
- [2]=>
- string(4) "zero"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing natcasesort() : usage variations ***
array(5) {
[0]=>
[2]=>
unicode(4) "zero"
}
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing natcasesort() : usage variation ***
bool(true)
array(9) {
int(669)
}
Done
---UEXPECTF--
-*** Testing natcasesort() : usage variation ***
-bool(true)
-array(9) {
- [6]=>
- int(-54)
- [7]=>
- int(-229)
- [8]=>
- int(0)
- [3]=>
- int(54)
- [5]=>
- int(63)
- [1]=>
- int(209)
- [2]=>
- int(229)
- [4]=>
- int(506)
- [0]=>
- int(669)
-}
-Done
\ No newline at end of file
--EXPECTF--
*** Testing natcasesort() : usage variation ***
bool(true)
-array(22) {
- [13]=>
- NULL
- [19]=>
- string(0) ""
- [21]=>
- bool(false)
- [12]=>
- string(0) ""
- [10]=>
- string(3) "-.9"
- [7]=>
- int(-2)
- [8]=>
- float(-2)
- [9]=>
- float(-2.98989)
- [2]=>
- int(-4)
- [16]=>
- float(0)
- [17]=>
- int(0)
- [20]=>
- bool(true)
- [3]=>
- string(1) "4"
- [4]=>
- float(4)
- [6]=>
- string(1) "5"
- [14]=>
- string(2) "ab"
- [15]=>
- string(4) "abcd"
- [18]=>
- string(14) "%s"
- [0]=>
- array(0) {
- }
- [1]=>
- array(4) {
- [0]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
- [1]=>
- array(1) {
- [0]=>
- int(11)
- }
- [2]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- [3]=>
- array(0) {
- }
- }
- [5]=>
- string(1) "b"
- [11]=>
- string(4) "True"
-}
-Done
---UEXPECTF--
-*** Testing natcasesort() : usage variation ***
-bool(true)
array(22) {
[13]=>
NULL
[11]=>
unicode(4) "True"
}
-Done
\ No newline at end of file
+Done
var_dump(next($array));
?>
===DONE===
---EXPECTF--
-*** Testing next() : basic functionality ***
-0 => zero
-string(3) "one"
-1 => one
-string(3) "two"
-2 => two
-bool(false)
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing next() : basic functionality ***
0 => zero
unicode(3) "one"
Warning: next() expects exactly 1 parameter, 2 given in %s on line %d
NULL
===DONE===
---UEXPECTF--
-*** Testing next() : error conditions ***
-
--- Testing next() function with Zero arguments --
-
-Warning: next() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing next() function with more than expected no. of arguments --
-
-Warning: next() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-===DONE===
-- Iteration 16 --
-Warning: next() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: next() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-
-Warning: next() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: next() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: next() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: next() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: next() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: next() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: next() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-===DONE===
---UEXPECTF--
-*** Testing next() : variation ***
-
--- Iteration 1 --
-
-Warning: next() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: next() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: next() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: next() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: next() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: next() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: next() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: next() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: next() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: next() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: next() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: next() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: next() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: next() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: next() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 16 --
-
Warning: next() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
var_dump(next($array_arg[0]));
?>
===DONE===
---EXPECTF--
-*** Testing next() : usage variations ***
-
--- Pass a two-dimensional array as $array_arg --
-array(3) {
- [0]=>
- int(9)
- [1]=>
- int(8)
- [2]=>
- int(7)
-}
-bool(false)
-
--- Pass a sub-array as $array_arg --
-int(8)
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing next() : usage variations ***
-- Pass a two-dimensional array as $array_arg --
echo "Done\n";
?>
---EXPECTF--
-*** Testing range() function on basic operations ***
-
--- Integers as Low and High --
--- An array of elements from low to high --
-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)
-}
-
--- An array of elements from high to low --
-array(10) {
- [0]=>
- int(10)
- [1]=>
- int(9)
- [2]=>
- int(8)
- [3]=>
- int(7)
- [4]=>
- int(6)
- [5]=>
- int(5)
- [6]=>
- int(4)
- [7]=>
- int(3)
- [8]=>
- int(2)
- [9]=>
- int(1)
-}
-
--- Numeric Strings as Low and High --
--- An array of elements from low to high --
-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)
-}
-
--- An array of elements from high to low --
-array(10) {
- [0]=>
- int(10)
- [1]=>
- int(9)
- [2]=>
- int(8)
- [3]=>
- int(7)
- [4]=>
- int(6)
- [5]=>
- int(5)
- [6]=>
- int(4)
- [7]=>
- int(3)
- [8]=>
- int(2)
- [9]=>
- int(1)
-}
-
--- Chars as Low and High --
--- An array of elements from low to high --
-array(26) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "b"
- [2]=>
- string(1) "c"
- [3]=>
- string(1) "d"
- [4]=>
- string(1) "e"
- [5]=>
- string(1) "f"
- [6]=>
- string(1) "g"
- [7]=>
- string(1) "h"
- [8]=>
- string(1) "i"
- [9]=>
- string(1) "j"
- [10]=>
- string(1) "k"
- [11]=>
- string(1) "l"
- [12]=>
- string(1) "m"
- [13]=>
- string(1) "n"
- [14]=>
- string(1) "o"
- [15]=>
- string(1) "p"
- [16]=>
- string(1) "q"
- [17]=>
- string(1) "r"
- [18]=>
- string(1) "s"
- [19]=>
- string(1) "t"
- [20]=>
- string(1) "u"
- [21]=>
- string(1) "v"
- [22]=>
- string(1) "w"
- [23]=>
- string(1) "x"
- [24]=>
- string(1) "y"
- [25]=>
- string(1) "z"
-}
-
--- An array of elements from high to low --
-array(26) {
- [0]=>
- string(1) "z"
- [1]=>
- string(1) "y"
- [2]=>
- string(1) "x"
- [3]=>
- string(1) "w"
- [4]=>
- string(1) "v"
- [5]=>
- string(1) "u"
- [6]=>
- string(1) "t"
- [7]=>
- string(1) "s"
- [8]=>
- string(1) "r"
- [9]=>
- string(1) "q"
- [10]=>
- string(1) "p"
- [11]=>
- string(1) "o"
- [12]=>
- string(1) "n"
- [13]=>
- string(1) "m"
- [14]=>
- string(1) "l"
- [15]=>
- string(1) "k"
- [16]=>
- string(1) "j"
- [17]=>
- string(1) "i"
- [18]=>
- string(1) "h"
- [19]=>
- string(1) "g"
- [20]=>
- string(1) "f"
- [21]=>
- string(1) "e"
- [22]=>
- string(1) "d"
- [23]=>
- string(1) "c"
- [24]=>
- string(1) "b"
- [25]=>
- string(1) "a"
-}
-
--- Low and High are equal --
-array(1) {
- [0]=>
- int(5)
-}
-array(1) {
- [0]=>
- string(1) "q"
-}
-
--- floats as Low and High --
-array(6) {
- [0]=>
- float(5.1)
- [1]=>
- float(6.1)
- [2]=>
- float(7.1)
- [3]=>
- float(8.1)
- [4]=>
- float(9.1)
- [5]=>
- float(10.1)
-}
-array(6) {
- [0]=>
- float(10.1)
- [1]=>
- float(9.1)
- [2]=>
- float(8.1)
- [3]=>
- float(7.1)
- [4]=>
- float(6.1)
- [5]=>
- float(5.1)
-}
-array(6) {
- [0]=>
- float(5.1)
- [1]=>
- float(6.1)
- [2]=>
- float(7.1)
- [3]=>
- float(8.1)
- [4]=>
- float(9.1)
- [5]=>
- float(10.1)
-}
-array(6) {
- [0]=>
- float(10.1)
- [1]=>
- float(9.1)
- [2]=>
- float(8.1)
- [3]=>
- float(7.1)
- [4]=>
- float(6.1)
- [5]=>
- float(5.1)
-}
-
--- Passing step with Low and High --
-array(11) {
- [0]=>
- float(1)
- [1]=>
- float(1.1)
- [2]=>
- float(1.2)
- [3]=>
- float(1.3)
- [4]=>
- float(1.4)
- [5]=>
- float(1.5)
- [6]=>
- float(1.6)
- [7]=>
- float(1.7)
- [8]=>
- float(1.8)
- [9]=>
- float(1.9)
- [10]=>
- float(2)
-}
-array(11) {
- [0]=>
- float(2)
- [1]=>
- float(1.9)
- [2]=>
- float(1.8)
- [3]=>
- float(1.7)
- [4]=>
- float(1.6)
- [5]=>
- float(1.5)
- [6]=>
- float(1.4)
- [7]=>
- float(1.3)
- [8]=>
- float(1.2)
- [9]=>
- float(1.1)
- [10]=>
- float(1)
-}
-array(11) {
- [0]=>
- float(1)
- [1]=>
- float(1.1)
- [2]=>
- float(1.2)
- [3]=>
- float(1.3)
- [4]=>
- float(1.4)
- [5]=>
- float(1.5)
- [6]=>
- float(1.6)
- [7]=>
- float(1.7)
- [8]=>
- float(1.8)
- [9]=>
- float(1.9)
- [10]=>
- float(2)
-}
-array(11) {
- [0]=>
- float(1)
- [1]=>
- float(1.1)
- [2]=>
- float(1.2)
- [3]=>
- float(1.3)
- [4]=>
- float(1.4)
- [5]=>
- float(1.5)
- [6]=>
- float(1.6)
- [7]=>
- float(1.7)
- [8]=>
- float(1.8)
- [9]=>
- float(1.9)
- [10]=>
- float(2)
-}
-
--- Testing basic string with step --
-array(7) {
- [0]=>
- string(1) "a"
- [1]=>
- string(1) "c"
- [2]=>
- string(1) "e"
- [3]=>
- string(1) "g"
- [4]=>
- string(1) "i"
- [5]=>
- string(1) "k"
- [6]=>
- string(1) "m"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing range() function on basic operations ***
-- Integers as Low and High --
--EXPECTF--
*** Testing range() with various low and high values ***
-- creating an array with low = 'ABCD' and high = 'ABCD' --
-array(1) {
- [0]=>
- string(1) "A"
-}
-
--- creating an array with low = 'ABCD' and high = '-10.5555' --
-array(11) {
- [0]=>
- float(0)
- [1]=>
- float(-1)
- [2]=>
- float(-2)
- [3]=>
- float(-3)
- [4]=>
- float(-4)
- [5]=>
- float(-5)
- [6]=>
- float(-6)
- [7]=>
- float(-7)
- [8]=>
- float(-8)
- [9]=>
- float(-9)
- [10]=>
- float(-10)
-}
-
--- creating an array with low = 'ABCD' and high = '1' --
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-
--- creating an array with low = 'ABCD' and high = '' --
-array(1) {
- [0]=>
- int(0)
-}
-
--- creating an array with low = 'ABCD' and high = '' --
-array(1) {
- [0]=>
- int(0)
-}
-
--- creating an array with low = 'ABCD' and high = '' --
-array(1) {
- [0]=>
- int(0)
-}
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = 'ABCD' and high = 'Array' --
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-
--- creating an array with low = '-10.5555' and high = 'ABCD' --
-array(11) {
- [0]=>
- float(-10.5555)
- [1]=>
- float(-9.5555)
- [2]=>
- float(-8.5555)
- [3]=>
- float(-7.5555)
- [4]=>
- float(-6.5555)
- [5]=>
- float(-5.5555)
- [6]=>
- float(-4.5555)
- [7]=>
- float(-3.5555)
- [8]=>
- float(-2.5555)
- [9]=>
- float(-1.5555)
- [10]=>
- float(-0.5555)
-}
-
--- creating an array with low = '-10.5555' and high = '-10.5555' --
-array(1) {
- [0]=>
- float(-10.5555)
-}
-
--- creating an array with low = '-10.5555' and high = '1' --
-array(12) {
- [0]=>
- float(-10.5555)
- [1]=>
- float(-9.5555)
- [2]=>
- float(-8.5555)
- [3]=>
- float(-7.5555)
- [4]=>
- float(-6.5555)
- [5]=>
- float(-5.5555)
- [6]=>
- float(-4.5555)
- [7]=>
- float(-3.5555)
- [8]=>
- float(-2.5555)
- [9]=>
- float(-1.5555)
- [10]=>
- float(-0.5555)
- [11]=>
- float(0.4445)
-}
-
--- creating an array with low = '-10.5555' and high = '' --
-array(11) {
- [0]=>
- float(-10.5555)
- [1]=>
- float(-9.5555)
- [2]=>
- float(-8.5555)
- [3]=>
- float(-7.5555)
- [4]=>
- float(-6.5555)
- [5]=>
- float(-5.5555)
- [6]=>
- float(-4.5555)
- [7]=>
- float(-3.5555)
- [8]=>
- float(-2.5555)
- [9]=>
- float(-1.5555)
- [10]=>
- float(-0.5555)
-}
-
--- creating an array with low = '-10.5555' and high = '' --
-array(11) {
- [0]=>
- float(-10.5555)
- [1]=>
- float(-9.5555)
- [2]=>
- float(-8.5555)
- [3]=>
- float(-7.5555)
- [4]=>
- float(-6.5555)
- [5]=>
- float(-5.5555)
- [6]=>
- float(-4.5555)
- [7]=>
- float(-3.5555)
- [8]=>
- float(-2.5555)
- [9]=>
- float(-1.5555)
- [10]=>
- float(-0.5555)
-}
-
--- creating an array with low = '-10.5555' and high = '' --
-array(11) {
- [0]=>
- float(-10.5555)
- [1]=>
- float(-9.5555)
- [2]=>
- float(-8.5555)
- [3]=>
- float(-7.5555)
- [4]=>
- float(-6.5555)
- [5]=>
- float(-5.5555)
- [6]=>
- float(-4.5555)
- [7]=>
- float(-3.5555)
- [8]=>
- float(-2.5555)
- [9]=>
- float(-1.5555)
- [10]=>
- float(-0.5555)
-}
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = '-10.5555' and high = 'Array' --
-array(12) {
- [0]=>
- float(-10.5555)
- [1]=>
- float(-9.5555)
- [2]=>
- float(-8.5555)
- [3]=>
- float(-7.5555)
- [4]=>
- float(-6.5555)
- [5]=>
- float(-5.5555)
- [6]=>
- float(-4.5555)
- [7]=>
- float(-3.5555)
- [8]=>
- float(-2.5555)
- [9]=>
- float(-1.5555)
- [10]=>
- float(-0.5555)
- [11]=>
- float(0.4445)
-}
-
--- creating an array with low = '1' and high = 'ABCD' --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(0)
-}
-
--- creating an array with low = '1' and high = '-10.5555' --
-array(12) {
- [0]=>
- float(1)
- [1]=>
- float(0)
- [2]=>
- float(-1)
- [3]=>
- float(-2)
- [4]=>
- float(-3)
- [5]=>
- float(-4)
- [6]=>
- float(-5)
- [7]=>
- float(-6)
- [8]=>
- float(-7)
- [9]=>
- float(-8)
- [10]=>
- float(-9)
- [11]=>
- float(-10)
-}
-
--- creating an array with low = '1' and high = '1' --
-array(1) {
- [0]=>
- int(1)
-}
-
--- creating an array with low = '1' and high = '' --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(0)
-}
-
--- creating an array with low = '1' and high = '' --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(0)
-}
-
--- creating an array with low = '1' and high = '' --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(0)
-}
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = '1' and high = 'Array' --
-array(1) {
- [0]=>
- int(1)
-}
-
--- creating an array with low = '' and high = 'ABCD' --
-array(1) {
- [0]=>
- int(0)
-}
-
--- creating an array with low = '' and high = '-10.5555' --
-array(11) {
- [0]=>
- float(0)
- [1]=>
- float(-1)
- [2]=>
- float(-2)
- [3]=>
- float(-3)
- [4]=>
- float(-4)
- [5]=>
- float(-5)
- [6]=>
- float(-6)
- [7]=>
- float(-7)
- [8]=>
- float(-8)
- [9]=>
- float(-9)
- [10]=>
- float(-10)
-}
-
--- creating an array with low = '' and high = '1' --
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-
--- creating an array with low = '' and high = '' --
-array(1) {
- [0]=>
- int(0)
-}
-
--- creating an array with low = '' and high = '' --
-array(1) {
- [0]=>
- int(0)
-}
-
--- creating an array with low = '' and high = '' --
-array(1) {
- [0]=>
- int(0)
-}
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = '' and high = 'Array' --
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-
--- creating an array with low = '' and high = 'ABCD' --
-array(1) {
- [0]=>
- int(0)
-}
-
--- creating an array with low = '' and high = '-10.5555' --
-array(11) {
- [0]=>
- float(0)
- [1]=>
- float(-1)
- [2]=>
- float(-2)
- [3]=>
- float(-3)
- [4]=>
- float(-4)
- [5]=>
- float(-5)
- [6]=>
- float(-6)
- [7]=>
- float(-7)
- [8]=>
- float(-8)
- [9]=>
- float(-9)
- [10]=>
- float(-10)
-}
-
--- creating an array with low = '' and high = '1' --
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-
--- creating an array with low = '' and high = '' --
-array(1) {
- [0]=>
- int(0)
-}
-
--- creating an array with low = '' and high = '' --
-array(1) {
- [0]=>
- int(0)
-}
-
--- creating an array with low = '' and high = '' --
-array(1) {
- [0]=>
- int(0)
-}
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = '' and high = 'Array' --
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-
--- creating an array with low = '' and high = 'ABCD' --
-array(1) {
- [0]=>
- int(0)
-}
-
--- creating an array with low = '' and high = '-10.5555' --
-array(11) {
- [0]=>
- float(0)
- [1]=>
- float(-1)
- [2]=>
- float(-2)
- [3]=>
- float(-3)
- [4]=>
- float(-4)
- [5]=>
- float(-5)
- [6]=>
- float(-6)
- [7]=>
- float(-7)
- [8]=>
- float(-8)
- [9]=>
- float(-9)
- [10]=>
- float(-10)
-}
-
--- creating an array with low = '' and high = '1' --
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-
--- creating an array with low = '' and high = '' --
-array(1) {
- [0]=>
- int(0)
-}
-
--- creating an array with low = '' and high = '' --
-array(1) {
- [0]=>
- int(0)
-}
-
--- creating an array with low = '' and high = '' --
-array(1) {
- [0]=>
- int(0)
-}
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = '' and high = 'Array' --
-array(2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
-}
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = 'Array' and high = 'ABCD' --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(0)
-}
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = 'Array' and high = '-10.5555' --
-array(12) {
- [0]=>
- float(1)
- [1]=>
- float(0)
- [2]=>
- float(-1)
- [3]=>
- float(-2)
- [4]=>
- float(-3)
- [5]=>
- float(-4)
- [6]=>
- float(-5)
- [7]=>
- float(-6)
- [8]=>
- float(-7)
- [9]=>
- float(-8)
- [10]=>
- float(-9)
- [11]=>
- float(-10)
-}
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = 'Array' and high = '1' --
-array(1) {
- [0]=>
- int(1)
-}
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = 'Array' and high = '' --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(0)
-}
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = 'Array' and high = '' --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(0)
-}
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = 'Array' and high = '' --
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(0)
-}
-
-Notice: Array to string conversion in %s on line %d
-
-Notice: Array to string conversion in %s on line %d
-
--- creating an array with low = 'Array' and high = 'Array' --
-array(1) {
- [0]=>
- int(1)
-}
-
-*** Possible variatins with steps ***
-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)
-}
-Done
---UEXPECTF--
-*** Testing range() with various low and high values ***
--- creating an array with low = 'ABCD' and high = 'ABCD' --
array(1) {
[0]=>
unicode(1) "A"
echo "\nDone";
?>
---EXPECTF--
+--EXPECT--
*** Testing max/outof range values ***
array(2) {
[0]=>
echo "\nDone";
?>
---EXPECTF--
+--EXPECT--
*** Testing max/outof range values ***
array(2) {
[0]=>
var_dump(reset($array));
?>
===DONE===
---EXPECTF--
-*** Testing reset() : basic functionality ***
-
--- Initial Position: --
-0 => zero
-
--- Call to next() --
-string(3) "one"
-
--- Current Position: --
-1 => one
-
--- Call to reset() --
-string(4) "zero"
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing reset() : basic functionality ***
-- Initial Position: --
Warning: reset() expects exactly 1 parameter, 2 given in %s on line %d
NULL
===DONE===
---UEXPECTF--
-*** Testing reset() : error conditions ***
-
--- Testing reset() function with Zero arguments --
-
-Warning: reset() expects exactly 1 parameter, 0 given in %s on line %d
-NULL
-
--- Testing reset() function with more than expected no. of arguments --
-
-Warning: reset() expects exactly 1 parameter, 2 given in %s on line %d
-NULL
-===DONE===
-- Iteration 16 --
-Warning: reset() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 17 --
-
-Warning: reset() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 18 --
-bool(false)
-
--- Iteration 19 --
-
-Warning: reset() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 20 --
-
-Warning: reset() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 21 --
-
-Warning: reset() expects parameter 1 to be array, string given in %s on line %d
-NULL
-
--- Iteration 22 --
-
-Warning: reset() expects parameter 1 to be array, object given in %s on line %d
-NULL
-
--- Iteration 23 --
-
-Warning: reset() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 24 --
-
-Warning: reset() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 25 --
-
-Warning: reset() expects parameter 1 to be array, resource given in %s on line %d
-NULL
-===DONE===
---UEXPECTF--
-*** Testing reset() : usage variations ***
-
--- Iteration 1 --
-
-Warning: reset() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 2 --
-
-Warning: reset() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 3 --
-
-Warning: reset() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 4 --
-
-Warning: reset() expects parameter 1 to be array, integer given in %s on line %d
-NULL
-
--- Iteration 5 --
-
-Warning: reset() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 6 --
-
-Warning: reset() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 7 --
-
-Warning: reset() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 8 --
-
-Warning: reset() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 9 --
-
-Warning: reset() expects parameter 1 to be array, double given in %s on line %d
-NULL
-
--- Iteration 10 --
-
-Warning: reset() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 11 --
-
-Warning: reset() expects parameter 1 to be array, null given in %s on line %d
-NULL
-
--- Iteration 12 --
-
-Warning: reset() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 13 --
-
-Warning: reset() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 14 --
-
-Warning: reset() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 15 --
-
-Warning: reset() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
-
--- Iteration 16 --
-
Warning: reset() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
var_dump(reset($array));
?>
===DONE===
---EXPECTF--
-*** Testing reset() : usage variations ***
-
--- Initial Position: --
-a => 0
-
--- Unset First element in array and check reset() --
-string(1) "b"
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing reset() : usage variations ***
-- Initial Position: --
var_dump(current($array2));
?>
===DONE===
---EXPECTF--
-*** Testing reset() : usage variations ***
-
--- Initial position of internal pointer --
-string(4) "zero"
-
--- Position after calling next() --
-$array1: string(3) "one"
-$array2: string(3) "one"
-
--- Position after calling reset() --
-string(4) "zero"
-$array1: string(4) "zero"
-$array2: string(4) "zero"
-===DONE===
---UEXPECTF--
+--EXPECT--
*** Testing reset() : usage variations ***
-- Initial position of internal pointer --
// array with default keys containing unsorted numeric values
$unsorted_numerics = array( 100, 33, 555, 22 );
-echo "\n-- Testing rsort() by supplying string array, 'flag' value is defualt --\n";
+echo "\n-- Testing rsort() by supplying string array, 'flag' value is default --\n";
$temp_array = $unsorted_strings;
var_dump( rsort($temp_array) );
var_dump( $temp_array);
-echo "\n-- Testing rsort() by supplying numeric array, 'flag' value is defualt --\n";
+echo "\n-- Testing rsort() by supplying numeric array, 'flag' value is default --\n";
$temp_array = $unsorted_numerics;
var_dump( rsort($temp_array) );
var_dump( $temp_array);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing rsort() : basic functionality ***
--- Testing rsort() by supplying string array, 'flag' value is defualt --
-bool(true)
-array(3) {
- [0]=>
- string(6) "orange"
- [1]=>
- string(5) "lemon"
- [2]=>
- string(6) "banana"
-}
-
--- Testing rsort() by supplying numeric array, 'flag' value is defualt --
-bool(true)
-array(4) {
- [0]=>
- int(555)
- [1]=>
- int(100)
- [2]=>
- int(33)
- [3]=>
- int(22)
-}
-
--- Testing rsort() by supplying string array, 'flag' = SORT_REGULAR --
-bool(true)
-array(3) {
- [0]=>
- string(6) "orange"
- [1]=>
- string(5) "lemon"
- [2]=>
- string(6) "banana"
-}
-
--- Testing rsort() by supplying numeric array, 'flag' = SORT_REGULAR --
-bool(true)
-array(4) {
- [0]=>
- int(555)
- [1]=>
- int(100)
- [2]=>
- int(33)
- [3]=>
- int(22)
-}
-
--- Testing rsort() by supplying string array, 'flag' = SORT_STRING --
-bool(true)
-array(3) {
- [0]=>
- string(6) "orange"
- [1]=>
- string(5) "lemon"
- [2]=>
- string(6) "banana"
-}
-
--- Testing rsort() by supplying numeric array, 'flag' = SORT_NUMERIC --
-bool(true)
-array(4) {
- [0]=>
- int(555)
- [1]=>
- int(100)
- [2]=>
- int(33)
- [3]=>
- int(22)
-}
-Done
---UEXPECTF--
-*** Testing rsort() : basic functionality ***
-
--- Testing rsort() by supplying string array, 'flag' value is defualt --
+-- Testing rsort() by supplying string array, 'flag' value is default --
bool(true)
array(3) {
[0]=>
unicode(6) "banana"
}
--- Testing rsort() by supplying numeric array, 'flag' value is defualt --
+-- Testing rsort() by supplying numeric array, 'flag' value is default --
bool(true)
array(4) {
[0]=>
[3]=>
int(22)
}
-Done
\ No newline at end of file
+Done
int(2)
}
Done
---UEXPECTF--
-*** Testing rsort() : error conditions ***
-
--- Testing rsort() function with Zero arguments --
-
-Warning: rsort() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing rsort() function with more than expected no. of arguments --
-
-Warning: rsort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-Done
\ No newline at end of file
echo "\n-- Sort flag = default --\n";
-// testing rsort() function by supplying integer object array, flag value is defualt
+// testing rsort() function by supplying integer object array, flag value is default
$temp_array = $unsorted_int_obj;
var_dump(rsort($temp_array) );
var_dump($temp_array);
-// testing rsort() function by supplying string object array, flag value is defualt
+// testing rsort() function by supplying string object array, flag value is default
$temp_array = $unsorted_str_obj;
var_dump(rsort($temp_array) );
var_dump($temp_array);
--EXPECTF--
*** Testing rsort() : object functionality ***
--- Sort flag = default --
-bool(true)
-array(6) {
- [0]=>
- object(for_integer_rsort)#%d (1) {
- ["class_value"]=>
- int(66)
- }
- [1]=>
- object(for_integer_rsort)#%d (1) {
- ["class_value"]=>
- int(23)
- }
- [2]=>
- object(for_integer_rsort)#%d (1) {
- ["class_value"]=>
- int(11)
- }
- [3]=>
- object(for_integer_rsort)#%d (1) {
- ["class_value"]=>
- float(0.001)
- }
- [4]=>
- object(for_integer_rsort)#%d (1) {
- ["class_value"]=>
- int(0)
- }
- [5]=>
- object(for_integer_rsort)#%d (1) {
- ["class_value"]=>
- int(-5)
- }
-}
-bool(true)
-array(8) {
- [0]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(1) "w"
- }
- [1]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(1) "t"
- }
- [2]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(2) "py"
- }
- [3]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(3) "axx"
- }
- [4]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(5) "apple"
- }
- [5]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(5) "aPPle"
- }
- [6]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(6) "Orange"
- }
- [7]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(5) "Lemon"
- }
-}
-
--- Sort flag = SORT_REGULAR --
-bool(true)
-array(6) {
- [0]=>
- object(for_integer_rsort)#%d (1) {
- ["class_value"]=>
- int(66)
- }
- [1]=>
- object(for_integer_rsort)#%d (1) {
- ["class_value"]=>
- int(23)
- }
- [2]=>
- object(for_integer_rsort)#%d (1) {
- ["class_value"]=>
- int(11)
- }
- [3]=>
- object(for_integer_rsort)#%d (1) {
- ["class_value"]=>
- float(0.001)
- }
- [4]=>
- object(for_integer_rsort)#%d (1) {
- ["class_value"]=>
- int(0)
- }
- [5]=>
- object(for_integer_rsort)#%d (1) {
- ["class_value"]=>
- int(-5)
- }
-}
-bool(true)
-array(8) {
- [0]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(1) "w"
- }
- [1]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(1) "t"
- }
- [2]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(2) "py"
- }
- [3]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(3) "axx"
- }
- [4]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(5) "apple"
- }
- [5]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(5) "aPPle"
- }
- [6]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(6) "Orange"
- }
- [7]=>
- object(for_string_rsort)#%d (1) {
- ["class_value"]=>
- string(5) "Lemon"
- }
-}
-Done
---UEXPECTF--
-*** Testing rsort() : object functionality ***
-
-- Sort flag = default --
bool(true)
array(6) {
unicode(5) "Lemon"
}
}
-Done
\ No newline at end of file
+Done
echo "\n-- Sort flag = default --\n";
-// testing rsort() function by supplying integer object array, flag value is defualt
+// testing rsort() function by supplying integer object array, flag value is default
$temp_array = $unsorted_int_obj;
var_dump(rsort($temp_array) );
var_dump($temp_array);
-// testing rsort() function by supplying string object array, flag value is defualt
+// testing rsort() function by supplying string object array, flag value is default
$temp_array = $unsorted_str_obj;
var_dump(rsort($temp_array) );
var_dump($temp_array);
--EXPECTF--
*** Testing rsort() : object functionality ***
--- Sort flag = default --
-bool(true)
-array(4) {
- [0]=>
- object(for_integer_rsort)#%d (3) {
- ["public_class_value"]=>
- int(66)
- ["private_class_value":"for_integer_rsort":private]=>
- int(44)
- ["protected_class_value":protected]=>
- int(4)
- }
- [1]=>
- object(for_integer_rsort)#%d (3) {
- ["public_class_value"]=>
- int(11)
- ["private_class_value":"for_integer_rsort":private]=>
- int(33)
- ["protected_class_value":protected]=>
- int(30)
- }
- [2]=>
- object(for_integer_rsort)#%d (3) {
- ["public_class_value"]=>
- float(0.001)
- ["private_class_value":"for_integer_rsort":private]=>
- float(99.5)
- ["protected_class_value":protected]=>
- float(0.1)
- }
- [3]=>
- object(for_integer_rsort)#%d (3) {
- ["public_class_value"]=>
- int(-88)
- ["private_class_value":"for_integer_rsort":private]=>
- int(-5)
- ["protected_class_value":protected]=>
- int(5)
- }
-}
-bool(true)
-array(4) {
- [0]=>
- object(for_string_rsort)#%d (3) {
- ["public_class_value"]=>
- string(1) "w"
- ["private_class_value":"for_string_rsort":private]=>
- string(1) "W"
- ["protected_class_value":protected]=>
- string(1) "c"
- }
- [1]=>
- object(for_string_rsort)#%d (3) {
- ["public_class_value"]=>
- string(1) "t"
- ["private_class_value":"for_string_rsort":private]=>
- string(3) "eee"
- ["protected_class_value":protected]=>
- string(3) "abb"
- }
- [2]=>
- object(for_string_rsort)#%d (3) {
- ["public_class_value"]=>
- string(2) "py"
- ["private_class_value":"for_string_rsort":private]=>
- string(2) "PY"
- ["protected_class_value":protected]=>
- string(2) "pt"
- }
- [3]=>
- object(for_string_rsort)#%d (3) {
- ["public_class_value"]=>
- string(3) "axx"
- ["private_class_value":"for_string_rsort":private]=>
- string(3) "AXX"
- ["protected_class_value":protected]=>
- string(3) "ass"
- }
-}
-
--- Sort flag = SORT_REGULAR --
-bool(true)
-array(4) {
- [0]=>
- object(for_integer_rsort)#%d (3) {
- ["public_class_value"]=>
- int(66)
- ["private_class_value":"for_integer_rsort":private]=>
- int(44)
- ["protected_class_value":protected]=>
- int(4)
- }
- [1]=>
- object(for_integer_rsort)#%d (3) {
- ["public_class_value"]=>
- int(11)
- ["private_class_value":"for_integer_rsort":private]=>
- int(33)
- ["protected_class_value":protected]=>
- int(30)
- }
- [2]=>
- object(for_integer_rsort)#%d (3) {
- ["public_class_value"]=>
- float(0.001)
- ["private_class_value":"for_integer_rsort":private]=>
- float(99.5)
- ["protected_class_value":protected]=>
- float(0.1)
- }
- [3]=>
- object(for_integer_rsort)#%d (3) {
- ["public_class_value"]=>
- int(-88)
- ["private_class_value":"for_integer_rsort":private]=>
- int(-5)
- ["protected_class_value":protected]=>
- int(5)
- }
-}
-bool(true)
-array(4) {
- [0]=>
- object(for_string_rsort)#%d (3) {
- ["public_class_value"]=>
- string(1) "w"
- ["private_class_value":"for_string_rsort":private]=>
- string(1) "W"
- ["protected_class_value":protected]=>
- string(1) "c"
- }
- [1]=>
- object(for_string_rsort)#%d (3) {
- ["public_class_value"]=>
- string(1) "t"
- ["private_class_value":"for_string_rsort":private]=>
- string(3) "eee"
- ["protected_class_value":protected]=>
- string(3) "abb"
- }
- [2]=>
- object(for_string_rsort)#%d (3) {
- ["public_class_value"]=>
- string(2) "py"
- ["private_class_value":"for_string_rsort":private]=>
- string(2) "PY"
- ["protected_class_value":protected]=>
- string(2) "pt"
- }
- [3]=>
- object(for_string_rsort)#%d (3) {
- ["public_class_value"]=>
- string(3) "axx"
- ["private_class_value":"for_string_rsort":private]=>
- string(3) "AXX"
- ["protected_class_value":protected]=>
- string(3) "ass"
- }
-}
-Done
---UEXPECTF--
-*** Testing rsort() : object functionality ***
-
-- Sort flag = default --
bool(true)
array(4) {
unicode(3) "ass"
}
}
-Done
\ No newline at end of file
+Done
-- Iteration 16 --
Flag = default:
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 17 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 18 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 19 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 20 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 21 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
--- Iteration 22 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 23 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 24 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Done
---UEXPECTF--
-*** Testing rsort() : variation ***
--- Iteration 1 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 2 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 3 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 4 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 5 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 6 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 7 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 8 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 9 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 10 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 11 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 12 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 13 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 14 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 15 --
-Flag = default:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-Flag = SORT_REGULAR:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-Flag = SORT_NUMERIC:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-Flag = SORT_STRING:
-
-Warning: rsort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 16 --
-Flag = default:
-
Warning: rsort() expects parameter 1 to be array, Unicode string given in %s on line %d
bool(false)
Flag = SORT_REGULAR:
Warning: rsort() expects parameter 1 to be array, resource given in %s on line %d
bool(false)
-Done
\ No newline at end of file
+Done
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing rsort() : variation ***
-- Sort flag = default --
int(-229)
}
Done
---UEXPECTF--
-*** Testing rsort() : variation ***
-
--- Sort flag = default --
-bool(true)
-array(9) {
- [0]=>
- int(669)
- [1]=>
- int(506)
- [2]=>
- int(229)
- [3]=>
- int(209)
- [4]=>
- int(63)
- [5]=>
- int(54)
- [6]=>
- int(0)
- [7]=>
- int(-54)
- [8]=>
- int(-229)
-}
-
--- Sort flag = SORT_REGULAR --
-bool(true)
-array(9) {
- [0]=>
- int(669)
- [1]=>
- int(506)
- [2]=>
- int(229)
- [3]=>
- int(209)
- [4]=>
- int(63)
- [5]=>
- int(54)
- [6]=>
- int(0)
- [7]=>
- int(-54)
- [8]=>
- int(-229)
-}
-
--- Sort flag = SORT_NUMERIC --
-bool(true)
-array(9) {
- [0]=>
- int(669)
- [1]=>
- int(506)
- [2]=>
- int(229)
- [3]=>
- int(209)
- [4]=>
- int(63)
- [5]=>
- int(54)
- [6]=>
- int(0)
- [7]=>
- int(-54)
- [8]=>
- int(-229)
-}
-Done
\ No newline at end of file
-- Iteration 16 --
-Warning: rsort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-
--- Iteration 17 --
-
-Warning: rsort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-
--- Iteration 18 --
-
-Warning: rsort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-
--- Iteration 19 --
-
-Warning: rsort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-
--- Iteration 20 --
-
-Warning: rsort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-
--- Iteration 21 --
-
-Warning: rsort() expects parameter 2 to be long, object given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-
--- Iteration 22 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 23 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 24 --
-
-Warning: rsort() expects parameter 2 to be long, resource given in %s on line %d
-bool(false)
-array(5) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- int(2)
- [3]=>
- int(3)
- [4]=>
- int(1)
-}
-Done
---UEXPECTF--
-*** Testing rsort() : variation ***
-
--- Iteration 1 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 2 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 3 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 4 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 5 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 6 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 7 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 8 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 9 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 10 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 11 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 12 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 13 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 14 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 15 --
-bool(true)
-array(5) {
- [0]=>
- int(5)
- [1]=>
- int(3)
- [2]=>
- int(2)
- [3]=>
- int(1)
- [4]=>
- int(1)
-}
-
--- Iteration 16 --
-
Warning: rsort() expects parameter 2 to be long, Unicode string given in %s on line %d
bool(false)
array(5) {
[4]=>
int(1)
}
-Done
\ No newline at end of file
+Done
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
- echo "- With Defualt sort flag -\n";
+ echo "- With default sort flag -\n";
$temp_array = $array;
var_dump(rsort($temp_array) );
var_dump($temp_array);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing rsort() : variation ***
-- Iteration 1 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(9) {
[0]=>
}
-- Iteration 2 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(7) {
[0]=>
}
-- Iteration 3 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(11) {
[0]=>
}
-- Iteration 4 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(7) {
[0]=>
float(-2147483649)
}
Done
---UEXPECTF--
-*** Testing rsort() : variation ***
-
--- Iteration 1 --
-- With Defualt sort flag -
-bool(true)
-array(9) {
- [0]=>
- int(41)
- [1]=>
- int(31)
- [2]=>
- int(21)
- [3]=>
- int(11)
- [4]=>
- int(0)
- [5]=>
- int(-11)
- [6]=>
- int(-21)
- [7]=>
- int(-31)
- [8]=>
- int(-41)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(9) {
- [0]=>
- int(41)
- [1]=>
- int(31)
- [2]=>
- int(21)
- [3]=>
- int(11)
- [4]=>
- int(0)
- [5]=>
- int(-11)
- [6]=>
- int(-21)
- [7]=>
- int(-31)
- [8]=>
- int(-41)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(9) {
- [0]=>
- int(41)
- [1]=>
- int(31)
- [2]=>
- int(21)
- [3]=>
- int(11)
- [4]=>
- int(0)
- [5]=>
- int(-11)
- [6]=>
- int(-21)
- [7]=>
- int(-31)
- [8]=>
- int(-41)
-}
-
--- Iteration 2 --
-- With Defualt sort flag -
-bool(true)
-array(7) {
- [0]=>
- float(1050)
- [1]=>
- float(10.5)
- [2]=>
- float(0.5)
- [3]=>
- float(0.106)
- [4]=>
- float(0.01)
- [5]=>
- float(-0.1)
- [6]=>
- float(-10.5)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(7) {
- [0]=>
- float(1050)
- [1]=>
- float(10.5)
- [2]=>
- float(0.5)
- [3]=>
- float(0.106)
- [4]=>
- float(0.01)
- [5]=>
- float(-0.1)
- [6]=>
- float(-10.5)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(7) {
- [0]=>
- float(1050)
- [1]=>
- float(10.5)
- [2]=>
- float(0.5)
- [3]=>
- float(0.106)
- [4]=>
- float(0.01)
- [5]=>
- float(-0.1)
- [6]=>
- float(-10.5)
-}
-
--- Iteration 3 --
-- With Defualt sort flag -
-bool(true)
-array(11) {
- [0]=>
- int(33)
- [1]=>
- int(2)
- [2]=>
- float(0.106)
- [3]=>
- float(0.09)
- [4]=>
- float(0.0021)
- [5]=>
- float(0.0001)
- [6]=>
- int(0)
- [7]=>
- float(-0.01)
- [8]=>
- float(-0.106)
- [9]=>
- float(-0.9)
- [10]=>
- int(-1)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(11) {
- [0]=>
- int(33)
- [1]=>
- int(2)
- [2]=>
- float(0.106)
- [3]=>
- float(0.09)
- [4]=>
- float(0.0021)
- [5]=>
- float(0.0001)
- [6]=>
- int(0)
- [7]=>
- float(-0.01)
- [8]=>
- float(-0.106)
- [9]=>
- float(-0.9)
- [10]=>
- int(-1)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(11) {
- [0]=>
- int(33)
- [1]=>
- int(2)
- [2]=>
- float(0.106)
- [3]=>
- float(0.09)
- [4]=>
- float(0.0021)
- [5]=>
- float(0.0001)
- [6]=>
- int(0)
- [7]=>
- float(-0.01)
- [8]=>
- float(-0.106)
- [9]=>
- float(-0.9)
- [10]=>
- int(-1)
-}
-
--- Iteration 4 --
-- With Defualt sort flag -
-bool(true)
-array(7) {
- [0]=>
- float(2147483648)
- [1]=>
- int(2147483647)
- [2]=>
- int(0)
- [3]=>
- int(0)
- [4]=>
- int(-2147483647)
- [5]=>
- float(-2147483648)
- [6]=>
- float(-2147483649)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(7) {
- [0]=>
- float(2147483648)
- [1]=>
- int(2147483647)
- [2]=>
- int(0)
- [3]=>
- int(0)
- [4]=>
- int(-2147483647)
- [5]=>
- float(-2147483648)
- [6]=>
- float(-2147483649)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(7) {
- [0]=>
- float(2147483648)
- [1]=>
- int(2147483647)
- [2]=>
- int(0)
- [3]=>
- int(0)
- [4]=>
- int(-2147483647)
- [5]=>
- float(-2147483648)
- [6]=>
- float(-2147483649)
-}
-Done
\ No newline at end of file
// an array containing integer references
$unsorted_numerics = array( &$value1 , &$value2, &$value3);
-echo "\n-- 'flag' value is defualt --\n";
+echo "\n-- 'flag' value is default --\n";
$temp_array = $unsorted_numerics;
var_dump( rsort($temp_array) );
var_dump( $temp_array);
Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
*** Testing rsort() : variation ***
--- 'flag' value is defualt --
-bool(true)
-array(3) {
- [0]=>
- &int(555)
- [1]=>
- &int(100)
- [2]=>
- &int(33)
-}
-
--- 'flag' = SORT_REGULAR --
-bool(true)
-array(3) {
- [0]=>
- &int(555)
- [1]=>
- &int(100)
- [2]=>
- &int(33)
-}
-
--- 'flag' = SORT_NUMERIC --
-bool(true)
-array(3) {
- [0]=>
- &int(555)
- [1]=>
- &int(100)
- [2]=>
- &int(33)
-}
-Done
---UEXPECTF--
-Deprecated: Call-time pass-by-reference has been deprecated in %s on line %d
-*** Testing rsort() : variation ***
-
--- 'flag' value is defualt --
+-- 'flag' value is default --
bool(true)
array(3) {
[0]=>
echo "Done";
?>
---EXPECTF--
-*** Testing rsort() : variation ***
-
--- Iteration 1 --
-- With Default sort flag -
-bool(true)
-array(11) {
- [0]=>
- string(4) "\xhh"
- [1]=>
- string(2) "\e"
- [2]=>
- string(4) "\ddd"
- [3]=>
- string(3) "\cx"
- [4]=>
- string(2) "\a"
- [5]=>
- string(1) "\f"
- [6]=>
- string(1) "\v"
- [7]=>
- string(1) "
-"
- [8]=>
- string(1) " "
- [9]=>
- NULL
- [10]=>
- NULL
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(11) {
- [0]=>
- string(4) "\xhh"
- [1]=>
- string(2) "\e"
- [2]=>
- string(4) "\ddd"
- [3]=>
- string(3) "\cx"
- [4]=>
- string(2) "\a"
- [5]=>
- string(1) "\f"
- [6]=>
- string(1) "\v"
- [7]=>
- string(1) "
-"
- [8]=>
- string(1) " "
- [9]=>
- NULL
- [10]=>
- NULL
-}
-- Sort flag = SORT_STRING -
-bool(true)
-array(11) {
- [0]=>
- string(4) "\xhh"
- [1]=>
- string(2) "\e"
- [2]=>
- string(4) "\ddd"
- [3]=>
- string(3) "\cx"
- [4]=>
- string(2) "\a"
- [5]=>
- string(1) "\f"
- [6]=>
- string(1) "\v"
- [7]=>
- string(1) "
-"
- [8]=>
- string(1) " "
- [9]=>
- NULL
- [10]=>
- NULL
-}
-
--- Iteration 2 --
-- With Default sort flag -
-bool(true)
-array(12) {
- [0]=>
- string(1) "x"
- [1]=>
- string(2) "ww"
- [2]=>
- string(3) "ttt"
- [3]=>
- string(6) "oraNGe"
- [4]=>
- string(5) "lemoN"
- [5]=>
- string(6) "banana"
- [6]=>
- string(5) "apple"
- [7]=>
- string(1) "X"
- [8]=>
- string(4) "Test"
- [9]=>
- string(4) "TTTT"
- [10]=>
- string(6) "Orange"
- [11]=>
- string(6) "BANANA"
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(12) {
- [0]=>
- string(1) "x"
- [1]=>
- string(2) "ww"
- [2]=>
- string(3) "ttt"
- [3]=>
- string(6) "oraNGe"
- [4]=>
- string(5) "lemoN"
- [5]=>
- string(6) "banana"
- [6]=>
- string(5) "apple"
- [7]=>
- string(1) "X"
- [8]=>
- string(4) "Test"
- [9]=>
- string(4) "TTTT"
- [10]=>
- string(6) "Orange"
- [11]=>
- string(6) "BANANA"
-}
-- Sort flag = SORT_STRING -
-bool(true)
-array(12) {
- [0]=>
- string(1) "x"
- [1]=>
- string(2) "ww"
- [2]=>
- string(3) "ttt"
- [3]=>
- string(6) "oraNGe"
- [4]=>
- string(5) "lemoN"
- [5]=>
- string(6) "banana"
- [6]=>
- string(5) "apple"
- [7]=>
- string(1) "X"
- [8]=>
- string(4) "Test"
- [9]=>
- string(4) "TTTT"
- [10]=>
- string(6) "Orange"
- [11]=>
- string(6) "BANANA"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing rsort() : variation ***
-- Iteration 1 --
[11]=>
unicode(6) "BANANA"
}
-Done
\ No newline at end of file
+Done
// an array contains unsorted hexadecimal values
$unsorted_hex_array = array(0x1AB, 0xFFF, 0xF, 0xFF, 0x2AA, 0xBB, 0x1ab, 0xff, -0xFF, 0, -0x2aa);
-echo "\n-- 'flag' value is defualt --\n";
+echo "\n-- 'flag' value is default --\n";
$temp_array = $unsorted_hex_array;
var_dump(rsort($temp_array) );
var_dump($temp_array);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing rsort() : variation ***
--- 'flag' value is defualt --
+-- 'flag' value is default --
bool(true)
array(11) {
[0]=>
int(-682)
}
Done
---UEXPECTF--
-*** Testing rsort() : variation ***
-
--- 'flag' value is defualt --
-bool(true)
-array(11) {
- [0]=>
- int(4095)
- [1]=>
- int(682)
- [2]=>
- int(427)
- [3]=>
- int(427)
- [4]=>
- int(255)
- [5]=>
- int(255)
- [6]=>
- int(187)
- [7]=>
- int(15)
- [8]=>
- int(0)
- [9]=>
- int(-255)
- [10]=>
- int(-682)
-}
-
--- 'flag' value is SORT_REGULAR --
-bool(true)
-array(11) {
- [0]=>
- int(4095)
- [1]=>
- int(682)
- [2]=>
- int(427)
- [3]=>
- int(427)
- [4]=>
- int(255)
- [5]=>
- int(255)
- [6]=>
- int(187)
- [7]=>
- int(15)
- [8]=>
- int(0)
- [9]=>
- int(-255)
- [10]=>
- int(-682)
-}
-
--- 'flag' value is SORT_NUMERIC --
-bool(true)
-array(11) {
- [0]=>
- int(4095)
- [1]=>
- int(682)
- [2]=>
- int(427)
- [3]=>
- int(427)
- [4]=>
- int(255)
- [5]=>
- int(255)
- [6]=>
- int(187)
- [7]=>
- int(15)
- [8]=>
- int(0)
- [9]=>
- int(-255)
- [10]=>
- int(-682)
-}
-Done
\ No newline at end of file
// bool value array
$bool_values = array (true, false, TRUE, FALSE);
-echo "\n-- 'flag' value is defualt --\n";
+echo "\n-- 'flag' value is default --\n";
$temp_array = $bool_values;
var_dump(rsort($temp_array) );
var_dump($temp_array);
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing rsort() : variation ***
--- 'flag' value is defualt --
+-- 'flag' value is default --
bool(true)
array(4) {
[0]=>
bool(false)
}
Done
---UEXPECTF--
-*** Testing rsort() : variation ***
-
--- 'flag' value is defualt --
-bool(true)
-array(4) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- bool(false)
- [3]=>
- bool(false)
-}
-
--- 'flag' value is SORT_REGULAR --
-bool(true)
-array(4) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- bool(false)
- [3]=>
- bool(false)
-}
-
--- 'flag' value is SORT_NUMERIC --
-bool(true)
-array(4) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- bool(false)
- [3]=>
- bool(false)
-}
-
--- 'flag' value is SORT_STRING --
-bool(true)
-array(4) {
- [0]=>
- bool(true)
- [1]=>
- bool(true)
- [2]=>
- bool(false)
- [3]=>
- bool(false)
-}
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing rsort() : variation ***
-- Iteration 1 --
}
}
Done
---UEXPECTF--
-*** Testing rsort() : variation ***
-
--- Iteration 1 --
-
--- 'flag' value is default --
-bool(true)
-array(0) {
-}
-
--- 'flag' value is SORT_REGULAR --
-bool(true)
-array(0) {
-}
-
--- Iteration 2 --
-
--- 'flag' value is default --
-bool(true)
-array(1) {
- [0]=>
- array(0) {
- }
-}
-
--- 'flag' value is SORT_REGULAR --
-bool(true)
-array(1) {
- [0]=>
- array(0) {
- }
-}
-
--- Iteration 3 --
-
--- 'flag' value is default --
-bool(true)
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(64)
- [1]=>
- int(61)
- }
- [1]=>
- int(44)
- [2]=>
- int(11)
-}
-
--- 'flag' value is SORT_REGULAR --
-bool(true)
-array(3) {
- [0]=>
- array(2) {
- [0]=>
- int(64)
- [1]=>
- int(61)
- }
- [1]=>
- int(44)
- [2]=>
- int(11)
-}
-
--- Iteration 4 --
-
--- 'flag' value is default --
-bool(true)
-array(4) {
- [0]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
- [1]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- [2]=>
- array(1) {
- [0]=>
- int(11)
- }
- [3]=>
- array(0) {
- }
-}
-
--- 'flag' value is SORT_REGULAR --
-bool(true)
-array(4) {
- [0]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
- [1]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- [2]=>
- array(1) {
- [0]=>
- int(11)
- }
- [3]=>
- array(0) {
- }
-}
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
-*** Testing rsort() : variation ***
-
--- Iteration 1 --
--- Sort flag = default --
-bool(true)
-array(5) {
- [0]=>
- int(66)
- [1]=>
- int(55)
- [2]=>
- int(33)
- [3]=>
- int(22)
- [4]=>
- int(11)
-}
--- Sort flag = SORT_REGULAR --
-bool(true)
-array(5) {
- [0]=>
- int(66)
- [1]=>
- int(55)
- [2]=>
- int(33)
- [3]=>
- int(22)
- [4]=>
- int(11)
-}
-
--- Iteration 2 --
--- Sort flag = default --
-bool(true)
-array(3) {
- [0]=>
- array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- }
- [1]=>
- array(3) {
- [0]=>
- string(5) "first"
- [5]=>
- string(6) "second"
- [6]=>
- string(5) "third"
- }
- [2]=>
- array(3) {
- ["a"]=>
- string(6) "orange"
- ["b"]=>
- string(6) "banana"
- ["c"]=>
- string(5) "apple"
- }
-}
--- Sort flag = SORT_REGULAR --
-bool(true)
-array(3) {
- [0]=>
- array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- }
- [1]=>
- array(3) {
- [0]=>
- string(5) "first"
- [5]=>
- string(6) "second"
- [6]=>
- string(5) "third"
- }
- [2]=>
- array(3) {
- ["a"]=>
- string(6) "orange"
- ["b"]=>
- string(6) "banana"
- ["c"]=>
- string(5) "apple"
- }
-}
-
--- Iteration 3 --
--- Sort flag = default --
-bool(true)
-array(6) {
- [0]=>
- int(19)
- [1]=>
- int(13)
- [2]=>
- int(1)
- [3]=>
- int(1)
- [4]=>
- int(1)
- [5]=>
- int(1)
-}
--- Sort flag = SORT_REGULAR --
-bool(true)
-array(6) {
- [0]=>
- int(19)
- [1]=>
- int(13)
- [2]=>
- int(1)
- [3]=>
- int(1)
- [4]=>
- int(1)
- [5]=>
- int(1)
-}
-
--- Iteration 4 --
--- Sort flag = default --
-bool(true)
-array(2) {
- [0]=>
- int(1)
- [1]=>
- string(3) "baz"
-}
--- Sort flag = SORT_REGULAR --
-bool(true)
-array(2) {
- [0]=>
- int(1)
- [1]=>
- string(3) "baz"
-}
-
--- Iteration 5 --
--- Sort flag = default --
-bool(true)
-array(4) {
- [0]=>
- array(2) {
- ["e"]=>
- int(2)
- ["f"]=>
- int(3)
- }
- [1]=>
- array(1) {
- ["g"]=>
- int(4)
- }
- [2]=>
- int(5)
- [3]=>
- int(1)
-}
--- Sort flag = SORT_REGULAR --
-bool(true)
-array(4) {
- [0]=>
- array(2) {
- ["e"]=>
- int(2)
- ["f"]=>
- int(3)
- }
- [1]=>
- array(1) {
- ["g"]=>
- int(4)
- }
- [2]=>
- int(5)
- [3]=>
- int(1)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing rsort() : variation ***
-- Iteration 1 --
[3]=>
int(1)
}
-Done
\ No newline at end of file
+Done
int(%d)
}
--- input array of strings before shuffle() function is applied --
-array(9) {
- [0]=>
- string(3) "one"
- [1]=>
- string(3) "two"
- [2]=>
- string(5) "three"
- [3]=>
- string(4) "four"
- [4]=>
- string(4) "five"
- [5]=>
- string(1) " "
- [6]=>
- string(3) "six"
- [7]=>
- string(1) " "
- [8]=>
- string(5) "seven"
-}
-
--- return value from shuffle() function --
-bool(true)
-
--- resultant array after shuffle() function is applied --
-array(9) {
- [0]=>
- string(%d) "%s"
- [1]=>
- string(%d) "%s"
- [2]=>
- string(%d) "%s"
- [3]=>
- string(%d) "%s"
- [4]=>
- string(%d) "%s"
- [5]=>
- string(%d) "%s"
- [6]=>
- string(%d) "%s"
- [7]=>
- string(%d) "%s"
- [8]=>
- string(%d) "%s"
-}
-Done
-
---UEXPECTF--
-*** Testing shuffle() : with arrays having default keys ***
-
--- input array of integers before shuffle() function is applied --
-array(9) {
- [0]=>
- int(0)
- [1]=>
- int(10)
- [2]=>
- int(20)
- [3]=>
- int(30)
- [4]=>
- int(40)
- [5]=>
- int(50)
- [6]=>
- int(60)
- [7]=>
- int(70)
- [8]=>
- int(80)
-}
-
--- return value from shuffle() function --
-bool(true)
-
--- resultant array after shuffle() function is applied --
-array(9) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- [3]=>
- int(%d)
- [4]=>
- int(%d)
- [5]=>
- int(%d)
- [6]=>
- int(%d)
- [7]=>
- int(%d)
- [8]=>
- int(%d)
-}
-
-- input array of strings before shuffle() function is applied --
array(9) {
[0]=>
--EXPECTF--
*** Testing shuffle() : with associative array ***
--- input array before shuffle() function is applied --
-array(9) {
- ["one"]=>
- int(1)
- [2]=>
- int(2)
- ["three"]=>
- int(3)
- [4]=>
- int(4)
- ["#5"]=>
- int(5)
- ["SIX"]=>
- int(6)
- ["seven"]=>
- int(7)
- ["#8"]=>
- int(10)
- ["nine"]=>
- int(9)
-}
-
--- return value from shuffle() function --
-bool(true)
-
--- resultant array after shuffle() function is applied --
-array(9) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- [3]=>
- int(%d)
- [4]=>
- int(%d)
- [5]=>
- int(%d)
- [6]=>
- int(%d)
- [7]=>
- int(%d)
- [8]=>
- int(%d)
-}
-Done
-
---UEXPECTF--
-*** Testing shuffle() : with associative array ***
-
-- input array before shuffle() function is applied --
array(9) {
[u"one"]=>
Warning: shuffle() expects exactly 1 parameter, 2 given in %s on line %d
bool(false)
--- original input array --
-array(2) {
- [0]=>
- int(1)
- ["two"]=>
- int(2)
-}
-Done
-
---UEXPECTF--
-*** Testing shuffle() : error conditions ***
-
--- Testing shuffle() function with Zero arguments --
-
-Warning: shuffle() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing shuffle() function with more than expected no. of arguments --
-
-Warning: shuffle() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-- original input array --
array(2) {
[0]=>
-- Iteration 16 --
-Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
--- Iteration 17 --
-
-Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
--- Iteration 18 --
-
-Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
--- Iteration 19 --
-
-Warning: shuffle() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
--- Iteration 20 --
-
-Warning: shuffle() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
--- Iteration 21 --
-
-Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
--- Iteration 22 --
-
-Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
--- Iteration 23 --
-
-Warning: shuffle() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Done
-
---UEXPECTF--
-*** Testing shuffle() : with unexpected values for 'array_arg' argument ***
-
--- Iteration 1 --
-
-Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
--- Iteration 2 --
-
-Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
--- Iteration 3 --
-
-Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
--- Iteration 4 --
-
-Warning: shuffle() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
--- Iteration 5 --
-
-Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
--- Iteration 6 --
-
-Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
--- Iteration 7 --
-
-Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
--- Iteration 8 --
-
-Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
--- Iteration 9 --
-
-Warning: shuffle() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
--- Iteration 10 --
-
-Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
--- Iteration 11 --
-
-Warning: shuffle() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
--- Iteration 12 --
-
-Warning: shuffle() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
--- Iteration 13 --
-
-Warning: shuffle() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
--- Iteration 14 --
-
-Warning: shuffle() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
--- Iteration 15 --
-
-Warning: shuffle() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
--- Iteration 16 --
-
Warning: shuffle() expects parameter 1 to be array, Unicode string given in %s on line %d
bool(false)
int(%d)
}
Done
-
---UEXPECTF--
-*** Testing shuffle() : with multi-dimensional array ***
-bool(true)
-
-The output array is:
-array(7) {
- [0]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- }
- [1]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- }
- [2]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- }
- [3]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- }
- [4]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- }
- [5]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- }
- [6]=>
- array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- }
-}
-
-*** Testing shuffle() with arrays having different types of values ***
-
--- Iteration 1 --
-bool(true)
-
-The output array is:
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
--- Iteration 2 --
-bool(true)
-
-The output array is:
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
--- Iteration 3 --
-bool(true)
-
-The output array is:
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
--- Iteration 4 --
-bool(true)
-
-The output array is:
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
--- Iteration 5 --
-bool(true)
-
-The output array is:
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
--- Iteration 6 --
-bool(true)
-
-The output array is:
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-
--- Iteration 7 --
-bool(true)
-
-The output array is:
-array(3) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
-}
-Done
-- Iteration 5 --
bool(true)
-The output array is:
-array(5) {
- [0]=>
- string(%d) "%s"
- [1]=>
- string(%d) "%s"
- [2]=>
- string(%d) "%s"
- [3]=>
- string(%d) "%s"
- [4]=>
- string(%d) "%s"
-}
-
--- Iteration 6 --
-bool(true)
-
-The output array is:
-array(4) {
- [0]=>
- bool(%s)
- [1]=>
- bool(%s)
- [2]=>
- bool(%s)
- [3]=>
- bool(%s)
-}
-
--- Iteration 7 --
-bool(true)
-
-The output array is:
-array(6) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- [3]=>
- int(%d)
- [4]=>
- int(%d)
- [5]=>
- int(%d)
-}
-
--- Iteration 8 --
-bool(true)
-
-The output array is:
-array(5) {
- [0]=>
- int(-%d)
- [1]=>
- int(-%d)
- [2]=>
- int(-%d)
- [3]=>
- int(-%d)
- [4]=>
- int(-%d)
-}
-
--- Iteration 9 --
-bool(true)
-
-The output array is:
-array(4) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- [3]=>
- int(%d)
-}
-
--- Iteration 10 --
-bool(true)
-
-The output array is:
-array(3) {
- [0]=>
- int(-%d)
- [1]=>
- int(-%d)
- [2]=>
- int(-%d)
-}
-Done
-
---UEXPECTF--
-*** Testing shuffle() : arrays with diff types of values ***
-
-*** Testing shuffle() with arrays having different types of values ***
-
--- Iteration 1 --
-bool(true)
-
-The output array is:
-array(4) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- [3]=>
- int(%d)
-}
-
--- Iteration 2 --
-bool(true)
-
-The output array is:
-array(3) {
- [0]=>
- int(-%d)
- [1]=>
- int(-%d)
- [2]=>
- int(-%d)
-}
-
--- Iteration 3 --
-bool(true)
-
-The output array is:
-array(7) {
- [0]=>
- float(%f)
- [1]=>
- float(%f)
- [2]=>
- float(%f)
- [3]=>
- float(%f)
- [4]=>
- float(%f)
- [5]=>
- float(%f)
- [6]=>
- float(%f)
-}
-
--- Iteration 4 --
-bool(true)
-
-The output array is:
-array(6) {
- [0]=>
- float(-%f)
- [1]=>
- float(-%f)
- [2]=>
- float(-%f)
- [3]=>
- float(-%f)
- [4]=>
- float(-%f)
- [5]=>
- float(-%f)
-}
-
--- Iteration 5 --
-bool(true)
-
The output array is:
array(5) {
[0]=>
-- Iteration 5 --
bool(true)
-The output array is:
-array(4) {
- [0]=>
- string(%d) "%s"
- [1]=>
- string(%d) "%s"
- [2]=>
- string(%d) "%s"
- [3]=>
- string(%d) "%s"
-}
-
--- Iteration 6 --
-bool(true)
-
-The output array is:
-array(2) {
- [0]=>
- bool(%s)
- [1]=>
- bool(%s)
-}
-
--- Iteration 7 --
-bool(true)
-
-The output array is:
-array(4) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- [3]=>
- int(%d)
-}
-
--- Iteration 8 --
-bool(true)
-
-The output array is:
-array(4) {
- [0]=>
- int(-%d)
- [1]=>
- int(-%d)
- [2]=>
- int(-%d)
- [3]=>
- int(-%d)
-}
-
--- Iteration 9 --
-bool(true)
-
-The output array is:
-array(4) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- [3]=>
- int(%d)
-}
-
--- Iteration 10 --
-bool(true)
-
-The output array is:
-array(3) {
- [0]=>
- int(-%d)
- [1]=>
- int(-%d)
- [2]=>
- int(-%d)
-}
-
--- Iteration 11 --
-bool(true)
-
-The output array is:
-array(3) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- NULL
-}
-Done
-
---UEXPECTF--
-*** Testing shuffle() : associative arrays with diff types of values ***
-
-*** Testing shuffle() with arrays having different types of values ***
-
--- Iteration 1 --
-bool(true)
-
-The output array is:
-array(4) {
- [0]=>
- int(%d)
- [1]=>
- int(%d)
- [2]=>
- int(%d)
- [3]=>
- int(%d)
-}
-
--- Iteration 2 --
-bool(true)
-
-The output array is:
-array(3) {
- [0]=>
- int(-%d)
- [1]=>
- int(-%d)
- [2]=>
- int(-%d)
-}
-
--- Iteration 3 --
-bool(true)
-
-The output array is:
-array(5) {
- [0]=>
- float(%f)
- [1]=>
- float(%f)
- [2]=>
- float(%f)
- [3]=>
- float(%f)
- [4]=>
- float(%f)
-}
-
--- Iteration 4 --
-bool(true)
-
-The output array is:
-array(5) {
- [0]=>
- float(-%f)
- [1]=>
- float(-%f)
- [2]=>
- float(-%f)
- [3]=>
- float(-%f)
- [4]=>
- float(-%f)
-}
-
--- Iteration 5 --
-bool(true)
-
The output array is:
array(4) {
[0]=>
-- with array of heredoc strings --
bool\(true\)
-The output array is:
-array\(6\) {
- \[0\]=>
- string\([0-9]*\) "[0-9 a-z \n \0 \t]*"
- \[1\]=>
- string\([0-9]*\) "[0-9 a-z \n \0 \t]*"
- \[2\]=>
- string\([0-9]*\) "[0-9 a-z \n \0 \t]*"
- \[3\]=>
- string\([0-9]*\) "[0-9 a-z \n \0 \t]*"
- \[4\]=>
- string\([0-9]*\) "[0-9 a-z \n \0 \t]*"
- \[5\]=>
- string\([0-9]*\) "[0-9 a-z \n \0 \t]*"
-}
-
--- with array having heredoc strings as keys --
-bool\(true\)
-
-The output array is:
-array\(6\) {
- \[0\]=>
- string\(8\) "[heredoc 1-5]*"
- \[1\]=>
- string\(8\) "[heredoc 1-5]*"
- \[2\]=>
- string\(8\) "[heredoc 1-5]*"
- \[3\]=>
- string\(8\) "[heredoc 1-5]*"
- \[4\]=>
- string\(8\) "[heredoc 1-5]*"
- \[5\]=>
- string\(8\) "[heredoc 1-5]*"
-}
-Done
-
---UEXPECTREGEX--
-\*\*\* Testing shuffle\(\) : with array containing heredoc strings \*\*\*
-
--- with array of heredoc strings --
-bool\(true\)
-
The output array is:
array\(6\) {
\[0\]=>
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing sizeof() : basic functionality ***
-- Testing sizeof() for integer type in default, COUNT_NORMAL and COUNT_RECURSIVE modes --
default mode: int(1)
COUNT_RECURSIVE mode: int(1)
Done
---UEXPECTF--
-*** Testing sizeof() : basic functionality ***
--- Testing sizeof() for integer type in default, COUNT_NORMAL and COUNT_RECURSIVE modes --
-default mode: int(1)
-
-COUNT_NORMAL mode: int(1)
-
-COUNT_RECURSIVE mode: int(1)
-
--- Testing sizeof() for float type in default, COUNT_NORMAL and COUNT_RECURSIVE modes --
-default mode: int(1)
-
-COUNT_NORMAL mode: int(1)
-
-COUNT_RECURSIVE mode: int(1)
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing sizeof() : basic functionality ***
-- Testing sizeof() with integer array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --
default mode: int(4)
COUNT_RECURSIVE mode: int(5)
Done
---UEXPECTF--
-*** Testing sizeof() : basic functionality ***
--- Testing sizeof() with integer array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --
-default mode: int(4)
-
-COUNT_NORMAL mode: int(4)
-
-COUNT_RECURSIVE mode: int(4)
-
--- Testing sizeof() with string array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --
-default mode: int(3)
-
-COUNT_NORMAL mode: int(3)
-
-COUNT_RECURSIVE mode: int(3)
-
--- Testing sizeof() with indexed array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --
-default mode: int(3)
-
-COUNT_NORMAL mode: int(3)
-
-COUNT_RECURSIVE mode: int(3)
-
--- Testing sizeof() with mixed array in default, COUNT_NORMAL, COUNT_RECURSIVE modes --
-default mode: int(5)
-
-COUNT_NORMAL mode: int(5)
-
-COUNT_RECURSIVE mode: int(5)
-Done
\ No newline at end of file
Warning: sizeof() expects at most 2 parameters, 3 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing sizeof() : error conditions ***
--- Testing sizeof() with zero arguments --
-
-Warning: sizeof() expects at least 1 parameter, 0 given in %s on line %d
-NULL
--- Testing sizeof() function with more than two arguments under COUNT_NORMAL mode --
-
-Warning: sizeof() expects at most 2 parameters, 3 given in %s on line %d
-NULL
--- Testing sizeof() function with more than two arguments under COUNT_RECURSIVE mode --
-
-Warning: sizeof() expects at most 2 parameters, 3 given in %s on line %d
-NULL
-Done
echo "Done";
?>
---EXPECTF--
-*** Testing sizeof() with object functionality ***
--- Testing sizeof() with an object which implements Countable interface --
--- Testing sizeof() in default mode --
-int(3)
--- Testing sizeof() in COUNT_NORMAL mode --
-int(3)
--- Testing sizeof() in COUNT_RECURSIVE mode --
-int(3)
-Done
---UEXPECTF--
+--EXPECT--
*** Testing sizeof() with object functionality ***
-- Testing sizeof() with an object which implements Countable interface --
-- Testing sizeof() in default mode --
echo "Done";
?>
---EXPECTF--
-*** Testing sizeof() : object functionality ***
---- Testing sizeof() with objects which doesn't implement Countable interface ---
--- Iteration 1 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 2 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 3 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 4 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 5 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
-Done
---UEXPECTF--
+--EXPECT--
*** Testing sizeof() : object functionality ***
--- Testing sizeof() with objects which doesn't implement Countable interface ---
-- Iteration 1 --
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing sizeof() : usage variations ***
--- Testing sizeof() for all scalar types in default,COUNT_NORMAL and COUNT_RECURSIVE mode ---
-- Iteration 1 --
COUNT_RECURSIVE Mode: int(1)
Done
---UEXPECTF--
-*** Testing sizeof() : usage variations ***
---- Testing sizeof() for all scalar types in default,COUNT_NORMAL and COUNT_RECURSIVE mode ---
--- Iteration 1 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 2 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 3 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 4 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 5 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 6 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 7 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 8 --
-Default Mode: int(0)
-
-COUNT_NORMAL Mode: int(0)
-
-COUNT_RECURSIVE Mode: int(0)
-
--- Iteration 9 --
-Default Mode: int(0)
-
-COUNT_NORMAL Mode: int(0)
-
-COUNT_RECURSIVE Mode: int(0)
-
--- Iteration 10 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 11 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 12 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 13 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 14 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 15 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 16 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 17 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
--- Iteration 18 --
-Default Mode: int(0)
-
-COUNT_NORMAL Mode: int(0)
-
-COUNT_RECURSIVE Mode: int(0)
-
--- Iteration 19 --
-Default Mode: int(1)
-
-COUNT_NORMAL Mode: int(1)
-
-COUNT_RECURSIVE Mode: int(1)
-
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing sizeof() : usage variations ***
--- Testing sizeof() with different array values for 'var' argument ---
-- Iteration 1 --
COUNT_RECURSIVE Mode: int(6)
Done
---UEXPECTF--
-*** Testing sizeof() : usage variations ***
---- Testing sizeof() with different array values for 'var' argument ---
--- Iteration 1 --
-Default Mode: int(2)
-
-COUNT_NORMAL Mode: int(2)
-
-COUNT_RECURSIVE Mode: int(2)
-
--- Iteration 2 --
-Default Mode: int(2)
-
-COUNT_NORMAL Mode: int(2)
-
-COUNT_RECURSIVE Mode: int(8)
-
--- Iteration 3 --
-Default Mode: int(3)
-
-COUNT_NORMAL Mode: int(3)
-
-COUNT_RECURSIVE Mode: int(6)
-
--- Iteration 4 --
-Default Mode: int(0)
-
-COUNT_NORMAL Mode: int(0)
-
-COUNT_RECURSIVE Mode: int(0)
-
--- Iteration 5 --
-Default Mode: int(4)
-
-COUNT_NORMAL Mode: int(4)
-
-COUNT_RECURSIVE Mode: int(4)
-
--- Iteration 6 --
-Default Mode: int(3)
-
-COUNT_NORMAL Mode: int(3)
-
-COUNT_RECURSIVE Mode: int(3)
-
--- Iteration 7 --
-Default Mode: int(3)
-
-COUNT_NORMAL Mode: int(3)
-
-COUNT_RECURSIVE Mode: int(3)
-
--- Iteration 8 --
-Default Mode: int(2)
-
-COUNT_NORMAL Mode: int(2)
-
-COUNT_RECURSIVE Mode: int(2)
-
--- Iteration 9 --
-Default Mode: int(2)
-
-COUNT_NORMAL Mode: int(2)
-
-COUNT_RECURSIVE Mode: int(2)
-
--- Iteration 10 --
-Default Mode: int(2)
-
-COUNT_NORMAL Mode: int(2)
-
-COUNT_RECURSIVE Mode: int(2)
-
--- Iteration 11 --
-Default Mode: int(2)
-
-COUNT_NORMAL Mode: int(2)
-
-COUNT_RECURSIVE Mode: int(2)
-
--- Iteration 12 --
-Default Mode: int(2)
-
-COUNT_NORMAL Mode: int(2)
-
-COUNT_RECURSIVE Mode: int(2)
-
--- Iteration 13 --
-Default Mode: int(4)
-
-COUNT_NORMAL Mode: int(4)
-
-COUNT_RECURSIVE Mode: int(4)
-
--- Iteration 14 --
-Default Mode: int(4)
-
-COUNT_NORMAL Mode: int(4)
-
-COUNT_RECURSIVE Mode: int(6)
-
-Done
\ No newline at end of file
echo "Done";
?>
---EXPECTF--
+--EXPECT--
*** Testing sizeof() : usage variations ***
-- Testing sizeof() for infinite recursion with arrays as argument in COUNT_RECURSIVE mode --
int(13)
int(2)
Done
---UEXPECTF--
-*** Testing sizeof() : usage variations ***
--- Testing sizeof() for infinite recursion with arrays as argument in COUNT_RECURSIVE mode --
-int(13)
-
-int(2)
-Done
\ No newline at end of file
int(0)
Done
---UEXPECTF--
-*** Testing sizeof() : usage variations ***
---- Testing sizeof() for all kinds of unset variables in default, Normal and Recursive Modes ---
--- Iteration 1 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 2 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 3 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 4 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 5 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 6 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 7 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 8 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 9 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 10 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 11 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 12 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 13 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 14 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 15 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 16 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 17 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 18 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 19 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
--- Iteration 20 --
-Default Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_NORMAL Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-COUNT_RECURSIVE Mode:
-Notice: Undefined variable: value in %s on line %d
-int(0)
-
-Done
int(6)
-- Iteration 16 --
-Warning: sizeof() expects parameter 2 to be long, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: sizeof() expects parameter 2 to be long, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: sizeof() expects parameter 2 to be long, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: sizeof() expects parameter 2 to be long, string given in %s on line %d
-NULL
--- Iteration 20 --
-int(6)
--- Iteration 21 --
-
-Warning: sizeof() expects parameter 2 to be long, object given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: sizeof() expects parameter 2 to be long, resource given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing sizeof() : usage variations ***
---- Testing sizeof() with different values for 'mode' argument ---
--- Iteration 1 --
-int(6)
--- Iteration 2 --
-int(9)
--- Iteration 3 --
-int(6)
--- Iteration 4 --
-int(9)
--- Iteration 5 --
-int(9)
--- Iteration 6 --
-int(9)
--- Iteration 7 --
-int(6)
--- Iteration 8 --
-int(6)
--- Iteration 9 --
-int(6)
--- Iteration 10 --
-int(6)
--- Iteration 11 --
-int(6)
--- Iteration 12 --
-int(6)
--- Iteration 13 --
-int(6)
--- Iteration 14 --
-int(6)
--- Iteration 15 --
-int(6)
--- Iteration 16 --
-
Warning: sizeof() expects parameter 2 to be long, Unicode string given in %s on line %d
NULL
-- Iteration 17 --
/*
* Testing sort() by providing arrays with default keys and assoc arrays
* to check the basic functionality with following flag values.
- * flag value as defualt
+ * flag value as default
* SORT_REGULAR - compare items normally
* SORT_NUMERIC - compare items numerically
* SORT_STRING - compare items as strings
// array with default keys containing unsorted numeric values
$unsorted_numerics = array( 100, 33, 555, 22 );
-echo "\n-- Testing sort() by supplying string array, 'flag' value is defualt --\n";
+echo "\n-- Testing sort() by supplying string array, 'flag' value is default --\n";
$temp_array = $unsorted_strings;
var_dump( sort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
-echo "\n-- Testing sort() by supplying numeric array, 'flag' value is defualt --\n";
+echo "\n-- Testing sort() by supplying numeric array, 'flag' value is default --\n";
$temp_array = $unsorted_numerics;
var_dump( sort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing sort() : basic functionality ***
--- Testing sort() by supplying string array, 'flag' value is defualt --
-bool(true)
-array(3) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(5) "lemon"
- [2]=>
- string(6) "orange"
-}
-
--- Testing sort() by supplying numeric array, 'flag' value is defualt --
-bool(true)
-array(4) {
- [0]=>
- int(22)
- [1]=>
- int(33)
- [2]=>
- int(100)
- [3]=>
- int(555)
-}
-
--- Testing sort() by supplying string array, 'flag' = SORT_REGULAR --
-bool(true)
-array(3) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(5) "lemon"
- [2]=>
- string(6) "orange"
-}
-
--- Testing sort() by supplying numeric array, 'flag' = SORT_REGULAR --
-bool(true)
-array(4) {
- [0]=>
- int(22)
- [1]=>
- int(33)
- [2]=>
- int(100)
- [3]=>
- int(555)
-}
-
--- Testing sort() by supplying string array, 'flag' = SORT_STRING --
-bool(true)
-array(3) {
- [0]=>
- string(6) "banana"
- [1]=>
- string(5) "lemon"
- [2]=>
- string(6) "orange"
-}
-
--- Testing sort() by supplying numeric array, 'flag' = SORT_NUMERIC --
-bool(true)
-array(4) {
- [0]=>
- int(22)
- [1]=>
- int(33)
- [2]=>
- int(100)
- [3]=>
- int(555)
-}
-Done
---UEXPECTF--
-*** Testing sort() : basic functionality ***
-
--- Testing sort() by supplying string array, 'flag' value is defualt --
+-- Testing sort() by supplying string array, 'flag' value is default --
bool(true)
array(3) {
[0]=>
unicode(6) "orange"
}
--- Testing sort() by supplying numeric array, 'flag' value is defualt --
+-- Testing sort() by supplying numeric array, 'flag' value is default --
bool(true)
array(4) {
[0]=>
int(2)
}
Done
---UEXPECTF--
-*** Testing sort() : error conditions ***
-
--- Testing sort() function with Zero arguments --
-
-Warning: sort() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
--- Testing sort() function with more than expected no. of arguments --
-
-Sort flag = SORT_REGULAR
-
-Warning: sort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
-Sort flag = SORT_STRING
-
-Warning: sort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-
-Sort flag = SORT_NUMERIC
-
-Warning: sort() expects at most 2 parameters, 3 given in %s on line %d
-bool(false)
-array(2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
-}
-Done
* Source code: ext/standard/array.c
*/
/*
- * testing sort() by providing integer/string object arrays with flag values are defualt, SORT_REGULAR
+ * testing sort() by providing integer/string object arrays with flag values are default, SORT_REGULAR
*/
echo "*** Testing sort() : object functionality ***\n";
);
-echo "\n-- Testing sort() by supplying various object arrays, 'flag' value is defualt --\n";
+echo "\n-- Testing sort() by supplying various object arrays, 'flag' value is default --\n";
-// testing sort() function by supplying integer object array, flag value is defualt
+// testing sort() function by supplying integer object array, flag value is default
$temp_array = $unsorted_int_obj;
var_dump(sort($temp_array) );
var_dump($temp_array);
-// testing sort() function by supplying string object array, flag value is defualt
+// testing sort() function by supplying string object array, flag value is default
$temp_array = $unsorted_str_obj;
var_dump(sort($temp_array) );
var_dump($temp_array);
--EXPECTF--
*** Testing sort() : object functionality ***
--- Testing sort() by supplying various object arrays, 'flag' value is defualt --
-bool(true)
-array(6) {
- [0]=>
- object(for_integer_sort)#%d (1) {
- ["class_value"]=>
- int(-5)
- }
- [1]=>
- object(for_integer_sort)#%d (1) {
- ["class_value"]=>
- int(0)
- }
- [2]=>
- object(for_integer_sort)#%d (1) {
- ["class_value"]=>
- float(0.001)
- }
- [3]=>
- object(for_integer_sort)#%d (1) {
- ["class_value"]=>
- int(11)
- }
- [4]=>
- object(for_integer_sort)#%d (1) {
- ["class_value"]=>
- int(23)
- }
- [5]=>
- object(for_integer_sort)#%d (1) {
- ["class_value"]=>
- int(66)
- }
-}
-bool(true)
-array(8) {
- [0]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(5) "Lemon"
- }
- [1]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(6) "Orange"
- }
- [2]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(5) "aPPle"
- }
- [3]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(5) "apple"
- }
- [4]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(3) "axx"
- }
- [5]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(2) "py"
- }
- [6]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(1) "t"
- }
- [7]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(1) "w"
- }
-}
-
--- Testing sort() by supplying various object arrays, 'flag' value is SORT_REGULAR --
-bool(true)
-array(6) {
- [0]=>
- object(for_integer_sort)#%d (1) {
- ["class_value"]=>
- int(-5)
- }
- [1]=>
- object(for_integer_sort)#%d (1) {
- ["class_value"]=>
- int(0)
- }
- [2]=>
- object(for_integer_sort)#%d (1) {
- ["class_value"]=>
- float(0.001)
- }
- [3]=>
- object(for_integer_sort)#%d (1) {
- ["class_value"]=>
- int(11)
- }
- [4]=>
- object(for_integer_sort)#%d (1) {
- ["class_value"]=>
- int(23)
- }
- [5]=>
- object(for_integer_sort)#%d (1) {
- ["class_value"]=>
- int(66)
- }
-}
-bool(true)
-array(8) {
- [0]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(5) "Lemon"
- }
- [1]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(6) "Orange"
- }
- [2]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(5) "aPPle"
- }
- [3]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(5) "apple"
- }
- [4]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(3) "axx"
- }
- [5]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(2) "py"
- }
- [6]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(1) "t"
- }
- [7]=>
- object(for_string_sort)#%d (1) {
- ["class_value"]=>
- string(1) "w"
- }
-}
-Done
---UEXPECTF--
-*** Testing sort() : object functionality ***
-
--- Testing sort() by supplying various object arrays, 'flag' value is defualt --
+-- Testing sort() by supplying various object arrays, 'flag' value is default --
bool(true)
array(6) {
[0]=>
*/
/*
- * testing sort() by providing integer/string object arrays with flag values are defualt, SORT_REGULAR
+ * testing sort() by providing integer/string object arrays with flag values are default, SORT_REGULAR
*/
echo "*** Testing sort() : object functionality ***\n";
);
-echo "\n-- Testing sort() by supplying various object arrays, 'flag' value is defualt --\n";
+echo "\n-- Testing sort() by supplying various object arrays, 'flag' value is default --\n";
-// testing sort() function by supplying integer object array, flag value is defualt
+// testing sort() function by supplying integer object array, flag value is default
$temp_array = $unsorted_int_obj;
var_dump(sort($temp_array) );
var_dump($temp_array);
-// testing sort() function by supplying string object array, flag value is defualt
+// testing sort() function by supplying string object array, flag value is default
$temp_array = $unsorted_str_obj;
var_dump(sort($temp_array) );
var_dump($temp_array);
--EXPECTF--
*** Testing sort() : object functionality ***
--- Testing sort() by supplying various object arrays, 'flag' value is defualt --
-bool(true)
-array(4) {
- [0]=>
- object(for_integer_sort)#%d (3) {
- ["public_class_value"]=>
- int(-88)
- ["private_class_value":"for_integer_sort":private]=>
- int(-5)
- ["protected_class_value":protected]=>
- int(5)
- }
- [1]=>
- object(for_integer_sort)#%d (3) {
- ["public_class_value"]=>
- float(0.001)
- ["private_class_value":"for_integer_sort":private]=>
- float(99.5)
- ["protected_class_value":protected]=>
- float(0.1)
- }
- [2]=>
- object(for_integer_sort)#%d (3) {
- ["public_class_value"]=>
- int(11)
- ["private_class_value":"for_integer_sort":private]=>
- int(33)
- ["protected_class_value":protected]=>
- int(30)
- }
- [3]=>
- object(for_integer_sort)#%d (3) {
- ["public_class_value"]=>
- int(66)
- ["private_class_value":"for_integer_sort":private]=>
- int(44)
- ["protected_class_value":protected]=>
- int(4)
- }
-}
-bool(true)
-array(4) {
- [0]=>
- object(for_string_sort)#%d (3) {
- ["public_class_value"]=>
- string(3) "axx"
- ["private_class_value":"for_string_sort":private]=>
- string(3) "AXX"
- ["protected_class_value":protected]=>
- string(3) "ass"
- }
- [1]=>
- object(for_string_sort)#%d (3) {
- ["public_class_value"]=>
- string(2) "py"
- ["private_class_value":"for_string_sort":private]=>
- string(2) "PY"
- ["protected_class_value":protected]=>
- string(2) "pt"
- }
- [2]=>
- object(for_string_sort)#%d (3) {
- ["public_class_value"]=>
- string(1) "t"
- ["private_class_value":"for_string_sort":private]=>
- string(3) "eee"
- ["protected_class_value":protected]=>
- string(3) "abb"
- }
- [3]=>
- object(for_string_sort)#%d (3) {
- ["public_class_value"]=>
- string(1) "w"
- ["private_class_value":"for_string_sort":private]=>
- string(1) "W"
- ["protected_class_value":protected]=>
- string(1) "c"
- }
-}
-
--- Testing sort() by supplying various object arrays, 'flag' value is SORT_REGULAR --
-bool(true)
-array(4) {
- [0]=>
- object(for_integer_sort)#%d (3) {
- ["public_class_value"]=>
- int(-88)
- ["private_class_value":"for_integer_sort":private]=>
- int(-5)
- ["protected_class_value":protected]=>
- int(5)
- }
- [1]=>
- object(for_integer_sort)#%d (3) {
- ["public_class_value"]=>
- float(0.001)
- ["private_class_value":"for_integer_sort":private]=>
- float(99.5)
- ["protected_class_value":protected]=>
- float(0.1)
- }
- [2]=>
- object(for_integer_sort)#%d (3) {
- ["public_class_value"]=>
- int(11)
- ["private_class_value":"for_integer_sort":private]=>
- int(33)
- ["protected_class_value":protected]=>
- int(30)
- }
- [3]=>
- object(for_integer_sort)#%d (3) {
- ["public_class_value"]=>
- int(66)
- ["private_class_value":"for_integer_sort":private]=>
- int(44)
- ["protected_class_value":protected]=>
- int(4)
- }
-}
-bool(true)
-array(4) {
- [0]=>
- object(for_string_sort)#%d (3) {
- ["public_class_value"]=>
- string(3) "axx"
- ["private_class_value":"for_string_sort":private]=>
- string(3) "AXX"
- ["protected_class_value":protected]=>
- string(3) "ass"
- }
- [1]=>
- object(for_string_sort)#%d (3) {
- ["public_class_value"]=>
- string(2) "py"
- ["private_class_value":"for_string_sort":private]=>
- string(2) "PY"
- ["protected_class_value":protected]=>
- string(2) "pt"
- }
- [2]=>
- object(for_string_sort)#%d (3) {
- ["public_class_value"]=>
- string(1) "t"
- ["private_class_value":"for_string_sort":private]=>
- string(3) "eee"
- ["protected_class_value":protected]=>
- string(3) "abb"
- }
- [3]=>
- object(for_string_sort)#%d (3) {
- ["public_class_value"]=>
- string(1) "w"
- ["private_class_value":"for_string_sort":private]=>
- string(1) "W"
- ["protected_class_value":protected]=>
- string(1) "c"
- }
-}
-Done
---UEXPECTF--
-*** Testing sort() : object functionality ***
-
--- Testing sort() by supplying various object arrays, 'flag' value is defualt --
+-- Testing sort() by supplying various object arrays, 'flag' value is default --
bool(true)
array(4) {
[0]=>
/*
* testing sort() by providing different unexpected values for array argument
* with following flag values.
- * 1. flag value as defualt
+ * 1. flag value as default
* 2. SORT_REGULAR - compare items normally
* 3. SORT_NUMERIC - compare items numerically
* 4. SORT_STRING - compare items as strings
// loop though each element of the array and check the working of sort()
// when $array arugment is supplied with different values from $unexpected_values
echo "\n-- Testing sort() by supplying different unexpected values for 'array' argument --\n";
-echo "\n-- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
+echo "\n-- Flag values are default, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --\n";
$counter = 1;
for($index = 0; $index < count($unexpected_values); $index ++) {
-- Testing sort() by supplying different unexpected values for 'array' argument --
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
--- Iteration 1 --
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 2 --
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 3 --
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 4 --
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
-bool(false)
--- Iteration 5 --
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 6 --
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 7 --
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 8 --
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 9 --
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, double given in %s on line %d
-bool(false)
--- Iteration 10 --
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 11 --
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, null given in %s on line %d
-bool(false)
--- Iteration 12 --
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 13 --
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 14 --
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 15 --
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, boolean given in %s on line %d
-bool(false)
--- Iteration 16 --
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 17 --
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 18 --
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 19 --
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 20 --
-
-Warning: sort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, object given in %s on line %d
-bool(false)
--- Iteration 21 --
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, string given in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: sort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-
-Warning: sort() expects parameter 1 to be array, resource given in %s on line %d
-bool(false)
-Done
---UEXPECTF--
-*** Testing sort() : usage variations ***
-
--- Testing sort() by supplying different unexpected values for 'array' argument --
-
--- Flag values are defualt, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
+-- Flag values are default, SORT_REGULAR, SORT_NUMERIC, SORT_STRING --
-- Iteration 1 --
Warning: sort() expects parameter 1 to be array, integer given in %s on line %d
/*
* testing sort() by providing different octal array for $array argument
* with following flag values
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
// an array containing unsorted octal values
$unsorted_oct_array = array(01235, 0321, 0345, 066, 0772, 077, -066, -0345, 0);
-echo "\n-- Testing sort() by supplying octal value array, 'flag' value is defualt --\n";
+echo "\n-- Testing sort() by supplying octal value array, 'flag' value is default --\n";
$temp_array = $unsorted_oct_array;
var_dump(sort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing sort() : usage variations ***
--- Testing sort() by supplying octal value array, 'flag' value is defualt --
-bool(true)
-array(9) {
- [0]=>
- int(-229)
- [1]=>
- int(-54)
- [2]=>
- int(0)
- [3]=>
- int(54)
- [4]=>
- int(63)
- [5]=>
- int(209)
- [6]=>
- int(229)
- [7]=>
- int(506)
- [8]=>
- int(669)
-}
-
--- Testing sort() by supplying octal value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(9) {
- [0]=>
- int(-229)
- [1]=>
- int(-54)
- [2]=>
- int(0)
- [3]=>
- int(54)
- [4]=>
- int(63)
- [5]=>
- int(209)
- [6]=>
- int(229)
- [7]=>
- int(506)
- [8]=>
- int(669)
-}
-
--- Testing sort() by supplying octal value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(9) {
- [0]=>
- int(-229)
- [1]=>
- int(-54)
- [2]=>
- int(0)
- [3]=>
- int(54)
- [4]=>
- int(63)
- [5]=>
- int(209)
- [6]=>
- int(229)
- [7]=>
- int(506)
- [8]=>
- int(669)
-}
-Done
---UEXPECTF--
-*** Testing sort() : usage variations ***
-
--- Testing sort() by supplying octal value array, 'flag' value is defualt --
+-- Testing sort() by supplying octal value array, 'flag' value is default --
bool(true)
array(9) {
[0]=>
}
-- Iteration 13 --
-Warning: sort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 14 --
-
-Warning: sort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 15 --
-
-Warning: sort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 16 --
-
-Warning: sort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 17 --
-
-Warning: sort() expects parameter 2 to be long, object given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 18 --
-
-Warning: sort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 19 --
-
-Warning: sort() expects parameter 2 to be long, string given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
--- Iteration 20 --
-
-Warning: sort() expects parameter 2 to be long, resource given in %s on line %d
-bool(false)
-array(3) {
- [0]=>
- int(10)
- [1]=>
- int(2)
- [2]=>
- int(45)
-}
-Done
---UEXPECTF--
-*** Testing sort() : usage variations ***
-
--- Testing sort() by supplying different unexpected values for 'flag' argument --
--- Iteration 1 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 2 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 3 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 4 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 5 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 6 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 7 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 8 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 9 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 10 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 11 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 12 --
-bool(true)
-array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(45)
-}
--- Iteration 13 --
-
Warning: sort() expects parameter 2 to be long, Unicode string given in %s on line %d
bool(false)
array(3) {
/*
* Testing sort() by providing different integer/float value arrays for $array argument
* with following flag values
- * 1. flag value as defualt
+ * 1. flag value as default
* 2. SORT_REGULAR - compare items normally
* 3. SORT_NUMERIC - compare items numerically
* 4. SORT_STRING - compare items as strings
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
- echo "- With Defualt sort flag -\n";
+ echo "- With default sort flag -\n";
$temp_array = $array;
var_dump(sort($temp_array) );
var_dump($temp_array);
-- Testing sort() by supplying various integer/float arrays --
-- Iteration 1 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(9) {
[0]=>
}
-- Iteration 2 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(7) {
[0]=>
}
-- Iteration 3 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(11) {
[0]=>
}
-- Iteration 4 --
-- With Defualt sort flag -
-bool(true)
-array(7) {
- [0]=>
- %s(-2147483649)
- [1]=>
- %s(-2147483648)
- [2]=>
- int(-2147483647)
- [3]=>
- int(0)
- [4]=>
- int(0)
- [5]=>
- int(2147483647)
- [6]=>
- %s(2147483648)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(7) {
- [0]=>
- %s(-2147483649)
- [1]=>
- %s(-2147483648)
- [2]=>
- int(-2147483647)
- [3]=>
- int(0)
- [4]=>
- int(0)
- [5]=>
- int(2147483647)
- [6]=>
- %s(2147483648)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(7) {
- [0]=>
- %s(-2147483649)
- [1]=>
- %s(-2147483648)
- [2]=>
- int(-2147483647)
- [3]=>
- int(0)
- [4]=>
- int(0)
- [5]=>
- int(2147483647)
- [6]=>
- %s(2147483648)
-}
-Done
---UEXPECTF--
-*** Testing sort() : usage variations ***
-
--- Testing sort() by supplying various integer/float arrays --
-
--- Iteration 1 --
-- With Defualt sort flag -
-bool(true)
-array(9) {
- [0]=>
- int(-41)
- [1]=>
- int(-31)
- [2]=>
- int(-21)
- [3]=>
- int(-11)
- [4]=>
- int(0)
- [5]=>
- int(11)
- [6]=>
- int(21)
- [7]=>
- int(31)
- [8]=>
- int(41)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(9) {
- [0]=>
- int(-41)
- [1]=>
- int(-31)
- [2]=>
- int(-21)
- [3]=>
- int(-11)
- [4]=>
- int(0)
- [5]=>
- int(11)
- [6]=>
- int(21)
- [7]=>
- int(31)
- [8]=>
- int(41)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(9) {
- [0]=>
- int(-41)
- [1]=>
- int(-31)
- [2]=>
- int(-21)
- [3]=>
- int(-11)
- [4]=>
- int(0)
- [5]=>
- int(11)
- [6]=>
- int(21)
- [7]=>
- int(31)
- [8]=>
- int(41)
-}
-
--- Iteration 2 --
-- With Defualt sort flag -
-bool(true)
-array(7) {
- [0]=>
- float(-10.5)
- [1]=>
- float(-0.1)
- [2]=>
- float(0.01)
- [3]=>
- float(0.106)
- [4]=>
- float(0.5)
- [5]=>
- float(10.5)
- [6]=>
- float(1050)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(7) {
- [0]=>
- float(-10.5)
- [1]=>
- float(-0.1)
- [2]=>
- float(0.01)
- [3]=>
- float(0.106)
- [4]=>
- float(0.5)
- [5]=>
- float(10.5)
- [6]=>
- float(1050)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(7) {
- [0]=>
- float(-10.5)
- [1]=>
- float(-0.1)
- [2]=>
- float(0.01)
- [3]=>
- float(0.106)
- [4]=>
- float(0.5)
- [5]=>
- float(10.5)
- [6]=>
- float(1050)
-}
-
--- Iteration 3 --
-- With Defualt sort flag -
-bool(true)
-array(11) {
- [0]=>
- int(-1)
- [1]=>
- float(-0.9)
- [2]=>
- float(-0.106)
- [3]=>
- float(-0.01)
- [4]=>
- int(0)
- [5]=>
- float(0.0001)
- [6]=>
- float(0.0021)
- [7]=>
- float(0.09)
- [8]=>
- float(0.106)
- [9]=>
- int(2)
- [10]=>
- int(33)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(11) {
- [0]=>
- int(-1)
- [1]=>
- float(-0.9)
- [2]=>
- float(-0.106)
- [3]=>
- float(-0.01)
- [4]=>
- int(0)
- [5]=>
- float(0.0001)
- [6]=>
- float(0.0021)
- [7]=>
- float(0.09)
- [8]=>
- float(0.106)
- [9]=>
- int(2)
- [10]=>
- int(33)
-}
-- Sort flag = SORT_NUMERIC -
-bool(true)
-array(11) {
- [0]=>
- int(-1)
- [1]=>
- float(-0.9)
- [2]=>
- float(-0.106)
- [3]=>
- float(-0.01)
- [4]=>
- int(0)
- [5]=>
- float(0.0001)
- [6]=>
- float(0.0021)
- [7]=>
- float(0.09)
- [8]=>
- float(0.106)
- [9]=>
- int(2)
- [10]=>
- int(33)
-}
-
--- Iteration 4 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(7) {
[0]=>
/*
* Testing sort() by providing reference variable array with following flag values
- * flag value as defualt
+ * flag value as default
* SORT_REGULAR - compare items normally
* SORT_NUMERIC - compare items numerically
*/
// an array containing integer references
$unsorted_numerics = array( &$value1 , &$value2, &$value3);
-echo "\n-- Testing sort() by supplying reference variable array, 'flag' value is defualt --\n";
+echo "\n-- Testing sort() by supplying reference variable array, 'flag' value is default --\n";
$temp_array = $unsorted_numerics;
var_dump( sort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing sort() :usage variations ***
--- Testing sort() by supplying reference variable array, 'flag' value is defualt --
-bool(true)
-array(3) {
- [0]=>
- &int(33)
- [1]=>
- &int(100)
- [2]=>
- &int(555)
-}
-
--- Testing sort() by supplying reference variable array, 'flag' = SORT_REGULAR --
-bool(true)
-array(3) {
- [0]=>
- &int(33)
- [1]=>
- &int(100)
- [2]=>
- &int(555)
-}
-
--- Testing sort() by supplying reference variable array, 'flag' = SORT_NUMERIC --
-bool(true)
-array(3) {
- [0]=>
- &int(33)
- [1]=>
- &int(100)
- [2]=>
- &int(555)
-}
-Done
---UEXPECTF--
-*** Testing sort() :usage variations ***
-
--- Testing sort() by supplying reference variable array, 'flag' value is defualt --
+-- Testing sort() by supplying reference variable array, 'flag' value is default --
bool(true)
array(3) {
[0]=>
/*
* testing sort() by providing different string arrays for $array argument with
* following flag values
- * flag value as defualt
+ * flag value as default
* SORT_REGULAR - compare items normally
* SORT_STRING - compare items as strings
*/
echo "Done\n";
?>
---EXPECTF--
-*** Testing sort() : usage variations ***
-
--- Testing sort() by supplying various string arrays --
-
--- Iteration 1 --
-- With Default sort flag -
-bool(true)
-array(12) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- string(1) " "
- [3]=>
- string(1) "
-"
- [4]=>
- string(1) "\v"
- [5]=>
- string(1) "\f"
- [6]=>
- string(1) "
-"
- [7]=>
- string(2) "\a"
- [8]=>
- string(3) "\cx"
- [9]=>
- string(4) "\ddd"
- [10]=>
- string(2) "\e"
- [11]=>
- string(4) "\xhh"
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(12) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- string(1) " "
- [3]=>
- string(1) "
-"
- [4]=>
- string(1) "\v"
- [5]=>
- string(1) "\f"
- [6]=>
- string(1) "
-"
- [7]=>
- string(2) "\a"
- [8]=>
- string(3) "\cx"
- [9]=>
- string(4) "\ddd"
- [10]=>
- string(2) "\e"
- [11]=>
- string(4) "\xhh"
-}
-- Sort flag = SORT_STRING -
-bool(true)
-array(12) {
- [0]=>
- NULL
- [1]=>
- NULL
- [2]=>
- string(1) " "
- [3]=>
- string(1) "
-"
- [4]=>
- string(1) "\v"
- [5]=>
- string(1) "\f"
- [6]=>
- string(1) "
-"
- [7]=>
- string(2) "\a"
- [8]=>
- string(3) "\cx"
- [9]=>
- string(4) "\ddd"
- [10]=>
- string(2) "\e"
- [11]=>
- string(4) "\xhh"
-}
-
--- Iteration 2 --
-- With Default sort flag -
-bool(true)
-array(12) {
- [0]=>
- string(6) "BANANA"
- [1]=>
- string(6) "Orange"
- [2]=>
- string(4) "TTTT"
- [3]=>
- string(4) "Test"
- [4]=>
- string(1) "X"
- [5]=>
- string(5) "apple"
- [6]=>
- string(6) "banana"
- [7]=>
- string(5) "lemoN"
- [8]=>
- string(6) "oraNGe"
- [9]=>
- string(3) "ttt"
- [10]=>
- string(2) "ww"
- [11]=>
- string(1) "x"
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(12) {
- [0]=>
- string(6) "BANANA"
- [1]=>
- string(6) "Orange"
- [2]=>
- string(4) "TTTT"
- [3]=>
- string(4) "Test"
- [4]=>
- string(1) "X"
- [5]=>
- string(5) "apple"
- [6]=>
- string(6) "banana"
- [7]=>
- string(5) "lemoN"
- [8]=>
- string(6) "oraNGe"
- [9]=>
- string(3) "ttt"
- [10]=>
- string(2) "ww"
- [11]=>
- string(1) "x"
-}
-- Sort flag = SORT_STRING -
-bool(true)
-array(12) {
- [0]=>
- string(6) "BANANA"
- [1]=>
- string(6) "Orange"
- [2]=>
- string(4) "TTTT"
- [3]=>
- string(4) "Test"
- [4]=>
- string(1) "X"
- [5]=>
- string(5) "apple"
- [6]=>
- string(6) "banana"
- [7]=>
- string(5) "lemoN"
- [8]=>
- string(6) "oraNGe"
- [9]=>
- string(3) "ttt"
- [10]=>
- string(2) "ww"
- [11]=>
- string(1) "x"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing sort() : usage variations ***
-- Testing sort() by supplying various string arrays --
/*
* testing sort() by providing different hexa-decimal array for $array argument
* with following flag values
- * flag value as defualt
+ * flag value as default
* SORT_REGULAR - compare items normally
* SORT_NUMERIC - compare items numerically
*/
// an array contains unsorted hexadecimal values
$unsorted_hex_array = array(0x1AB, 0xFFF, 0xF, 0xFF, 0x2AA, 0xBB, 0x1ab, 0xff, -0xFF, 0, -0x2aa);
-echo "\n-- Testing sort() by supplying hexadecimal value array, 'flag' value is defualt --\n";
+echo "\n-- Testing sort() by supplying hexadecimal value array, 'flag' value is default --\n";
$temp_array = $unsorted_hex_array;
var_dump(sort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing sort() : usage variations ***
--- Testing sort() by supplying hexadecimal value array, 'flag' value is defualt --
-bool(true)
-array(11) {
- [0]=>
- int(-682)
- [1]=>
- int(-255)
- [2]=>
- int(0)
- [3]=>
- int(15)
- [4]=>
- int(187)
- [5]=>
- int(255)
- [6]=>
- int(255)
- [7]=>
- int(427)
- [8]=>
- int(427)
- [9]=>
- int(682)
- [10]=>
- int(4095)
-}
-
--- Testing sort() by supplying hexadecimal value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(11) {
- [0]=>
- int(-682)
- [1]=>
- int(-255)
- [2]=>
- int(0)
- [3]=>
- int(15)
- [4]=>
- int(187)
- [5]=>
- int(255)
- [6]=>
- int(255)
- [7]=>
- int(427)
- [8]=>
- int(427)
- [9]=>
- int(682)
- [10]=>
- int(4095)
-}
-
--- Testing sort() by supplying hexadecimal value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(11) {
- [0]=>
- int(-682)
- [1]=>
- int(-255)
- [2]=>
- int(0)
- [3]=>
- int(15)
- [4]=>
- int(187)
- [5]=>
- int(255)
- [6]=>
- int(255)
- [7]=>
- int(427)
- [8]=>
- int(427)
- [9]=>
- int(682)
- [10]=>
- int(4095)
-}
-Done
---UEXPECTF--
-*** Testing sort() : usage variations ***
-
--- Testing sort() by supplying hexadecimal value array, 'flag' value is defualt --
+-- Testing sort() by supplying hexadecimal value array, 'flag' value is default --
bool(true)
array(11) {
[0]=>
/*
* testing sort() by providing bool value array for $array argument with following flag values.
- * flag value as defualt
+ * flag value as default
* SORT_REGULAR - compare items normally
*/
// bool value array
$bool_values = array (true, false, TRUE, FALSE);
-echo "\n-- Testing sort() by supplying bool value array, 'flag' value is defualt --\n";
+echo "\n-- Testing sort() by supplying bool value array, 'flag' value is default --\n";
$temp_array = $bool_values;
var_dump(sort($temp_array) );
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing sort() : usage variations ***
--- Testing sort() by supplying bool value array, 'flag' value is defualt --
-bool(true)
-array(4) {
- [0]=>
- bool(false)
- [1]=>
- bool(false)
- [2]=>
- bool(true)
- [3]=>
- bool(true)
-}
-
--- Testing sort() by supplying bool value array, 'flag' value is SORT_REGULAR --
-bool(true)
-array(4) {
- [0]=>
- bool(false)
- [1]=>
- bool(false)
- [2]=>
- bool(true)
- [3]=>
- bool(true)
-}
-
--- Testing sort() by supplying bool value array, 'flag' value is SORT_NUMERIC --
-bool(true)
-array(4) {
- [0]=>
- bool(false)
- [1]=>
- bool(false)
- [2]=>
- bool(true)
- [3]=>
- bool(true)
-}
-
--- Testing sort() by supplying bool value array, 'flag' value is SORT_STRING --
-bool(true)
-array(4) {
- [0]=>
- bool(false)
- [1]=>
- bool(false)
- [2]=>
- bool(true)
- [3]=>
- bool(true)
-}
-Done
---UEXPECTF--
-*** Testing sort() : usage variations ***
-
--- Testing sort() by supplying bool value array, 'flag' value is defualt --
+-- Testing sort() by supplying bool value array, 'flag' value is default --
bool(true)
array(4) {
[0]=>
--TEST--
-Test sort() function : usage variations - sort array with diff. sub arrays, 'sort_flags' as defualt/SORT_REGULAR
+Test sort() function : usage variations - sort array with diff. sub arrays, 'sort_flags' as default/SORT_REGULAR
--FILE--
<?php
/* Prototype : bool sort ( array &$array [, int $sort_flags] )
/*
* testing sort() by providing arrays contains sub arrays for $array argument with flowing flag values
- * flag value as defualt
+ * flag value as default
* SORT_REGULAR - compare items normally
*/
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
- // testing sort() function by supplying different arrays, flag value is defualt
- echo "- With Defualt sort flag -\n";
+ // testing sort() function by supplying different arrays, flag value is default
+ echo "- With default sort flag -\n";
$temp_array = $array;
var_dump(sort($temp_array) );
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing sort() : usage variations ***
-- Testing sort() by supplying various arrays containing sub arrays --
-- Iteration 1 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(0) {
}
}
-- Iteration 2 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(1) {
[0]=>
}
-- Iteration 3 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(3) {
[0]=>
}
-- Iteration 4 --
-- With Defualt sort flag -
-bool(true)
-array(4) {
- [0]=>
- array(0) {
- }
- [1]=>
- array(1) {
- [0]=>
- int(11)
- }
- [2]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- [3]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(4) {
- [0]=>
- array(0) {
- }
- [1]=>
- array(1) {
- [0]=>
- int(11)
- }
- [2]=>
- array(2) {
- [0]=>
- int(22)
- [1]=>
- int(-55)
- }
- [3]=>
- array(3) {
- [0]=>
- int(33)
- [1]=>
- int(-5)
- [2]=>
- int(6)
- }
-}
-Done
---UEXPECTF--
-*** Testing sort() : usage variations ***
-
--- Testing sort() by supplying various arrays containing sub arrays --
-
--- Iteration 1 --
-- With Defualt sort flag -
-bool(true)
-array(0) {
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(0) {
-}
-
--- Iteration 2 --
-- With Defualt sort flag -
-bool(true)
-array(1) {
- [0]=>
- array(0) {
- }
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(1) {
- [0]=>
- array(0) {
- }
-}
-
--- Iteration 3 --
-- With Defualt sort flag -
-bool(true)
-array(3) {
- [0]=>
- int(11)
- [1]=>
- int(44)
- [2]=>
- array(2) {
- [0]=>
- int(64)
- [1]=>
- int(61)
- }
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(3) {
- [0]=>
- int(11)
- [1]=>
- int(44)
- [2]=>
- array(2) {
- [0]=>
- int(64)
- [1]=>
- int(61)
- }
-}
-
--- Iteration 4 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(4) {
[0]=>
--TEST--
-Test sort() function : usage variations - sort diff. associative arrays, 'sort_flags' as defualt/SORT_REGULAR
+Test sort() function : usage variations - sort diff. associative arrays, 'sort_flags' as default/SORT_REGULAR
--FILE--
<?php
/* Prototype : bool sort ( array &$array [, int $sort_flags] )
/*
* Testing sort() by providing arrays with key values for $array argument
* with following flag values.
- * 1.flag value as defualt
+ * 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* To test the new keys for the elements in the sorted array.
*/
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
- echo "- With Defualt sort flag -\n";
+ echo "- With default sort flag -\n";
$temp_array = $array;
var_dump(sort($temp_array) );
var_dump($temp_array);
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing sort() : usage variations ***
-- Testing sort() by supplying various arrays with key values --
-- Iteration 1 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(5) {
[0]=>
}
-- Iteration 2 --
-- With Defualt sort flag -
-bool(true)
-array(3) {
- [0]=>
- array(3) {
- [0]=>
- string(5) "first"
- [5]=>
- string(6) "second"
- [6]=>
- string(5) "third"
- }
- [1]=>
- array(3) {
- ["a"]=>
- string(6) "orange"
- ["b"]=>
- string(6) "banana"
- ["c"]=>
- string(5) "apple"
- }
- [2]=>
- array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- }
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(3) {
- [0]=>
- array(3) {
- [0]=>
- string(5) "first"
- [5]=>
- string(6) "second"
- [6]=>
- string(5) "third"
- }
- [1]=>
- array(3) {
- ["a"]=>
- string(6) "orange"
- ["b"]=>
- string(6) "banana"
- ["c"]=>
- string(5) "apple"
- }
- [2]=>
- array(6) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
- [5]=>
- int(6)
- }
-}
-
--- Iteration 3 --
-- With Defualt sort flag -
-bool(true)
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(1)
- [2]=>
- int(1)
- [3]=>
- int(1)
- [4]=>
- int(13)
- [5]=>
- int(19)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(1)
- [2]=>
- int(1)
- [3]=>
- int(1)
- [4]=>
- int(13)
- [5]=>
- int(19)
-}
-
--- Iteration 4 --
-- With Defualt sort flag -
-bool(true)
-array(2) {
- [0]=>
- string(3) "baz"
- [1]=>
- int(1)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(2) {
- [0]=>
- string(3) "baz"
- [1]=>
- int(1)
-}
-
--- Iteration 5 --
-- With Defualt sort flag -
-bool(true)
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- array(1) {
- ["g"]=>
- int(4)
- }
- [3]=>
- array(2) {
- ["e"]=>
- int(2)
- ["f"]=>
- int(3)
- }
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(4) {
- [0]=>
- int(1)
- [1]=>
- int(5)
- [2]=>
- array(1) {
- ["g"]=>
- int(4)
- }
- [3]=>
- array(2) {
- ["e"]=>
- int(2)
- ["f"]=>
- int(3)
- }
-}
-Done
---UEXPECTF--
-*** Testing sort() : usage variations ***
-
--- Testing sort() by supplying various arrays with key values --
-
--- Iteration 1 --
-- With Defualt sort flag -
-bool(true)
-array(5) {
- [0]=>
- int(11)
- [1]=>
- int(22)
- [2]=>
- int(33)
- [3]=>
- int(55)
- [4]=>
- int(66)
-}
-- Sort flag = SORT_REGULAR -
-bool(true)
-array(5) {
- [0]=>
- int(11)
- [1]=>
- int(22)
- [2]=>
- int(33)
- [3]=>
- int(55)
- [4]=>
- int(66)
-}
-
--- Iteration 2 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(3) {
[0]=>
}
-- Iteration 3 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(6) {
[0]=>
}
-- Iteration 4 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(2) {
[0]=>
}
-- Iteration 5 --
-- With Defualt sort flag -
+- With default sort flag -
bool(true)
array(4) {
[0]=>
echo "Done"
?>
---EXPECTF--
-*** Testing uasort() : basic functionality ***
--- Numeric array with default keys --
-bool(true)
-array(7) {
- [0]=>
- int(1)
- [4]=>
- int(2)
- [3]=>
- int(3)
- [5]=>
- int(6)
- [6]=>
- int(7)
- [1]=>
- int(8)
- [2]=>
- int(9)
-}
--- String array with default keys --
-bool(true)
-array(4) {
- [0]=>
- string(4) "This"
- [2]=>
- string(1) "a"
- [1]=>
- string(2) "is"
- [3]=>
- string(4) "test"
-}
--- Associative array with numeric keys --
-bool(true)
-array(5) {
- [1]=>
- int(1)
- [2]=>
- int(2)
- [5]=>
- int(4)
- [3]=>
- int(7)
- [4]=>
- int(9)
-}
--- Associative array with string keys --
-bool(true)
-array(4) {
- ["three"]=>
- int(1)
- ["two"]=>
- int(2)
- ["one"]=>
- int(4)
- ["four"]=>
- int(10)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing uasort() : basic functionality ***
-- Numeric array with default keys --
bool(true)
echo "Done"
?>
---EXPECTF--
-*** Testing uasort() : basic functionality with duplicate values ***
--- Numeric array with increasing values --
-bool(true)
-array(6) {
- [0]=>
- int(1)
- [1]=>
- int(1)
- [3]=>
- int(2)
- [2]=>
- int(2)
- [5]=>
- int(3)
- [4]=>
- int(3)
-}
--- Numeric array with decreasing values --
-bool(true)
-array(6) {
- [4]=>
- int(1)
- [5]=>
- int(1)
- [3]=>
- int(2)
- [2]=>
- int(2)
- [1]=>
- int(3)
- [0]=>
- int(3)
-}
--- Numeric array with increasing and decreasing values --
-bool(true)
-array(6) {
- [5]=>
- int(1)
- [0]=>
- int(1)
- [1]=>
- int(2)
- [4]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(3)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing uasort() : basic functionality with duplicate values ***
-- Numeric array with increasing values --
bool(true)
Warning: uasort() expects exactly 2 parameters, 3 given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing uasort() : error conditions ***
--- Testing uasort() function with Zero argument --
-
-Warning: uasort() expects exactly 2 parameters, 0 given in %s on line %d
-NULL
--- Testing uasort() function with more than expected no. of arguments --
-
-Warning: uasort() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
--- Testing uasort() function with less than expected no. of arguments --
-
-Warning: uasort() expects exactly 2 parameters, 1 given in %s on line %d
-NULL
--- Testing uasort() function with non-existent compare function --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function 'non_existent' not found or invalid function name in %s on line %d
-NULL
--- Testing uasort() function with non-existent compare function and extra argument --
-
-Warning: uasort() expects exactly 2 parameters, 3 given in %s on line %d
-NULL
-Done
echo "Done"
?>
---EXPECTF--
-*** Testing uasort() : object functionality ***
-bool(true)
-array(4) {
- [1]=>
- object(SimpleClass1)#2 (1) {
- ["int_value":"SimpleClass1":private]=>
- int(1)
- }
- [0]=>
- object(SimpleClass1)#1 (1) {
- ["int_value":"SimpleClass1":private]=>
- int(10)
- }
- [3]=>
- object(SimpleClass1)#4 (1) {
- ["int_value":"SimpleClass1":private]=>
- int(50)
- }
- [2]=>
- object(SimpleClass1)#3 (1) {
- ["int_value":"SimpleClass1":private]=>
- int(100)
- }
-}
-bool(true)
-array(3) {
- [0]=>
- object(SimpleClass2)#5 (3) {
- ["int_value":"SimpleClass2":private]=>
- int(2)
- ["float_value":protected]=>
- float(3.4)
- ["string_value"]=>
- string(5) "mango"
- }
- [2]=>
- object(SimpleClass2)#7 (3) {
- ["int_value":"SimpleClass2":private]=>
- int(5)
- ["float_value":protected]=>
- float(2.5)
- ["string_value"]=>
- string(6) "orange"
- }
- [1]=>
- object(SimpleClass2)#6 (3) {
- ["int_value":"SimpleClass2":private]=>
- int(10)
- ["float_value":protected]=>
- float(1.2)
- ["string_value"]=>
- string(5) "apple"
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing uasort() : object functionality ***
bool(true)
array(4) {
*** Testing uasort() : object functionality ***
-- Testing uasort() with StaticClass objects --
bool(true)
-array(4) {
- [3]=>
- object(StaticClass)#%d (0) {
- }
- [2]=>
- object(StaticClass)#%d (0) {
- }
- [1]=>
- object(StaticClass)#%d (0) {
- }
- [0]=>
- object(StaticClass)#%d (0) {
- }
-}
--- Testing uasort() with EmptyClass objects --
-bool(true)
-array(4) {
- [3]=>
- object(EmptyClass)#%d (0) {
- }
- [2]=>
- object(EmptyClass)#%d (0) {
- }
- [1]=>
- object(EmptyClass)#%d (0) {
- }
- [0]=>
- object(EmptyClass)#%d (0) {
- }
-}
--- Testing uasort() with ChildClass objects --
-bool(true)
-array(4) {
- [2]=>
- object(ChildClass)#%d (2) {
- ["child_value"]=>
- int(15)
- ["pub_value"]=>
- NULL
- }
- [0]=>
- object(ChildClass)#%d (2) {
- ["child_value"]=>
- int(20)
- ["pub_value"]=>
- NULL
- }
- [1]=>
- object(ChildClass)#%d (2) {
- ["child_value"]=>
- int(500)
- ["pub_value"]=>
- NULL
- }
- [3]=>
- object(ChildClass)#%d (2) {
- ["child_value"]=>
- int(700)
- ["pub_value"]=>
- NULL
- }
-}
-Done
---UEXPECTF--
-*** Testing uasort() : object functionality ***
--- Testing uasort() with StaticClass objects --
-bool(true)
array(4) {
[3]=>
object(StaticClass)#4 (0) {
NULL
-- Iteration 16 --
-Warning: uasort() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: uasort() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: uasort() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: uasort() expects parameter 1 to be array, string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: uasort() expects parameter 1 to be array, resource given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: uasort() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: uasort() expects parameter 1 to be array, null given in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing uasort() : unexpected values for 'array_arg' ***
--- Iteration 1 --
-
-Warning: uasort() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: uasort() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: uasort() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: uasort() expects parameter 1 to be array, integer given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: uasort() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: uasort() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: uasort() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: uasort() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: uasort() expects parameter 1 to be array, double given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: uasort() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: uasort() expects parameter 1 to be array, null given in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: uasort() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: uasort() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: uasort() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: uasort() expects parameter 1 to be array, boolean given in %s on line %d
-NULL
--- Iteration 16 --
-
Warning: uasort() expects parameter 1 to be array, Unicode string given in %s on line %d
NULL
-- Iteration 17 --
echo "Done"
?>
---EXPECTF--
-*** Testing uasort() : 'array_arg' with elements as reference ***
--- Sorting 'array_arg' containing different references --
-bool(true)
-array(5) {
- [1]=>
- &int(-5)
- [4]=>
- &int(0)
- [0]=>
- int(10)
- [2]=>
- &int(100)
- [3]=>
- int(200)
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing uasort() : 'array_arg' with elements as reference ***
-- Sorting 'array_arg' containing different references --
bool(true)
echo "Done"
?>
---EXPECTF--
-*** Testing uasort() : Sorting different associative arrays ***
--- Array with duplicate keys --
-bool(true)
-array(7) {
- [0]=>
- int(1)
- [5]=>
- int(2)
- ["z"]=>
- int(3)
- [3]=>
- int(3)
- ["o"]=>
- int(6)
- ["a"]=>
- int(8)
- ["d"]=>
- int(9)
-}
--- Array with default/assigned keys --
-bool(true)
-array(4) {
- [2]=>
- string(5) "Apple"
- [0]=>
- string(6) "Banana"
- [1]=>
- string(5) "Mango"
- [3]=>
- string(9) "Pineapple"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing uasort() : Sorting different associative arrays ***
-- Array with duplicate keys --
bool(true)
Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
NULL
Done
---UEXPECTF--
-*** Testing uasort() : Unexpected values in place of comparison function ***
--- Iteration 1 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 2 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 3 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 4 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 5 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 6 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 7 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 8 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 9 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 10 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 11 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 12 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, array must have exactly two members in %s on line %d
-NULL
--- Iteration 13 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
--- Iteration 14 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, first array member is not a valid class name or object in %s on line %d
-NULL
--- Iteration 15 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 16 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 17 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 18 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 19 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 20 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 21 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- Iteration 22 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function '' not found or invalid function name in %s on line %d
-NULL
--- Iteration 23 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d
-NULL
--- Iteration 24 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function 'string' not found or invalid function name in %s on line %d
-NULL
--- Iteration 25 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 26 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 27 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
--- Iteration 28 --
-
-Warning: uasort() expects parameter 2 to be a valid callback, no array or string given in %s on line %d
-NULL
-Done
echo "Done"
?>
---EXPECTF--
-*** Testing uasort() : different numeric arrays as 'array_arg' ***
--- Sorting Integer array --
-bool(true)
-array(9) {
- [9]=>
- int(-1200)
- [8]=>
- int(-3)
- [7]=>
- int(0)
- [1]=>
- int(2)
- [0]=>
- int(3)
- [5]=>
- int(25)
- [3]=>
- int(100)
- [4]=>
- int(150)
- [6]=>
- int(350)
-}
--- Sorting Octal array --
-bool(true)
-array(7) {
- [4]=>
- int(-37)
- [6]=>
- int(-7)
- [2]=>
- int(0)
- [5]=>
- int(1)
- [3]=>
- int(13)
- [1]=>
- int(19)
- [0]=>
- int(46)
-}
--- Sorting Hex array --
-bool(true)
-array(6) {
- [5]=>
- int(-242)
- [3]=>
- int(-207)
- [2]=>
- int(16)
- [4]=>
- int(18)
- [1]=>
- int(43)
- [0]=>
- int(174)
-}
--- Sorting Float array --
-bool(true)
-array(7) {
- [2]=>
- float(-3.4)
- [6]=>
- float(-0.0934)
- [3]=>
- int(0)
- [4]=>
- float(0.5)
- [1]=>
- float(2.4)
- [0]=>
- float(10.2)
- [5]=>
- float(7300)
-}
--- Sorting empty array --
-bool(true)
-array(0) {
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing uasort() : different numeric arrays as 'array_arg' ***
-- Sorting Integer array --
bool(true)
echo "Done"
?>
---EXPECTF--
-*** Testing uasort() : different string arrays as 'array_arg' ***
--- Sorting Single Quoted String values --
-bool(true)
-array(10) {
- [5]=>
- string(0) ""
- [0]=>
- string(1) " "
- [9]=>
- string(1) "'"
- [7]=>
- string(1) "0"
- [8]=>
- string(8) "123Hello"
- [10]=>
- string(4) "@#$%"
- [4]=>
- string(5) "HELLO"
- [3]=>
- string(5) "Hello"
- [6]=>
- string(2) "\t"
- [1]=>
- string(4) "test"
-}
--- Sorting Double Quoted String values --
-bool(true)
-array(10) {
- [5]=>
- string(0) ""
- [6]=>
- string(1) " "
- [0]=>
- string(1) " "
- [9]=>
- string(1) """
- [7]=>
- string(1) "0"
- [8]=>
- string(8) "123Hello"
- [10]=>
- string(4) "@#$%"
- [4]=>
- string(5) "HELLO"
- [3]=>
- string(5) "Hello"
- [1]=>
- string(4) "test"
-}
--- Sorting Heredoc String values --
-bool(true)
-array(4) {
- [0]=>
- string(0) ""
- [2]=>
- string(7) "HEREDOC"
- [1]=>
- string(7) "Heredoc"
- [3]=>
- string(43) "heredoc string with!@# and 123
-Test this!!!"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing uasort() : different string arrays as 'array_arg' ***
-- Sorting Single Quoted String values --
bool(true)
echo "Done"
?>
---EXPECTF--
-*** Testing uasort() : Array with different subarrays ***
-bool(true)
-array(8) {
- [2]=>
- array(0) {
- }
- [4]=>
- array(1) {
- [0]=>
- int(-1)
- }
- [6]=>
- array(1) {
- [0]=>
- string(0) ""
- }
- [3]=>
- array(1) {
- [0]=>
- int(0)
- }
- [1]=>
- array(1) {
- [0]=>
- int(100)
- }
- [0]=>
- array(3) {
- [0]=>
- int(2)
- [1]=>
- int(10)
- [2]=>
- int(-1)
- }
- [5]=>
- array(5) {
- [0]=>
- int(-9)
- [1]=>
- int(34)
- [2]=>
- int(54)
- [3]=>
- int(0)
- [4]=>
- int(20)
- }
- [7]=>
- array(5) {
- [0]=>
- string(5) "apple"
- [1]=>
- string(5) "Apple"
- [2]=>
- string(5) "APPLE"
- [3]=>
- string(5) "aPPle"
- [4]=>
- string(5) "aPpLe"
- }
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing uasort() : Array with different subarrays ***
bool(true)
array(8) {
echo "Done"
?>
---EXPECTF--
-*** Testing uasort() : anonymous function as 'cmp_function' ***
--- Anonymous 'cmp_function' with parameters passed by value --
-bool(true)
-array(5) {
- [2]=>
- int(-70)
- [1]=>
- int(3)
- [3]=>
- int(24)
- [4]=>
- int(90)
- [0]=>
- int(100)
-}
--- Anonymous 'cmp_function' with parameters passed by reference --
-bool(true)
-array(4) {
- ["a"]=>
- string(5) "Apple"
- ["b"]=>
- string(6) "Banana"
- ["m"]=>
- string(5) "Mango"
- ["p"]=>
- string(9) "Pineapple"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing uasort() : anonymous function as 'cmp_function' ***
-- Anonymous 'cmp_function' with parameters passed by value --
bool(true)
*** Testing uasort() : built in function as 'cmp_function' ***
-- Testing uasort() with built-in 'cmp_function': strcasecmp() --
bool(true)
-array(5) {
- ["a"]=>
- string(5) "apple"
- ["b"]=>
- string(6) "Banana"
- ["m"]=>
- string(5) "Mango"
- ["o"]=>
- string(6) "orange"
- ["p"]=>
- string(9) "Pineapple"
-}
--- Testing uasort() with built-in 'cmp_function': strcmp() --
-bool(true)
-array(5) {
- ["b"]=>
- string(6) "Banana"
- ["m"]=>
- string(5) "Mango"
- ["p"]=>
- string(9) "Pineapple"
- ["a"]=>
- string(5) "apple"
- ["o"]=>
- string(6) "orange"
-}
--- Testing uasort() with language construct as 'cmp_function' --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function 'echo' not found or invalid function name in %s on line %d
-NULL
--- Testing uasort() with language construct as 'cmp_function' --
-
-Warning: uasort() expects parameter 2 to be a valid callback, function 'exit' not found or invalid function name in %s on line %d
-NULL
-Done
---UEXPECTF--
-*** Testing uasort() : built in function as 'cmp_function' ***
--- Testing uasort() with built-in 'cmp_function': strcasecmp() --
-bool(true)
array(5) {
[u"a"]=>
unicode(5) "apple"
echo "Done"
?>
---EXPECTF--
-*** Testing uasort() : 'cmp_function' with reference arguments ***
--- Passing integer values to 'cmp_function' --
-bool(true)
-array(7) {
- [0]=>
- int(1)
- [4]=>
- int(2)
- [3]=>
- int(3)
- [5]=>
- int(6)
- [6]=>
- int(7)
- [1]=>
- int(8)
- [2]=>
- int(9)
-}
--- Passing string values to 'cmp_function' --
-bool(true)
-array(4) {
- [1]=>
- string(5) "Apple"
- [3]=>
- string(6) "Banana"
- [0]=>
- string(5) "Mango"
- [2]=>
- string(6) "Orange"
-}
-Done
---UEXPECTF--
+--EXPECT--
*** Testing uasort() : 'cmp_function' with reference arguments ***
-- Passing integer values to 'cmp_function' --
bool(true)