Type specifiers
---------------
- a - array
- b - boolean, stored in zend_bool
- d - double
- f - function or array containing php method call info (returned as
- zend_fcall_info* and zend_fcall_info_cache*)
- h - array (returned as HashTable*)
- l - long
- o - object (of any type)
- O - object (of specific type, specified by class entry)
- r - resource (stored in zval)
- s - string (with possible null bytes) and its length
- z - the actual zval
+ The following list shows the type specifier, its meaning and the parameter
+ types that need to be passed by address. All passed paramaters are set
+ if the PHP parameter is non optional and untouched if optional and the
+ parameter is not present. The only exception is O where the zend_class_entry*
+ has to be provided on input and is used to verify the PHP parameter is an
+ instance of that class.
+
+ a - array (zval*)
+ b - boolean (zend_bool)
+ C - class (zend_class_entry*)
+ d - double (double)
+ f - function or array containing php method call info (returned as
+ zend_fcall_info and zend_fcall_info_cache)
+ h - array (returned as HashTable*)
+ l - long (long)
+ o - object of any type (zval*)
+ O - object of specific type given by class entry (zval*, zend_class_entry)
+ r - resource (zval*)
+ s - string (with possible null bytes) and its length (char*, int)
+ z - the actual zval (zval*)
+ Z - the actual zval (zval**)
+ * - variable arguments list
The following characters also have a meaning in the specifier string:
- | - indicates that the remaining parameters are optional, they
- should be initialized to default values by the extension since they
- will not be touched by the parsing function if they are not
- passed to it.
- / - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
- ! - the parameter it follows can be of specified type or NULL (only applies
- to 's', 'a', 'o', 'O', 'r', 'h', 'C', 'z', and 'Z'). If NULL is passed,
- the results pointer is set to NULL as well.
+ | - indicates that the remaining parameters are optional, they
+ should be initialized to default values by the extension since they
+ will not be touched by the parsing function if they are not
+ passed to it.
+ / - use SEPARATE_ZVAL_IF_NOT_REF() on the parameter it follows
+ ! - the parameter it follows can be of specified type or NULL (applies
+ to all specifiers except for 'b', 'l', and 'd'). If NULL is passed, the
+ results pointer is set to NULL as well.
Examples
--------
int s_len;
zval *param;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lsz",
- &l, &s, &s_len, ¶m) == FAILURE) {
- return;
+ &l, &s, &s_len, ¶m) == FAILURE) {
+ return;
}
double d = 0.5;
zend_class_entry *my_ce;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|d",
- &obj, my_ce, &d) == FAILURE) {
- return;
+ &obj, my_ce, &d) == FAILURE) {
+ return;
}
zval *obj;
zval *arr;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o!a",
- &obj, &arr) == FAILURE) {
- return;
+ &obj, &arr) == FAILURE) {
+ return;
}
/* Gets a separated array which can also be null. */
zval *arr;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/!",
- &arr) == FAILURE) {
- return;
+ &arr) == FAILURE) {
+ return;
}
-
-/* Get only the first three parameters (useful for varargs functions). */
-zval *z;
-zend_bool b;
-zval *r;
-if (zend_parse_parameters(3 TSRMLS_CC, "zbr!",
- &z, &b, &r) == FAILURE) {
- return;
-}
-
-
/* Get either a set of 3 longs or a string. */
long l1, l2, l3;
char *s;
int length;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
- "lll", &l1, &l2, &l3) == SUCCESS) {
- /* manipulate longs */
+ "lll", &l1, &l2, &l3) == SUCCESS) {
+ /* manipulate longs */
} else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC,
- "s", &s, &length) == SUCCESS) {
- /* manipulate string */
+ "s", &s, &length) == SUCCESS) {
+ /* manipulate string */
} else {
- /* output error */
+ /* output error */
+
+ return;
+}
+
+
+/* Function that accepts only varargs (0 or more) */
+
+int i, num_varargs;
+zval ***varargs = NULL;
+
+
+if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "*", &varargs, &num_varargs) == FAILURE) {
+ return;
+}
+
+for (i = 0; i < num_varargs; i++) {
+ /* do something with varargs[i] */
+}
+
+if (varargs) {
+ efree(varargs);
+}
- return;
+
+/* Function that accepts a string, followed by varargs (1 or more) */
+
+char *str;
+int str_len;
+int i, num_varargs;
+zval ***varargs = NULL;
+
+if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s+", &str, &str_len, &varargs, &num_varargs) == FAILURE) {
+ return;
+}
+
+for (i = 0; i < num_varargs; i++) {
+ /* do something with varargs[i] */
+}
+
+if (varargs) {
+ efree(varargs);
+}
+
+
+/* Function that takes an array, followed by varargs, and ending with a long */
+long num;
+zval *array;
+int i, num_varargs;
+zval ***varargs = NULL;
+
+if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a*l", &array, &varargs, &num_varargs, &num) == FAILURE) {
+ return;
+}
+
+for (i = 0; i < num_varargs; i++) {
+ /* do something with varargs[i] */
+}
+
+if (varargs) {
+ efree(varargs);
}
+
--EXPECTF--
Notice: Undefined variable: nonesuchvar in %s on line %d
-Notice: Non-callable array passed to zend_call_function() in %s on line %d
-
-Warning: array_walk(): Unable to call Array() - function does not exist in %s on line %d
+Warning: array_walk() expects parameter 2 to be valid callback, array given in %s on line %d
===DONE===
--TEST--
Bug #32290 (calling call_user_func_array() ends in infinite loop within child class)
+--INI--
+error_reporting=8191
--FILE--
<?php
===A===
TestB::doSomething(1)
-Strict Standards: Non-static method TestA::doSomething() cannot be called statically, assuming $this from compatible context TestB in %sbug32290.php on line %d
-TestA::doSomething(2)
-int(1)
+Warning: call_user_func_array() expects parameter 1 to be valid callback, array given in %s on line %d
+NULL
===B===
TestB::doSomethingThis(1)
===C===
TestB::doSomethingParent(1)
-Strict Standards: Non-static method TestA::doSomethingParent() cannot be called statically, assuming $this from compatible context TestB in %sbug32290.php on line %d
-TestA::doSomethingParent(2)
-int(1)
+Warning: call_user_func_array() expects parameter 1 to be valid callback, array given in %s on line %d
+NULL
===D===
TestB::doSomethingParentThis(1)
$ctx->comment_preview[1] = 2;
var_dump($ctx->comment_preview);
?>
---EXPECT--
+--EXPECTF--
array(2) {
[0]=>
int(1)
[1]=>
int(2)
}
-object(ArrayObject)#2 (2) {
- [0]=>
- int(1)
- [1]=>
- int(2)
+object(ArrayObject)#%d (1) {
+ ["storage":"ArrayObject":private]=>
+ array(2) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ }
}
===DONE===
--EXPECTF--
object(B)#%d (1) {
- ["value:protected"]=>
+ ["value":protected]=>
string(1) "B"
}
object(C)#%d (1) {
- ["value:protected"]=>
+ ["value":protected]=>
string(1) "C"
}
object(B)#%d (1) {
- ["value:protected"]=>
+ ["value":protected]=>
string(1) "C"
}
===DONE===
Notice: Undefined offset: 2 in %sbug37667.php on line 16
NULL
object(Test)#%d (1) {
- ["property:protected"]=>
+ ["property":protected]=>
array(1) {
["foo"]=>
string(3) "bar"
Notice: Indirect modification of overloaded property Test::$property has no effect in %sbug37667.php on line 21
object(Test)#%d (1) {
- ["property:protected"]=>
+ ["property":protected]=>
array(1) {
["foo"]=>
string(3) "bar"
--EXPECTF--
--- Catch exception with try/catch
object(DOMException)#%d (6) {
- ["message:protected"]=>
+ ["message":protected]=>
string(23) "Hierarchy Request Error"
- ["string:private"]=>
+ ["string":"Exception":private]=>
string(0) ""
- ["file:protected"]=>
+ ["file":protected]=>
string(%d) "%sdom003.php"
- ["line:protected"]=>
+ ["line":protected]=>
int(8)
- ["trace:private"]=>
+ ["trace":"Exception":private]=>
array(1) {
[0]=>
array(6) {
?>
--EXPECTF--
object(DOMException)#%d (6) {
- ["message:protected"]=>
+ ["message":protected]=>
string(20) "Wrong Document Error"
- ["string:private"]=>
+ ["string":"Exception":private]=>
string(0) ""
- ["file:protected"]=>
+ ["file":protected]=>
string(%d) "%sdom_set_attr_node.php"
- ["line:protected"]=>
+ ["line":protected]=>
int(%d)
- ["trace:private"]=>
+ ["trace":"Exception":private]=>
array(1) {
[0]=>
array(6) {
===DONE===
<?php exit(0); ?>
--EXPECTF--
-object(ArrayObject)#1 (2) {
- [0]=>
- int(0)
- [1]=>
- int(1)
+object(ArrayObject)#1 (1) {
+ ["storage":"ArrayObject":private]=>
+ array(2) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ }
}
int(2)
int(3)
int(5)
}
string(1) "a"
-object(ArrayObject)#1 (5) {
- [0]=>
- int(0)
- [1]=>
- int(1)
- [2]=>
- int(2)
- [3]=>
- int(3)
- ["a"]=>
- string(1) "a"
+object(ArrayObject)#1 (1) {
+ ["storage":"ArrayObject":private]=>
+ array(5) {
+ [0]=>
+ int(0)
+ [1]=>
+ int(1)
+ [2]=>
+ int(2)
+ [3]=>
+ int(3)
+ ["a"]=>
+ string(1) "a"
+ }
}
int(0)
Notice: Undefined offset: 7 in %sarray_001.php on line %d
Notice: Undefined index: c in %sarray_001.php on line %d
-object(ArrayObject)#1 (2) {
- [0]=>
- int(0)
- [2]=>
- int(2)
+object(ArrayObject)#1 (1) {
+ ["storage":"ArrayObject":private]=>
+ array(2) {
+ [0]=>
+ int(0)
+ [2]=>
+ int(2)
+ }
}
-object(ArrayObject)#1 (4) {
- [0]=>
- int(0)
- [2]=>
- int(2)
- [4]=>
- string(1) "3"
- [5]=>
- int(4)
+object(ArrayObject)#1 (1) {
+ ["storage":"ArrayObject":private]=>
+ array(4) {
+ [0]=>
+ int(0)
+ [2]=>
+ int(2)
+ [4]=>
+ string(1) "3"
+ [5]=>
+ int(4)
+ }
}
===DONE===
===DONE===
<?php exit(0); ?>
--EXPECTF--
-object(ArrayObject)#%d (5) {
- [1]=>
- string(3) "one"
- [2]=>
- string(3) "two"
- [3]=>
- string(5) "three"
- [4]=>
- string(4) "four"
- [5]=>
- string(4) "five"
+object(ArrayObject)#%d (1) {
+ ["storage":"ArrayObject":private]=>
+ object(ArrayObject)#1 (1) {
+ ["storage":"ArrayObject":private]=>
+ array(5) {
+ [1]=>
+ string(3) "one"
+ [2]=>
+ string(3) "two"
+ [3]=>
+ string(5) "three"
+ [4]=>
+ string(4) "four"
+ [5]=>
+ string(4) "five"
+ }
+ }
}
===DONE===
(
[pub] => public
[pro:protected] => protected
- [pri:private] => private
+ [pri:test:private] => private
[imp] => implicit
[dyn] => dynamic
)
ArrayObject Object
(
- [pub] => public
- [pro:protected] => protected
- [pri:private] => private
- [imp] => implicit
- [dyn] => dynamic
+ [storage:ArrayObject:private] => test Object
+ (
+ [pub] => public
+ [pro:protected] => protected
+ [pri:test:private] => private
+ [imp] => implicit
+ [dyn] => dynamic
+ )
+
)
pub => public
imp => implicit
--SKIPIF--
<?php if (!extension_loaded("spl")) print "skip"; ?>
--INI--
-allow_call_time_pass_reference=1
+error_reporting=2047
--FILE--
<?php
--SKIPIF--
<?php if (!extension_loaded("spl")) print "skip"; ?>
--INI--
-allow_call_time_pass_reference=1
+error_reporting=2047
--FILE--
<?php
(
[pub] => public
[pro:protected] => protected
- [pri:private] => private
+ [pri:test:private] => private
[imp] => implicit
[dyn] => dynamic
)
ArrayIterator Object
(
- [pub] => public
- [pro:protected] => protected
- [pri:private] => private
- [imp] => implicit
- [dyn] => dynamic
+ [storage:ArrayIterator:private] => ArrayObject Object
+ (
+ [storage:ArrayObject:private] => test Object
+ (
+ [pub] => public
+ [pro:protected] => protected
+ [pri:test:private] => private
+ [imp] => implicit
+ [dyn] => dynamic
+ )
+
+ )
+
)
pub => public
imp => implicit
--SKIPIF--
<?php if (!extension_loaded("spl")) print "skip"; ?>
--INI--
-allow_call_time_pass_reference=1
+error_reporting=2047
--FILE--
<?php
===DONE===
<?php exit(0); ?>
--EXPECTF--
-object(ArrayObject)#%d (5) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
+object(ArrayObject)#%d (1) {
+ %s"storage"%s"ArrayObject":private]=>
+ array(5) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(4)
+ [4]=>
+ int(5)
+ }
}
Notice: ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in %sarray_015.php on line %d
int(2)
-object(ArrayObject)#%d (4) {
- [1]=>
- int(2)
- [2]=>
- int(3)
- [3]=>
- int(4)
- [4]=>
- int(5)
+object(ArrayObject)#%d (1) {
+ %s"storage"%s"ArrayObject":private]=>
+ array(4) {
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ [3]=>
+ int(4)
+ [4]=>
+ int(5)
+ }
}
1=>2
3=>4
-object(ArrayObject)#%d (2) {
- [1]=>
- int(2)
- [3]=>
- int(4)
+object(ArrayObject)#%d (1) {
+ %s"storage"%s"ArrayObject":private]=>
+ array(2) {
+ [1]=>
+ int(2)
+ [3]=>
+ int(4)
+ }
}
1=>2
3=>4
Notice: main(): ArrayIterator::next(): Array was modified outside object and internal position is no longer valid in %sarray_015.php on line %d
-object(ArrayObject)#%d (0) {
+object(ArrayObject)#%d (1) {
+ %s"storage"%s"ArrayObject":private]=>
+ array(0) {
+ }
}
===DONE===
int(42)
}
["$this"]=>
- object(ArrayObjectEx)#1 (3) {
- [0]=>
- int(1)
- ["a"]=>
- int(25)
+ object(ArrayObjectEx)#%d (6) {
["pub1"]=>
- int(42)
+ int(1)
+ ["pro1":protected]=>
+ int(2)
+ ["pri1":"ArrayObjectEx":private]=>
+ int(3)
+ ["imp1"]=>
+ int(4)
+ ["dyn1"]=>
+ int(5)
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ ["a"]=>
+ int(25)
+ ["pub1"]=>
+ int(42)
+ }
}
}
ArrayObjectEx::show()
int(42)
}
["$this"]=>
- object(ArrayIteratorEx)#2 (3) {
- [0]=>
+ object(ArrayIteratorEx)#%d (6) {
+ ["pub2"]=>
int(1)
- ["a"]=>
- int(25)
- ["pub1"]=>
- int(42)
+ ["pro2":protected]=>
+ int(2)
+ ["pri2":"ArrayIteratorEx":private]=>
+ int(3)
+ ["imp2"]=>
+ int(4)
+ ["dyn2"]=>
+ int(5)
+ ["storage":"ArrayIterator":private]=>
+ object(ArrayObjectEx)#%d (6) {
+ ["pub1"]=>
+ int(1)
+ ["pro1":protected]=>
+ int(2)
+ ["pri1":"ArrayObjectEx":private]=>
+ int(3)
+ ["imp1"]=>
+ int(4)
+ ["dyn1"]=>
+ int(5)
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ ["a"]=>
+ int(25)
+ ["pub1"]=>
+ int(42)
+ }
+ }
}
}
array(1) {
int(42)
}
["$this"]=>
- object(ArrayIteratorEx)#3 (3) {
- [0]=>
+ object(ArrayIteratorEx)#%d (6) {
+ ["pub2"]=>
int(1)
- ["a"]=>
- int(25)
- ["pub1"]=>
- int(42)
+ ["pro2":protected]=>
+ int(2)
+ ["pri2":"ArrayIteratorEx":private]=>
+ int(3)
+ ["imp2"]=>
+ int(4)
+ ["dyn2"]=>
+ int(5)
+ ["storage":"ArrayIterator":private]=>
+ object(ArrayObjectEx)#%d (6) {
+ ["pub1"]=>
+ int(1)
+ ["pro1":protected]=>
+ int(2)
+ ["pri1":"ArrayObjectEx":private]=>
+ int(3)
+ ["imp1"]=>
+ int(4)
+ ["dyn1"]=>
+ int(5)
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ ["a"]=>
+ int(25)
+ ["pub1"]=>
+ int(42)
+ }
+ }
}
}
array(1) {
int(5)
}
["$this"]=>
- object(ArrayObjectEx)#1 (5) {
+ object(ArrayObjectEx)#%d (6) {
["pub1"]=>
int(1)
- ["pro1:protected"]=>
+ ["pro1":protected]=>
int(2)
- ["pri1:private"]=>
+ ["pri1":"ArrayObjectEx":private]=>
int(3)
["imp1"]=>
int(4)
["dyn1"]=>
int(5)
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ ["a"]=>
+ int(25)
+ ["pub1"]=>
+ int(42)
+ }
}
}
ArrayObjectEx::show()
int(5)
}
["$this"]=>
- object(ArrayIteratorEx)#3 (5) {
+ object(ArrayIteratorEx)#%d (6) {
["pub2"]=>
int(1)
- ["pro2:protected"]=>
+ ["pro2":protected]=>
int(2)
- ["pri2:private"]=>
+ ["pri2":"ArrayIteratorEx":private]=>
int(3)
["imp2"]=>
int(4)
["dyn2"]=>
int(5)
+ ["storage":"ArrayIterator":private]=>
+ object(ArrayObjectEx)#%d (6) {
+ ["pub1"]=>
+ int(1)
+ ["pro1":protected]=>
+ int(2)
+ ["pri1":"ArrayObjectEx":private]=>
+ int(3)
+ ["imp1"]=>
+ int(4)
+ ["dyn1"]=>
+ int(5)
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ ["a"]=>
+ int(25)
+ ["pub1"]=>
+ int(42)
+ }
+ }
}
}
array(1) {
int(5)
}
["$this"]=>
- object(ArrayIteratorEx)#2 (5) {
+ object(ArrayIteratorEx)#%d (6) {
["pub2"]=>
int(1)
- ["pro2:protected"]=>
+ ["pro2":protected]=>
int(2)
- ["pri2:private"]=>
+ ["pri2":"ArrayIteratorEx":private]=>
int(3)
["imp2"]=>
int(4)
["dyn2"]=>
int(5)
+ ["storage":"ArrayIterator":private]=>
+ object(ArrayObjectEx)#%d (6) {
+ ["pub1"]=>
+ int(1)
+ ["pro1":protected]=>
+ int(2)
+ ["pri1":"ArrayObjectEx":private]=>
+ int(3)
+ ["imp1"]=>
+ int(4)
+ ["dyn1"]=>
+ int(5)
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ ["a"]=>
+ int(25)
+ ["pub1"]=>
+ int(42)
+ }
+ }
}
}
array(1) {
int(5)
}
["$this"]=>
- object(ArrayObjectEx)#1 (5) {
+ object(ArrayObjectEx)#%d (5) {
["pub1"]=>
int(1)
- ["pro1:protected"]=>
+ ["pro1":protected]=>
int(2)
- ["pri1:private"]=>
+ ["pri1":"ArrayObjectEx":private]=>
int(3)
["imp1"]=>
int(4)
int(5)
}
["$this"]=>
- object(ArrayIteratorEx)#2 (5) {
- ["pub1"]=>
+ object(ArrayIteratorEx)#%d (6) {
+ ["pub2"]=>
int(1)
- ["pro1:protected"]=>
+ ["pro2":protected]=>
int(2)
- ["pri1:private"]=>
+ ["pri2":"ArrayIteratorEx":private]=>
int(3)
- ["imp1"]=>
+ ["imp2"]=>
int(4)
- ["dyn1"]=>
+ ["dyn2"]=>
int(5)
+ ["storage":"ArrayIterator":private]=>
+ object(ArrayObjectEx)#%d (5) {
+ ["pub1"]=>
+ int(1)
+ ["pro1":protected]=>
+ int(2)
+ ["pri1":"ArrayObjectEx":private]=>
+ int(3)
+ ["imp1"]=>
+ int(4)
+ ["dyn1"]=>
+ int(5)
+ }
}
}
array(1) {
int(5)
}
["$this"]=>
- object(ArrayIteratorEx)#3 (5) {
- ["pub1"]=>
+ object(ArrayIteratorEx)#%d (6) {
+ ["pub2"]=>
int(1)
- ["pro1:protected"]=>
+ ["pro2":protected]=>
int(2)
- ["pri1:private"]=>
+ ["pri2":"ArrayIteratorEx":private]=>
int(3)
- ["imp1"]=>
+ ["imp2"]=>
int(4)
- ["dyn1"]=>
+ ["dyn2"]=>
int(5)
+ ["storage":"ArrayIterator":private]=>
+ object(ArrayObjectEx)#%d (5) {
+ ["pub1"]=>
+ int(1)
+ ["pro1":protected]=>
+ int(2)
+ ["pri1":"ArrayObjectEx":private]=>
+ int(3)
+ ["imp1"]=>
+ int(4)
+ ["dyn1"]=>
+ int(5)
+ }
}
}
array(1) {
int(5)
}
["$this"]=>
- object(ArrayObjectEx)#1 (5) {
+ object(ArrayObjectEx)#%d (5) {
["pub1"]=>
int(1)
- ["pro1:protected"]=>
+ ["pro1":protected]=>
int(2)
- ["pri1:private"]=>
+ ["pri1":"ArrayObjectEx":private]=>
int(3)
["imp1"]=>
int(4)
int(5)
}
["$this"]=>
- object(ArrayIteratorEx)#3 (5) {
+ object(ArrayIteratorEx)#%d (6) {
["pub2"]=>
int(1)
- ["pro2:protected"]=>
+ ["pro2":protected]=>
int(2)
- ["pri2:private"]=>
+ ["pri2":"ArrayIteratorEx":private]=>
int(3)
["imp2"]=>
int(4)
["dyn2"]=>
int(5)
+ ["storage":"ArrayIterator":private]=>
+ object(ArrayObjectEx)#%d (5) {
+ ["pub1"]=>
+ int(1)
+ ["pro1":protected]=>
+ int(2)
+ ["pri1":"ArrayObjectEx":private]=>
+ int(3)
+ ["imp1"]=>
+ int(4)
+ ["dyn1"]=>
+ int(5)
+ }
}
}
array(1) {
int(5)
}
["$this"]=>
- object(ArrayIteratorEx)#2 (5) {
+ object(ArrayIteratorEx)#%d (6) {
["pub2"]=>
int(1)
- ["pro2:protected"]=>
+ ["pro2":protected]=>
int(2)
- ["pri2:private"]=>
+ ["pri2":"ArrayIteratorEx":private]=>
int(3)
["imp2"]=>
int(4)
["dyn2"]=>
int(5)
+ ["storage":"ArrayIterator":private]=>
+ object(ArrayObjectEx)#%d (5) {
+ ["pub1"]=>
+ int(1)
+ ["pro1":protected]=>
+ int(2)
+ ["pri1":"ArrayObjectEx":private]=>
+ int(3)
+ ["imp1"]=>
+ int(4)
+ ["dyn1"]=>
+ int(5)
+ }
}
}
array(1) {
===DONE===
--EXPECTF--
string(44) "An offset must not begin with \0 or be empty"
-object(ArrayObject)#%d (0) {
+object(ArrayObject)#%d (1) {
+ ["storage":"ArrayObject":private]=>
+ array(0) {
+ }
}
string(44) "An offset must not begin with \0 or be empty"
-object(ArrayObject)#%d (0) {
+object(ArrayObject)#%d (1) {
+ ["storage":"ArrayObject":private]=>
+ array(0) {
+ }
}
===DONE===
["bar"]=>
string(3) "baz"
}
-object(MyArrayObject)#%d (2) {
+object(MyArrayObject)#%d (3) {
["bar"]=>
string(3) "baz"
["baz"]=>
string(3) "Foo"
+ ["storage":"ArrayObject":private]=>
+ array(1) {
+ ["bar"]=>
+ string(3) "baz"
+ }
}
==ArrayIterator===
object(MyArrayIterator)#%d (1) {
["bar"]=>
string(3) "baz"
}
-object(MyArrayIterator)#%d (2) {
+object(MyArrayIterator)#%d (3) {
["bar"]=>
string(3) "baz"
["baz"]=>
string(3) "Foo"
+ ["storage":"ArrayIterator":private]=>
+ object(MyArrayIterator)#%d (1) {
+ ["bar"]=>
+ string(3) "baz"
+ }
}
===DONE===
CAUGHT: FAIL
FooBar Object
(
- [array:private] => Array
+ [array:FooBar:private] => Array
(
[0] => 0
[1] => 1
string(3) "baz"
Collection Object
(
- [0] => foo
- [1] => bar
- [foo] => baz
+ [data:Collection:private] => Array
+ (
+ )
+
+ [storage:ArrayObject:private] => Array
+ (
+ [0] => foo
+ [1] => bar
+ [foo] => baz
+ )
+
)
int(3)
===DONE===
break;
}
-echo "Done\n";
?>
+===DONE===
--EXPECTF--
string(%d) "%s"
string(%d) "%s"
-Done
+===DONE===
foreach($it as $file)
{
echo "First\n";
- if("." != $file && ".." != $file)
- {
- var_Dump($file->getFilename());
- }
+ var_Dump($file->getFilename());
echo "Second\n";
- if($file != "." && $file != "..")
- {
- var_dump($file->getFilename());
- }
+ var_dump($file->getFilename());
if (++$idx > 1)
{
break;
--TEST--
Bug #40872 (inconsistency in offsetSet, offsetExists treatment of string enclosed integers)
+--SKIPIF--
+<?php if (!extension_loaded("spl")) die("skip"); ?>
--FILE--
<?php
class Project {
--TEST--
Bug #41692 (ArrayObject shows weird behaviour in respect to inheritance)
+--SKIPIF--
+<?php if (!extension_loaded("spl")) die("skip"); ?>
--FILE--
<?php
echo "Done\n";
?>
--EXPECTF--
-object(Bar)#%d (3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
+object(Bar)#%d (2) {
+ ["foo":"Bar":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
}
-object(Bar)#%d (3) {
- [0]=>
- int(1)
- [1]=>
- int(2)
- [2]=>
- int(3)
+object(Bar)#%d (2) {
+ ["foo":"Bar":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
+ ["storage":"ArrayObject":private]=>
+ array(3) {
+ [0]=>
+ int(1)
+ [1]=>
+ int(2)
+ [2]=>
+ int(3)
+ }
}
Done
<?php
$it = new DirectoryIterator(dirname(__FILE__));
+$count = 0;
+
foreach ($it as $e) {
- if (gettype($e->getRealPath()) != "string") {
+ $count++;
+ $type = gettype($e->getRealPath());
+ if ($type != "string" && $type != "unicode") {
echo $e->getFilename(), " is a ", gettype($e->getRealPath()), "\n";
}
}
+if ($count > 0) {
+ echo "Found $count entries!\n";
+}
echo "===DONE==="
?>
---EXPECT--
+--EXPECTF--
+Found %i entries!
===DONE===
?>
--EXPECTF--
update 1
-object(RecursiveArrayIterator)#%d (3) {
- [1]=>
- string(4) "val1"
- [2]=>
+object(RecursiveArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
+ array(3) {
+ [1]=>
+ string(4) "val1"
+ [2]=>
+ array(2) {
+ [2]=>
+ string(4) "val2"
+ [3]=>
+ array(1) {
+ [3]=>
+ string(4) "val3"
+ }
+ }
+ [4]=>
+ string(4) "val4"
+ }
+}
+object(RecursiveArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
+ array(3) {
+ [1]=>
+ string(5) "alter"
+ [2]=>
+ array(2) {
+ [2]=>
+ string(4) "val2"
+ [3]=>
+ array(1) {
+ [3]=>
+ string(4) "val3"
+ }
+ }
+ [4]=>
+ string(4) "val4"
+ }
+}
+update 2
+object(RecursiveArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
array(2) {
[2]=>
string(4) "val2"
string(4) "val3"
}
}
- [4]=>
- string(4) "val4"
}
-object(RecursiveArrayIterator)#%d (3) {
- [1]=>
- string(5) "alter"
- [2]=>
+object(RecursiveArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
array(2) {
[2]=>
- string(4) "val2"
+ string(5) "alter"
[3]=>
array(1) {
[3]=>
string(4) "val3"
}
}
- [4]=>
- string(4) "val4"
}
-update 2
-object(RecursiveArrayIterator)#%d (2) {
- [2]=>
- string(4) "val2"
- [3]=>
+update 3
+object(RecursiveArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
array(1) {
[3]=>
string(4) "val3"
}
}
-object(RecursiveArrayIterator)#%d (2) {
- [2]=>
- string(5) "alter"
- [3]=>
+object(RecursiveArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
array(1) {
[3]=>
- string(4) "val3"
+ string(5) "alter"
}
}
-update 3
-object(RecursiveArrayIterator)#%d (1) {
- [3]=>
- string(4) "val3"
-}
-object(RecursiveArrayIterator)#%d (1) {
- [3]=>
- string(5) "alter"
-}
update 4
-object(RecursiveArrayIterator)#%d (3) {
- [1]=>
- string(5) "alter"
- [2]=>
- array(2) {
+object(RecursiveArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
+ array(3) {
+ [1]=>
+ string(5) "alter"
[2]=>
- string(4) "val2"
- [3]=>
- array(1) {
+ array(2) {
+ [2]=>
+ string(4) "val2"
[3]=>
- string(4) "val3"
+ array(1) {
+ [3]=>
+ string(4) "val3"
+ }
}
+ [4]=>
+ string(4) "val4"
}
- [4]=>
- string(4) "val4"
}
-object(RecursiveArrayIterator)#%d (3) {
- [1]=>
- string(5) "alter"
- [2]=>
- array(2) {
+object(RecursiveArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
+ array(3) {
+ [1]=>
+ string(5) "alter"
[2]=>
- string(4) "val2"
- [3]=>
- array(1) {
+ array(2) {
+ [2]=>
+ string(4) "val2"
[3]=>
- string(4) "val3"
+ array(1) {
+ [3]=>
+ string(4) "val3"
+ }
}
+ [4]=>
+ string(5) "alter"
}
- [4]=>
- string(5) "alter"
}
array(3) {
[1]=>
?>
===DONE===
--EXPECTF--
-object(DirectoryIterator)#%d (0) {
+object(DirectoryIterator)#%d (1) {
+ %s"pathName"%s"SplFileInfo":private]=>
+ %s(1) "."
}
bool(false)
bool(false)
<?php exit(0); ?>
--EXPECTF--
===0===
-object(SplFileInfo)#%d (0) {
+object(SplFileInfo)#%d (2) {
+ ["pathName":"SplFileInfo":private]=>
+ string(%d) "%s"
+ ["fileName":"SplFileInfo":private]=>
+ string(%d) "%sfileobject_001a.txt"
}
-object(SplFileInfo)#%d (0) {
+object(SplFileInfo)#%d (2) {
+ ["pathName":"SplFileInfo":private]=>
+ string(%d) "%s"
+ ["fileName":"SplFileInfo":private]=>
+ string(%d) "%sfileobject_001a.txt"
}
bool(false)
bool(true)
bool(true)
-string(%d) "%sfileobject_001a.txt"
+%s(%d) "%sfileobject_001a.txt"
string(%d) "%sfileobject_001a.txt"
bool(true)
string(19) "fileobject_001a.txt"
string(19) "fileobject_001a.txt"
string(%d) "%stests"
===1===
-object(SplFileInfo)#%d (0) {
+object(SplFileInfo)#%d (2) {
+ ["pathName":"SplFileInfo":private]=>
+ string(%d) "%s"
+ ["fileName":"SplFileInfo":private]=>
+ string(%d) "%s"
}
-object(SplFileInfo)#%d (0) {
+object(SplFileInfo)#%d (2) {
+ ["pathName":"SplFileInfo":private]=>
+ string(%d) "%s"
+ ["fileName":"SplFileInfo":private]=>
+ string(%d) "%s"
}
bool(false)
bool(true)
bool(true)
-string(%d) "%stests/"
+%s(%d) "%stests/"
string(%d) "%stests"
bool(true)
string(5) "tests"
string(%d) "%stests"
string(%d) "%stests"
===2===
-object(SplFileInfo)#1 (0) {
+object(SplFileInfo)#%d (2) {
+ ["pathName":"SplFileInfo":private]=>
+ string(%d) "%s"
+ ["fileName":"SplFileInfo":private]=>
+ string(%d) "%s"
}
-object(SplFileInfo)#2 (0) {
+object(SplFileInfo)#%d (2) {
+ ["pathName":"SplFileInfo":private]=>
+ string(%d) "%s"
+ ["fileName":"SplFileInfo":private]=>
+ string(%d) "%s"
}
bool(false)
bool(true)
bool(true)
-string(%d) "%stests"
+%s(%d) "%stests"
string(%d) "%stests"
bool(true)
string(%d) "tests"
--FILE--
<?php
-$root = simplexml_load_string('<?xml version="1.0"?>
+$root = simplexml_load_string(b'<?xml version="1.0"?>
<root>
<child>Hello</child>
<child>World</child>
?>
===DONE===
<?php exit(0); ?>
---EXPECT--
+--EXPECTF--
0=>1
hasNext: yes
1=>2
<?php exit(0); ?>
--EXPECTF--
Error Argument 1 passed to AppendIterator::append() must implement interface Iterator, array given in %siterator_042.php on line %d
-object(ArrayIterator)#%d (2) {
- [0]=>
- object(ArrayIterator)#%d (1) {
+object(ArrayIterator)#%d (1) {
+ %s"storage"%s"ArrayIterator":private]=>
+ array(2) {
[0]=>
- int(1)
- }
- [1]=>
- object(ArrayIterator)#%d (2) {
- [0]=>
- int(21)
+ object(ArrayIterator)#%d (1) {
+ %s"storage"%s"ArrayIterator":private]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ }
[1]=>
- int(22)
+ object(ArrayIterator)#%d (1) {
+ %s"storage"%s"ArrayIterator":private]=>
+ array(2) {
+ [0]=>
+ int(21)
+ [1]=>
+ int(22)
+ }
+ }
}
}
-object(ArrayIterator)#%d (3) {
- [0]=>
- object(ArrayIterator)#%d (1) {
- [0]=>
- int(1)
- }
- [1]=>
- object(ArrayIterator)#%d (2) {
- [0]=>
- int(21)
- [1]=>
- int(22)
- }
- [2]=>
- object(ArrayIterator)#5 (3) {
+object(ArrayIterator)#%d (1) {
+ %s"storage"%s"ArrayIterator":private]=>
+ array(3) {
[0]=>
- int(31)
+ object(ArrayIterator)#%d (1) {
+ %s"storage"%s"ArrayIterator":private]=>
+ array(1) {
+ [0]=>
+ int(1)
+ }
+ }
[1]=>
- int(32)
+ object(ArrayIterator)#%d (1) {
+ %s"storage"%s"ArrayIterator":private]=>
+ array(2) {
+ [0]=>
+ int(21)
+ [1]=>
+ int(22)
+ }
+ }
[2]=>
- int(33)
+ object(ArrayIterator)#5 (1) {
+ %s"storage"%s"ArrayIterator":private]=>
+ array(3) {
+ [0]=>
+ int(31)
+ [1]=>
+ int(32)
+ [2]=>
+ int(33)
+ }
+ }
}
}
===0===
int(4)
===1===
MyRecursiveArrayIterator::hasChildren()
-Exception: State 1: MyRecursiveArrayIterator::hasChildren() in %siterator_047.php on line %d
+Exception: State 1: MyRecursiveArrayIterator::hasChildren() in %s on line %d
===2===
MyRecursiveArrayIterator::hasChildren()
int(0)
int(0)
MyRecursiveArrayIterator::hasChildren()
MyRecursiveArrayIterator::getChildren()
-Exception: State 2: MyRecursiveArrayIterator::getChildren() in %siterator_047.php on line %d
+Exception: State 2: MyRecursiveArrayIterator::getChildren() in %s on line %d
===3===
MyRecursiveArrayIterator::hasChildren()
int(0)
<?php exit(0); ?>
--EXPECTF--
object(ArrayIterator)#%d (1) {
- [""]=>
- NULL
+ ["storage":"ArrayIterator":private]=>
+ array(1) {
+ [""]=>
+ NULL
+ }
}
array(1) {
[""]=>
int(1)
array(3) {
[0]=>
- string(3) "1,2"
+ %s(3) "1,2"
[1]=>
- string(1) "1"
+ %s(1) "1"
[2]=>
- string(1) "2"
+ %s(1) "2"
}
int(2)
array(3) {
[0]=>
- string(3) "1,2"
+ %s(3) "1,2"
[1]=>
- string(1) "1"
+ %s(1) "1"
[2]=>
- string(1) "2"
+ %s(1) "2"
}
int(0)
array(2) {
[0]=>
- string(1) "1"
+ %s(1) "1"
[1]=>
- string(1) "1"
+ %s(1) "1"
}
int(1)
array(2) {
[0]=>
- string(1) "1"
+ %s(1) "1"
[1]=>
- string(1) "1"
+ %s(1) "1"
}
int(2)
array(2) {
- [0]=>
- string(1) "1"
- [1]=>
- string(1) "1"
-}
-object(ArrayIterator)#%d (9) {
[0]=>
%s(1) "1"
[1]=>
- %s(3) "1,2"
- [2]=>
- %s(5) "1,2,3"
- [3]=>
- %s(0) ""
- [4]=>
- NULL
- [5]=>
- array(0) {
+ %s(1) "1"
+}
+object(ArrayIterator)#%d (1) {
+ %s"storage"%s"ArrayIterator":private]=>
+ array(9) {
+ [0]=>
+ %s(1) "1"
+ [1]=>
+ %s(3) "1,2"
+ [2]=>
+ %s(5) "1,2,3"
+ [3]=>
+ %s(0) ""
+ [4]=>
+ NULL
+ [5]=>
+ array(0) {
+ }
+ [6]=>
+ %s(6) "FooBar"
+ [7]=>
+ %s(1) ","
+ [8]=>
+ %s(2) ",,"
}
- [6]=>
- %s(6) "FooBar"
- [7]=>
- %s(1) ","
- [8]=>
- %s(2) ",,"
}
===DONE===
[1]=>
string(1) "0"
}
-object(ArrayIterator)#%d (7) {
- [1]=>
- int(0)
- ["1,2"]=>
- int(1)
- ["1,2,3"]=>
- int(2)
- [0]=>
- int(3)
- ["FooBar"]=>
- int(4)
- [","]=>
- int(5)
- [",,"]=>
- int(6)
+object(ArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
+ array(7) {
+ [1]=>
+ int(0)
+ ["1,2"]=>
+ int(1)
+ ["1,2,3"]=>
+ int(2)
+ [0]=>
+ int(3)
+ ["FooBar"]=>
+ int(4)
+ [","]=>
+ int(5)
+ [",,"]=>
+ int(6)
+ }
}
===DONE===
array(0) {
}
}
-object(ArrayIterator)#%d (9) {
- [0]=>
- %s(1) "1"
- [1]=>
- %s(3) "1,2"
- [2]=>
- %s(5) "1,2,3"
- [3]=>
- %s(0) ""
- [4]=>
- NULL
- [5]=>
- array(0) {
- }
- [6]=>
- %s(6) "FooBar"
- [7]=>
- %s(1) ","
- [8]=>
- %s(2) ",,"
+object(ArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
+ array(9) {
+ [0]=>
+ %s(1) "1"
+ [1]=>
+ %s(3) "1,2"
+ [2]=>
+ %s(5) "1,2,3"
+ [3]=>
+ %s(0) ""
+ [4]=>
+ NULL
+ [5]=>
+ array(0) {
+ }
+ [6]=>
+ %s(6) "FooBar"
+ [7]=>
+ %s(1) ","
+ [8]=>
+ %s(2) ",,"
+ }
}
===DONE===
string(1) "8"
}
}
-object(ArrayIterator)#%d (9) {
- [0]=>
- %s(1) "1"
- [1]=>
- %s(3) "1,2"
- [2]=>
- %s(5) "1,2,3"
- [3]=>
- %s(0) ""
- [4]=>
- NULL
- [5]=>
- array(0) {
+object(ArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
+ array(9) {
+ [0]=>
+ %s(1) "1"
+ [1]=>
+ %s(3) "1,2"
+ [2]=>
+ %s(5) "1,2,3"
+ [3]=>
+ %s(0) ""
+ [4]=>
+ NULL
+ [5]=>
+ array(0) {
+ }
+ [6]=>
+ %s(6) "FooBar"
+ [7]=>
+ %s(1) ","
+ [8]=>
+ %s(2) ",,"
}
- [6]=>
- %s(6) "FooBar"
- [7]=>
- %s(1) ","
- [8]=>
- %s(2) ",,"
}
===DONE===
[2]=>
string(0) ""
}
-object(ArrayIterator)#%d (9) {
- [0]=>
- %s(1) "1"
- [1]=>
- %s(3) "1,2"
- [2]=>
- %s(5) "1,2,3"
- [3]=>
- %s(0) ""
- [4]=>
- NULL
- [5]=>
- array(0) {
+object(ArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
+ array(9) {
+ [0]=>
+ %s(1) "1"
+ [1]=>
+ %s(3) "1,2"
+ [2]=>
+ %s(5) "1,2,3"
+ [3]=>
+ %s(0) ""
+ [4]=>
+ NULL
+ [5]=>
+ array(0) {
+ }
+ [6]=>
+ %s(6) "FooBar"
+ [7]=>
+ %s(1) ","
+ [8]=>
+ %s(2) ",,"
}
- [6]=>
- %s(6) "FooBar"
- [7]=>
- %s(1) ","
- [8]=>
- %s(2) ",,"
}
===DONE===
[1]=>
string(2) ",3"
}
-object(ArrayIterator)#%d (7) {
- [1]=>
- int(0)
- ["1,2"]=>
- int(1)
- ["1,2,3"]=>
- int(2)
- [0]=>
- int(3)
- ["FooBar"]=>
- int(4)
- [","]=>
- int(5)
- [",,"]=>
- int(6)
+object(ArrayIterator)#%d (1) {
+ ["storage":"ArrayIterator":private]=>
+ array(7) {
+ [1]=>
+ int(0)
+ ["1,2"]=>
+ int(1)
+ ["1,2,3"]=>
+ int(2)
+ [0]=>
+ int(3)
+ ["FooBar"]=>
+ int(4)
+ [","]=>
+ int(5)
+ [",,"]=>
+ int(6)
+ }
}
===DONE===
int(2)
int(1)
int(2)
-object(MyStorage)#%d (1) {
+object(MyStorage)#%d (2) {
["bla"]=>
int(26)
+ ["storage":"SplObjectStorage":private]=>
+ array(2) {
+ ["%s"]=>
+ object(TestClass)#%d (1) {
+ ["test"]=>
+ int(1)
+ }
+ ["%s"]=>
+ object(TestClass)#%d (1) {
+ ["test"]=>
+ int(2)
+ }
+ }
}
string(%d) "%s"
===UNSERIALIZE===
int(2)
int(1)
int(2)
-object(MyStorage)#%d (1) {
+object(MyStorage)#%d (2) {
["bla"]=>
int(26)
+ ["storage":"SplObjectStorage":private]=>
+ array(2) {
+ ["%s"]=>
+ object(TestClass)#%d (1) {
+ ["test"]=>
+ int(1)
+ }
+ ["%s"]=>
+ object(TestClass)#%d (1) {
+ ["test"]=>
+ int(2)
+ }
+ }
}
===DONE===
int(24)
["pub"]=>
int(4)
- ["pro:protected"]=>
+ ["pro":protected]=>
int(5)
- ["pri:private"]=>
+ ["pri":"TestClass":private]=>
int(6)
}
object(TestClass)#%d (4) {
int(24)
["pub"]=>
int(7)
- ["pro:protected"]=>
+ ["pro":protected]=>
int(8)
- ["pri:private"]=>
+ ["pri":"TestClass":private]=>
int(9)
}
-object(MyStorage)#%d (4) {
+object(MyStorage)#%d (5) {
["def"]=>
int(24)
["pub"]=>
int(1)
- ["pro:protected"]=>
+ ["pro":protected]=>
int(2)
- ["pri:private"]=>
+ ["pri":"MyStorage":private]=>
int(3)
+ ["storage":"SplObjectStorage":private]=>
+ array(2) {
+ ["%s"]=>
+ object(TestClass)#%d (4) {
+ ["def"]=>
+ int(24)
+ ["pub"]=>
+ int(4)
+ ["pro":protected]=>
+ int(5)
+ ["pri":"TestClass":private]=>
+ int(6)
+ }
+ ["%s"]=>
+ object(TestClass)#%d (4) {
+ ["def"]=>
+ int(24)
+ ["pub"]=>
+ int(7)
+ ["pro":protected]=>
+ int(8)
+ ["pri":"TestClass":private]=>
+ int(9)
+ }
+ }
}
string(%d) "%s"
===UNSERIALIZE===
int(24)
["pub"]=>
int(4)
- ["pro:protected"]=>
+ ["pro":protected]=>
int(5)
- ["pri:private"]=>
+ ["pri":"TestClass":private]=>
int(6)
}
object(TestClass)#%d (4) {
int(24)
["pub"]=>
int(7)
- ["pro:protected"]=>
+ ["pro":protected]=>
int(8)
- ["pri:private"]=>
+ ["pri":"TestClass":private]=>
int(9)
}
-object(MyStorage)#%d (4) {
+object(MyStorage)#%d (5) {
["def"]=>
int(24)
["pub"]=>
int(1)
- ["pro:protected"]=>
+ ["pro":protected]=>
int(2)
- ["pri:private"]=>
+ ["pri":"MyStorage":private]=>
int(3)
+ ["storage":"SplObjectStorage":private]=>
+ array(2) {
+ ["%s"]=>
+ object(TestClass)#%d (4) {
+ ["def"]=>
+ int(24)
+ ["pub"]=>
+ int(4)
+ ["pro":protected]=>
+ int(5)
+ ["pri":"TestClass":private]=>
+ int(6)
+ }
+ ["%s"]=>
+ object(TestClass)#%d (4) {
+ ["def"]=>
+ int(24)
+ ["pub"]=>
+ int(7)
+ ["pro":protected]=>
+ int(8)
+ ["pri":"TestClass":private]=>
+ int(9)
+ }
+ }
}
===DONE===
}
bool(false)
bool(false)
-===DONE===
\ No newline at end of file
+===DONE===
Error: Argument 3 passed to iterator_apply() must be an array, integer given
Error: iterator_apply() expects parameter 3 to be array, integer given
NULL
-Error: iterator_apply() expects parameter 2 to be function,%sstring given
+Error: iterator_apply() expects parameter 2 to be valid callback,%sstring given
NULL
Error: iterator_apply() expects at most 3 parameters, 4 given
NULL
--TEST--
-SPL: spl_autoloadfunctions()
+SPL: spl_autoload_functions()
--SKIPIF--
<?php
- if (!extension_loaded("spl")) die ("skip");
+ if (!extension_loaded("spl")) die("skip");
if (spl_autoload_functions() !== false) die('skip __autoload() registered by php.ini');
?>
--FILE--
</sxe>
EOF;
-var_dump(simplexml_load_string($xml, 'SimpleXMLIterator'));
+var_dump(simplexml_load_string((binary)$xml, 'SimpleXMLIterator'));
?>
===DONE===
</sxe>
EOF;
-$sxe = simplexml_load_string($xml, 'SimpleXMLIterator');
+$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator');
foreach(new RecursiveIteratorIterator($sxe, 1) as $name => $data) {
var_dump($name);
</sxe>
EOF;
-$sxe = simplexml_load_string($xml, 'SimpleXMLIterator');
+$sxe = simplexml_load_string((binary)$xml, 'SimpleXMLIterator');
foreach($sxe->getChildren() as $name => $data) {
var_dump($name);
}
}
-$sxe = new SXETest($xml);
+$sxe = new SXETest((binary)$xml);
$rit = new RecursiveIteratorIterator($sxe, RecursiveIteratorIterator::SELF_FIRST);
foreach($rit as $data) {
}
}
-$sxe = new SXETest($xml);
+$sxe = new SXETest((binary)$xml);
var_dump(count($sxe));
var_dump(count($sxe->elem1));
}
?>
---EXPECT--
+--EXPECTF--
Unsorted data:
array(8) {
[0]=>
string(6) "test10"
[6]=>
string(6) "test21"
-}
\ No newline at end of file
+}
--EXPECTF--
*** Testing Error Conditions ***
-Warning: Wrong parameter count for array_shift() in %s line %d
+Warning: array_shift() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-Warning: array_shift(): The argument should be an array in %s on line %d
+Warning: array_shift() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_shift(): The argument should be an array in %s on line %d
+Warning: array_shift() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: Wrong parameter count for array_shift() in %s on line %d
+Warning: array_shift() expects exactly 1 parameter, 2 given in %s on line %d
NULL
NULL
if ($a->priv_member === $b->priv_member) return 0;
return ($a->priv_member > $b->priv_member)? 1:-1;
}
-
- function __toString() {
- return "Object";
- }
}
function comp_func($a, $b) {
var_dump(array_udiff_uassoc($a, $b, array("cr", "comp_func_cr"), "comp_func"));
-echo '$a='.var_export($a,TRUE).";\n";
-echo '$b='.var_export($b,TRUE).";\n";
-echo 'var_dump(array_diff_assoc($a, $b));'."\n";
-var_dump(@array_diff_assoc($a, $b));
-
-
echo '$a='.var_export($a,TRUE).";\n";
echo '$b='.var_export($b,TRUE).";\n";
echo 'var_dump(array_udiff($a, $b, "comp_func_cr"));'."\n";
array(3) {
["0.1"]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(9)
["public_member"]=>
int(9)
}
["0.5"]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(12)
["public_member"]=>
int(12)
}
[0]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(23)
["public_member"]=>
int(23)
array(3) {
["0.1"]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(9)
["public_member"]=>
int(9)
}
["0.5"]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(12)
["public_member"]=>
int(12)
}
[0]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(23)
["public_member"]=>
int(23)
'public_member' => -15,
)),
);
-var_dump(array_diff_assoc($a, $b));
-array(1) {
- ["0.1"]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(9)
- ["public_member"]=>
- int(9)
- }
-}
-$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:private"]=>
+ ["priv_member":"cr":private]=>
int(12)
["public_member"]=>
int(12)
}
[0]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(23)
["public_member"]=>
int(23)
array(3) {
["0.1"]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(9)
["public_member"]=>
int(9)
}
["0.5"]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(12)
["public_member"]=>
int(12)
}
[0]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(23)
["public_member"]=>
int(23)
var_dump( reset($float_var) );
var_dump( reset($string) );
-echo "\n*** Testing operation on Objects ***\n";
-// class having members of different scope
-class test_class
-{
- private $private_var = "private_var";
- public $public_var = "public_var";
- protected $protected_var = "protected_var";
- private $var1 = 10;
- public $var2 = 30;
- protected $var3 = 40;
- var $integer = 3092;
-
- private function private_fun() {
- echo "private_fun() called\n";
- }
-
- protected function protected_fun() {
- echo "protected_fun() called\n";
- }
-
- public function public_fun() {
- echo "public_fun() called\n";
- }
-}
-// class with no member variables
-class zero_member_var_class
-{
- public function fun() {
- echo "fun() called\n";
- }
-}
-// class with no members
-class zero_member_class
-{
- // no members
-}
-
-//create object of all classes defined above
-$test_class_obj = new test_class();
-$zero_member_var_class_obj = new zero_member_var_class();
-$zero_member_class_obj = new zero_member_class();
-
-$object_array = array (
- $test_class_obj,
- $zero_member_var_class_obj,
- $zero_member_class_obj
-);
-
-/* loop to use function key(), current(), next() and reset()
- on different class objects */
-$loop_count = 1;
-foreach( $object_array as $object ) {
- echo "--- Outerloop Iteration $loop_count ---\n";
-
- /* dump the object before performing operation on it */
- echo "Object before performing operations ...\n";
- var_dump($object) ;
-
- /* loop to feach all the key/value pair from the object*/
- $inner_loop_count = 1;
- do {
- echo "-- Innerloop iteration $inner_loop_count of Outerloop Iteration $loop_count --\n";
- $inner_loop_count ++;
-
- // print the key/value pair of the current value
- echo "current => "; var_dump( current($object) ); // key & value pair
- echo "key => "; var_dump( key($object) ); // key
-
- $next_pair = next($object);
- echo "next => "; var_dump($next_pair);
-
- } while( FALSE != $next_pair );
-
- $loop_count++;
-
- /* reset the object */
- echo "reset => "; var_dump( reset($object) );
- echo "current => "; var_dump( current($object) ); // first variable in object
-
- echo "\nObject after performing operations ...\n";
- var_dump($object) ; // no change expected
-}
-
echo "Done\n";
?>
--EXPECTF--
-- Testing variation: when array is unset --
-Warning: current(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: current() expects parameter 1 to be array, null given in %s on line %d
+NULL
-Warning: key(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: key() expects parameter 1 to be array, null given in %s on line %d
+NULL
-Warning: next(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: next() expects parameter 1 to be array, null given in %s on line %d
+NULL
-Warning: reset(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: reset() expects parameter 1 to be array, null given in %s on line %d
+NULL
*** Testing error conditions ***
-Warning: Wrong parameter count for key() in %s on line %d
+Warning: key() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-Warning: Wrong parameter count for current() in %s on line %d
+Warning: current() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-Warning: Wrong parameter count for reset() in %s on line %d
+Warning: reset() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-Warning: Wrong parameter count for next() in %s on line %d
+Warning: next() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-Warning: Wrong parameter count for key() in %s on line %d
+Warning: key() expects exactly 1 parameter, 2 given in %s on line %d
NULL
-Warning: Wrong parameter count for current() in %s on line %d
+Warning: current() expects exactly 1 parameter, 2 given in %s on line %d
NULL
-Warning: Wrong parameter count for reset() in %s on line %d
+Warning: reset() expects exactly 1 parameter, 2 given in %s on line %d
NULL
-Warning: Wrong parameter count for next() in %s on line %d
+Warning: next() expects exactly 1 parameter, 2 given in %s on line %d
NULL
-Warning: key(): Passed variable is not an array or object in %s on line %d
-bool(false)
-
-Warning: key(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: key() expects parameter 1 to be array, integer given in %s on line %d
+NULL
-Warning: key(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: key() expects parameter 1 to be array, double given in %s on line %d
+NULL
-Warning: current(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: key() expects parameter 1 to be array, string given in %s on line %d
+NULL
-Warning: current(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: current() expects parameter 1 to be array, integer given in %s on line %d
+NULL
-Warning: current(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: current() expects parameter 1 to be array, double given in %s on line %d
+NULL
-Warning: next(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: current() expects parameter 1 to be array, string given in %s on line %d
+NULL
-Warning: next(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: next() expects parameter 1 to be array, integer given in %s on line %d
+NULL
-Warning: next(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: next() expects parameter 1 to be array, double given in %s on line %d
+NULL
-Warning: reset(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: next() expects parameter 1 to be array, string given in %s on line %d
+NULL
-Warning: reset(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: reset() expects parameter 1 to be array, integer given in %s on line %d
+NULL
-Warning: reset(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: reset() expects parameter 1 to be array, double given in %s on line %d
+NULL
-*** Testing operation on Objects ***
---- Outerloop Iteration 1 ---
-Object before performing operations ...
-object(test_class)#1 (7) {
- ["private_var:private"]=>
- string(11) "private_var"
- ["public_var"]=>
- string(10) "public_var"
- ["protected_var:protected"]=>
- string(13) "protected_var"
- ["var1:private"]=>
- int(10)
- ["var2"]=>
- int(30)
- ["var3:protected"]=>
- int(40)
- ["integer"]=>
- int(3092)
-}
--- Innerloop iteration 1 of Outerloop Iteration 1 --
-current => string(11) "private_var"
-key => string(23) "\0test_class\0private_var"
-next => string(10) "public_var"
--- Innerloop iteration 2 of Outerloop Iteration 1 --
-current => string(10) "public_var"
-key => string(10) "public_var"
-next => string(13) "protected_var"
--- Innerloop iteration 3 of Outerloop Iteration 1 --
-current => string(13) "protected_var"
-key => string(16) "\0*\0protected_var"
-next => int(10)
--- Innerloop iteration 4 of Outerloop Iteration 1 --
-current => int(10)
-key => string(16) "\0test_class\0var1"
-next => int(30)
--- Innerloop iteration 5 of Outerloop Iteration 1 --
-current => int(30)
-key => string(4) "var2"
-next => int(40)
--- Innerloop iteration 6 of Outerloop Iteration 1 --
-current => int(40)
-key => string(7) "\0*\0var3"
-next => int(3092)
--- Innerloop iteration 7 of Outerloop Iteration 1 --
-current => int(3092)
-key => string(7) "integer"
-next => bool(false)
-reset => string(11) "private_var"
-current => string(11) "private_var"
-
-Object after performing operations ...
-object(test_class)#1 (7) {
- ["private_var:private"]=>
- string(11) "private_var"
- ["public_var"]=>
- string(10) "public_var"
- ["protected_var:protected"]=>
- string(13) "protected_var"
- ["var1:private"]=>
- int(10)
- ["var2"]=>
- int(30)
- ["var3:protected"]=>
- int(40)
- ["integer"]=>
- int(3092)
-}
---- Outerloop Iteration 2 ---
-Object before performing operations ...
-object(zero_member_var_class)#2 (0) {
-}
--- Innerloop iteration 1 of Outerloop Iteration 2 --
-current => bool(false)
-key => NULL
-next => bool(false)
-reset => bool(false)
-current => bool(false)
-
-Object after performing operations ...
-object(zero_member_var_class)#2 (0) {
-}
---- Outerloop Iteration 3 ---
-Object before performing operations ...
-object(zero_member_class)#3 (0) {
-}
--- Innerloop iteration 1 of Outerloop Iteration 3 --
-current => bool(false)
-key => NULL
-next => bool(false)
-reset => bool(false)
-current => bool(false)
-
-Object after performing operations ...
-object(zero_member_class)#3 (0) {
-}
+Warning: reset() expects parameter 1 to be array, string given in %s on line %d
+NULL
Done
echo "end\n";
?>
--EXPECTF--
-Warning: array_change_key_case(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_change_key_case() expects parameter 1 to be array, integer given in %s on line %d
+NULL
-Warning: array_change_key_case(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_change_key_case() expects parameter 1 to be array, integer given in %s on line %d
+NULL
-Warning: Wrong parameter count for array_change_key_case() in %s on line %d
+Warning: array_change_key_case() expects at least 1 parameter, 0 given in %s on line %d
NULL
-Warning: Wrong parameter count for array_change_key_case() in %s on line %d
+Warning: array_change_key_case() expects at most 2 parameters, 3 given in %s on line %d
NULL
end
echo "end\n";
?>
--EXPECTF--
-array(4) {
- ["one"]=>
- int(1)
- ["two"]=>
- int(2)
- ["three"]=>
- int(3)
- ["four"]=>
- string(4) "four"
-}
+Warning: array_change_key_case() expects parameter 2 to be long, string given in %s on line %d
+NULL
array(4) {
["ONE"]=>
int(1)
["one"]=>
int(4)
}
-array(1) {
- ["one"]=>
- int(5)
-}
+
+Warning: array_change_key_case() expects parameter 2 to be long, string given in %s on line %d
+NULL
array(1) {
["ONE"]=>
int(3)
Test array_fill() function : basic functionality
--FILE--
<?php
-/* Prototype : array array_fill(int $start_key, int $num, mixed $val)
+/* Prototype : proto array array_fill(int start_key, int num, mixed val)
* Description: Create an array containing num elements starting with index start_key each initialized to val
* Source code: ext/standard/array.c
*/
echo "*** Testing array_fill() : basic functionality ***\n";
// calling the array_fill with all possible valid values for 'val' argument
-
$start_key = 0 ;
$num = 2;
$heredoc = <<<HERE_DOC
echo "-- Iteration $counter --\n";
$val = $values[$i];
- var_dump( array_fill($start_key, $num, $val) );
+ var_dump( array_fill($start_key,$num,$val) );
$counter++;
}
Test array_fill() function : error conditions
--FILE--
<?php
-/* Prototype : array array_fill(int $start_key, int $num, mixed $val)
+/* Prototype : proto array array_fill(int start_key, int num, mixed val)
* Description: Create an array containing num elements starting with index start_key each initialized to val
* Source code: ext/standard/array.c
- */
+*/
echo "*** Testing array_fill() : error conditions ***\n";
$num = 2;
$val = 1;
$extra_arg = 10;
-var_dump( array_fill($start_key, $num,$val, $extra_arg) );
+var_dump( array_fill($start_key,$num,$val, $extra_arg) );
// Less than the expected number of arguments
echo "-- Testing array_fill() function with less than expected no. of arguments --\n";
$start_key = 0;
$num = 2;
-var_dump( array_fill($start_key, $num) );
+var_dump( array_fill($start_key,$num) );
//calling array_fill with negative values for 'num' parameter
$num = -1;
-var_dump( array_fill($start_key, $num, $val) );
+var_dump( array_fill($start_key,$num,$val) );
//callin array_fill with 'num' equal to zero value
$num = 0;
-var_dump( array_fill($start_key, $num, $val) );
+var_dump( array_fill($start_key,$num,$val) );
echo "Done";
?>
*** Testing array_fill() : error conditions ***
-- Testing array_fill() function with Zero arguments --
-Warning: Wrong parameter count for array_fill() in %s on line %d
+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: Wrong parameter count for array_fill() in %s on line %d
+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: Wrong parameter count for array_fill() in %s on line %d
+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
{
}
-//class with public, static, constant members and consturctor to initialize the public member
+//class with public member, static member , constant and consturctor to initialize the public member
class Test1
{
const test1_constant = "test1";
var $var1 = 30;
var $var2;
- function __construct($value1, $value2)
+ function __construct($value1 , $value2)
{
$this->member1 = $value1;
$this->var2 = $value2;
{
public $member2;
- function __construct($value1, $value2, $value3)
+ function __construct($value1 , $value2 , $value3)
{
- parent::__construct($value1, $value2);
+ parent::__construct($value1 , $value2);
$this->member2 = $value3;
}
}
-//class with private, static, constant members and constructor to initialize the private member
+//class with private member, static member, constant and constructor to initialize the private member
class Test2
{
const test2_constant = "test2";
var $var1 = 30;
var $var2;
- function __construct($value1,$value2)
+ function __construct($value1 , $value2)
{
$this->member1 = $value1;
$this->var2 = $value2;
{
private $member1;
- function __construct($value1, $value2, $value3)
+ function __construct($value1 , $value2 , $value3)
{
- parent::__construct($value1, $value2);
+ parent::__construct($value1 , $value2);
$this->member1 = $value3;
}
}
-// class with protected, static, constant members and consturctor to initialize the protected member
+// class with protected member, static member, constant and consturctor to initialize the protected member
class Test3
{
const test3_constant = "test3";
var $var1 = 30;
var $var2;
- function __construct($value1, $value2)
+ function __construct($value1 , $value2)
{
$this->member1 = $value1;
$this->var2 = $value2;
{
protected $member1;
- function __construct($value1, $value2, $value3)
+ function __construct($value1 , $value2 , $value3)
{
- parent::__construct($value1, $value2);
+ parent::__construct($value1 , $value2);
$this->member1 = $value3;
}
}
private $member2;
protected $member3;
- function __construct($value1, $value2, $value3)
+ function __construct($value1 , $value2 , $value3)
{
$this->member1 = $value1;
$this->member2 = $value2;
{
var $var1;
- function __construct($value1, $value2, $value3, $value4)
+ function __construct($value1 , $value2 , $value3 , $value4)
{
- parent::__construct($value1, $value2, $value3);
+ parent::__construct($value1 , $value2 , $value3);
$this->var1 = $value4;
}
}
echo "-- Iteration $counter --\n";
$val = $objects[$index];
- var_dump( array_fill($start_key, $num, $val) );
+ var_dump( array_fill($start_key,$num,$val) );
$counter++;
}
array(2) {
[0]=>
object(Test2)#%d (3) {
- ["member1:private"]=>
+ ["member1":"Test2":private]=>
int(100)
["var1"]=>
int(30)
}
[1]=>
object(Test2)#%d (3) {
- ["member1:private"]=>
+ ["member1":"Test2":private]=>
int(100)
["var1"]=>
int(30)
array(2) {
[0]=>
object(Child_test2)#%d (4) {
- ["member1:private"]=>
+ ["member1":"Child_test2":private]=>
int(102)
- ["member1:private"]=>
+ ["member1":"Test2":private]=>
int(100)
["var1"]=>
int(30)
}
[1]=>
object(Child_test2)#%d (4) {
- ["member1:private"]=>
+ ["member1":"Child_test2":private]=>
int(102)
- ["member1:private"]=>
+ ["member1":"Test2":private]=>
int(100)
["var1"]=>
int(30)
array(2) {
[0]=>
object(Test3)#%d (3) {
- ["member1:protected"]=>
+ ["member1":protected]=>
int(100)
["var1"]=>
int(30)
}
[1]=>
object(Test3)#%d (3) {
- ["member1:protected"]=>
+ ["member1":protected]=>
int(100)
["var1"]=>
int(30)
array(2) {
[0]=>
object(Child_test3)#%d (3) {
- ["member1:protected"]=>
+ ["member1":protected]=>
int(102)
["var1"]=>
int(30)
}
[1]=>
object(Child_test3)#%d (3) {
- ["member1:protected"]=>
+ ["member1":protected]=>
int(102)
["var1"]=>
int(30)
object(Test4)#%d (3) {
["member1"]=>
int(100)
- ["member2:private"]=>
+ ["member2":"Test4":private]=>
int(101)
- ["member3:protected"]=>
+ ["member3":protected]=>
int(102)
}
[1]=>
object(Test4)#%d (3) {
["member1"]=>
int(100)
- ["member2:private"]=>
+ ["member2":"Test4":private]=>
int(101)
- ["member3:protected"]=>
+ ["member3":protected]=>
int(102)
}
}
int(103)
["member1"]=>
int(100)
- ["member2:private"]=>
+ ["member2":"Test4":private]=>
int(101)
- ["member3:protected"]=>
+ ["member3":protected]=>
int(102)
}
[1]=>
int(103)
["member1"]=>
int(100)
- ["member2:private"]=>
+ ["member2":"Test4":private]=>
int(101)
- ["member3:protected"]=>
+ ["member3":protected]=>
int(102)
}
}
object(ConcreteClass1)#%d (4) {
["member1"]=>
NULL
- ["member2:private"]=>
+ ["member2":"AbstractClass":private]=>
NULL
- ["member3:protected"]=>
+ ["member3":protected]=>
NULL
["var1"]=>
int(30)
object(ConcreteClass1)#%d (4) {
["member1"]=>
NULL
- ["member2:private"]=>
+ ["member2":"AbstractClass":private]=>
NULL
- ["member3:protected"]=>
+ ["member3":protected]=>
NULL
["var1"]=>
int(30)
object(Template1)#%d (0) {
}
}
-Done
\ No newline at end of file
+Done
--TEST--
-Test array_fill() function : usage variations - unexpected values for 'start_key' argument(Bug#43017)
+Test array_fill() function : usage variations - unexpected values for 'start_key' argument
--FILE--
<?php
-/* Prototype : array array_fill(int $start_key, int $num, mixed $val)
+/* Prototype : proto array array_fill(int start_key, int num, mixed val)
* Description: Create an array containing num elements starting with index start_key each initialized to val
* Source code: ext/standard/array.c
*/
/* 1 */ 10.5,
-10.5,
12.3456789000e10,
- 12.3456789000E-10,
+ 12.34567890006E-10,
.5,
// array values
}
-- Iteration 6 --
-Warning: array_fill(): Wrong data type for start key in %s on line %d
-bool(false)
+Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d
+NULL
-- Iteration 7 --
-Warning: array_fill(): Wrong data type for start key in %s on line %d
-bool(false)
+Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d
+NULL
-- Iteration 8 --
-Warning: array_fill(): Wrong data type for start key in %s on line %d
-bool(false)
+Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d
+NULL
-- Iteration 9 --
-Warning: array_fill(): Wrong data type for start key in %s on line %d
-bool(false)
+Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d
+NULL
-- Iteration 10 --
-Warning: array_fill(): Wrong data type for start key in %s on line %d
-bool(false)
+Warning: array_fill() expects parameter 1 to be long, array given in %s on line %d
+NULL
-- Iteration 11 --
-
array(2) {
[0]=>
int(100)
int(100)
}
-- Iteration 12 --
-
array(2) {
[0]=>
int(100)
int(100)
}
-- Iteration 13 --
-
array(2) {
[1]=>
int(100)
int(100)
}
-- Iteration 14 --
-
array(2) {
[0]=>
int(100)
int(100)
}
-- Iteration 15 --
-
array(2) {
[1]=>
int(100)
int(100)
}
-- Iteration 16 --
-
array(2) {
[0]=>
int(100)
int(100)
}
-- Iteration 17 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
+
+Warning: array_fill() expects parameter 1 to be long, string given in %s on line %d
+NULL
-- Iteration 18 --
-array(2) {
- [0]=>
- int(100)
- [1]=>
- int(100)
-}
+
+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 20 --
+-- Iteration 23 --
array(2) {
[0]=>
int(100)
[1]=>
int(100)
}
--- Iteration 21 --
-
-Warning: array_fill(): Wrong data type for start key in %s on line %d
-bool(false)
--- Iteration 22 --
-
-Warning: array_fill(): Wrong data type for start key in %s on line %d
-bool(false)
--- Iteration 23 --
-
-Warning: array_fill(): Wrong data type for start key in %s on line %d
-bool(false)
-- Iteration 24 --
-Warning: array_fill(): Wrong data type for start key in %s on line %d
-bool(false)
+Warning: array_fill() expects parameter 1 to be long, resource given in %s on line %d
+NULL
Done
Test array_fill() function : usage variations - unexpected values for 'num' argument
--FILE--
<?php
-/* Prototype : array array_fill(int $start_key, int $num, mixed $val)
+/* Prototype : proto array array_fill(int start_key, int num, mixed val)
* Description: Create an array containing num elements starting with index start_key each initialized to val
* Source code: ext/standard/array.c
*/
echo "*** Testing array_fill() : usage variations ***\n";
-// Initialise function arguments not being substituted (if any)
+// Initialise function arguments not being substituted
$start_key = 0;
$val = 100;
@$undefined_var,
// unset variable
- /* 23 */ @$unset_var,
+ /* 24 */ @$unset_var,
);
echo "-- Iteration $counter --\n";
$num = $values[$index];
- var_dump( array_fill($start_key, $num, $val) );
+ var_dump( array_fill($start_key,$num,$val) );
$counter ++;
}
bool(false)
-- Iteration 6 --
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
+Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d
+NULL
-- Iteration 7 --
-array(1) {
- [0]=>
- int(100)
-}
+
+Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d
+NULL
-- Iteration 8 --
-array(1) {
- [0]=>
- int(100)
-}
+
+Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d
+NULL
-- Iteration 9 --
-array(1) {
- [0]=>
- int(100)
-}
+
+Warning: array_fill() expects parameter 2 to be long, array given in %s on line %d
+NULL
-- Iteration 10 --
-array(1) {
- [0]=>
- int(100)
-}
+
+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 17 --
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
+Warning: array_fill() expects parameter 2 to be long, string given in %s on line %d
+NULL
-- Iteration 18 --
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
+Warning: array_fill() expects parameter 2 to be long, string given in %s on line %d
+NULL
-- Iteration 19 --
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
+Warning: array_fill() expects parameter 2 to be long, string given in %s on line %d
+NULL
-- Iteration 20 --
-Warning: array_fill(): Number of elements must be positive in %s on line %d
-bool(false)
+Warning: array_fill() expects parameter 2 to be long, string given in %s on line %d
+NULL
-- Iteration 21 --
-Notice: Object of class test could not be converted to int in %s on line %d
-array(1) {
- [0]=>
- int(100)
-}
+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
echo "-- Iteration $counter --\n";
$val = $values[$index];
- var_dump( array_fill($start_key, $num, $val) );
+ var_dump( array_fill($start_key , $num , $val) );
$counter++;
}
[1]=>
NULL
}
-Done
\ No newline at end of file
+Done
--TEST--
-Test array_fill() function : usage variations - using return value of array_fill as 'val' arugment
+Test array_fill() function : usage variations - using return value of array_fill for 'val' argument
--FILE--
<?php
-/* Prototype : array array_fill(int $start_key, int $num, mixed $val)
+/* Prototype : proto array array_fill(int start_key, int num, mixed val)
* Description: Create an array containing num elements starting with index start_key each initialized to val
* Source code: ext/standard/array.c
*/
echo "-- Iteration $counter --\n";
$val = $values[$i];
- var_dump( array_fill($start_key, $num, array_fill($start_key, $num, $val)) );
+ var_dump( array_fill($start_key,$num,array_fill($start_key,$num,$val)) );
$counter++;
}
echo "-- Iteration $counter --\n";
$val = $values[$i];
- var_dump( array_fill($start_key, $num, $val) );
+ var_dump( array_fill($start_key , $num , $val) );
$counter++;
}
array(0) {
}
-Warning: array_filter(): The second argument, 'Array', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, array given in %s on line %d
NULL
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_filter(): The second argument, '1', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, integer given in %s on line %d
NULL
== DONE ==
--EXPECTF--
*** Testing array_filter() : error conditions ***
-- Testing array_filter() function with Zero arguments --
-Warning: Wrong parameter count for array_filter() in %s on line %d
+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: Wrong parameter count for array_filter() in %s on line %d
+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(): The second argument, 'even', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d
NULL
Done
}
[2]=>
object(ChildClass)#%d (2) {
- ["var3:private"]=>
+ ["var3":"ChildClass":private]=>
NULL
- ["var2:protected"]=>
+ ["var2":protected]=>
int(5)
}
[3]=>
object(FinalClass)#%d (1) {
- ["var4:private"]=>
+ ["var4":"FinalClass":private]=>
NULL
}
[4]=>
}
[2]=>
object(ChildClass)#%d (2) {
- ["var3:private"]=>
+ ["var3":"ChildClass":private]=>
NULL
- ["var2:protected"]=>
+ ["var2":protected]=>
int(5)
}
[3]=>
object(FinalClass)#%d (1) {
- ["var4:private"]=>
+ ["var4":"FinalClass":private]=>
NULL
}
[4]=>
* Source code: ext/standard/array.c
*/
-/* Testing different scalar and non-scalar values for 'input' argument
+/* Passing different scalar and nonscalar values for 'input' argument
*/
echo "*** Testing array_filter() : usage variations - unexpected values for 'input'***\n";
*** Testing array_filter() : usage variations - unexpected values for 'input'***
-- Iteration 1 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, integer given in %s on line %d
NULL
-- Iteration 2 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, integer given in %s on line %d
NULL
-- Iteration 3 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, integer given in %s on line %d
NULL
-- Iteration 4 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, integer given in %s on line %d
NULL
-- Iteration 5 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 6 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 7 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 8 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 9 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 10 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d
NULL
-- Iteration 11 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d
NULL
-- Iteration 12 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-- Iteration 13 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-- Iteration 14 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-- Iteration 15 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-- Iteration 16 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 17 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 18 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 19 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 20 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, object given in %s on line %d
NULL
-- Iteration 21 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, resource given in %s on line %d
NULL
-- Iteration 22 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d
NULL
-- Iteration 23 --
-Warning: array_filter(): The first argument should be an array in %s on line %d
+Warning: array_filter() expects parameter 1 to be array, null given in %s on line %d
NULL
Done
* Source code: ext/standard/array.c
*/
-/* Testing different scalar non-scalar values in place of 'callback' argument
+/* Passing different scalar and nonscalar values in place of 'callback' argument
*/
echo "*** Testing array_filter() : usage variations - unexpected values for 'callback' function***\n";
// resource variable
$fp = fopen(__FILE__, 'r');
-// different scalar/non-scalar values inplace of 'callback'
+// different scalar and nonscalar values in place of callback function
$values = array(
// int data
--EXPECTF--
*** Testing array_filter() : usage variations - unexpected values for 'callback' function***
-- Iteration 1 --
-Warning: array_filter(): The second argument, '0', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, integer given in %s on line %d
NULL
-- Iteration 2 --
-Warning: array_filter(): The second argument, '1', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, integer given in %s on line %d
NULL
-- Iteration 3 --
-Warning: array_filter(): The second argument, '12345', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, integer given in %s on line %d
NULL
-- Iteration 4 --
-Warning: array_filter(): The second argument, '-2345', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, integer given in %s on line %d
NULL
-- Iteration 5 --
-Warning: array_filter(): The second argument, '10.5', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, double given in %s on line %d
NULL
-- Iteration 6 --
-Warning: array_filter(): The second argument, '-10.5', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, double given in %s on line %d
NULL
-- Iteration 7 --
-Warning: array_filter(): The second argument, '123456789000', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, double given in %s on line %d
NULL
-- Iteration 8 --
-Warning: array_filter(): The second argument, '1.23456789E-9', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, double given in %s on line %d
NULL
-- Iteration 9 --
-Warning: array_filter(): The second argument, '0.5', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, double given in %s on line %d
NULL
-- Iteration 10 --
-Warning: array_filter(): The second argument, 'Array', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, array given in %s on line %d
NULL
-- Iteration 11 --
-Warning: array_filter(): The second argument, 'Array', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, array given in %s on line %d
NULL
-- Iteration 12 --
-Warning: array_filter(): The second argument, 'Array', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, array given in %s on line %d
NULL
-- Iteration 13 --
-Warning: array_filter(): The second argument, 'Array', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, array given in %s on line %d
NULL
-- Iteration 14 --
-Warning: array_filter(): The second argument, 'Array', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, array given in %s on line %d
NULL
-- Iteration 15 --
-Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, null given in %s on line %d
NULL
-- Iteration 16 --
-Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, null given in %s on line %d
NULL
-- Iteration 17 --
-Warning: array_filter(): The second argument, '1', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, boolean given in %s on line %d
NULL
-- Iteration 18 --
-Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, boolean given in %s on line %d
NULL
-- Iteration 19 --
-Warning: array_filter(): The second argument, '1', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, boolean given in %s on line %d
NULL
-- Iteration 20 --
-Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, boolean given in %s on line %d
NULL
-- Iteration 21 --
-Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d
NULL
-- Iteration 22 --
-Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d
NULL
-- Iteration 23 --
-Warning: array_filter(): The second argument, 'string', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d
NULL
-- Iteration 24 --
-Warning: array_filter(): The second argument, 'string', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d
NULL
-- Iteration 25 --
-Warning: array_filter(): The second argument, 'object', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, object given in %s on line %d
NULL
-- Iteration 26 --
-Warning: array_filter(): The second argument, %s, should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, resource given in %s on line %d
NULL
-- Iteration 27 --
-Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, null given in %s on line %d
NULL
-- Iteration 28 --
-Warning: array_filter(): The second argument, '', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, null given in %s on line %d
NULL
Done
/*
* Passing different types of callback functions to array_filter()
-* with parameter and return
-* with paramter and without return
+* with parameters and return
* without parameter and with return
+* with parameter and without return
* without parameter and without return
*/
*/
/*
-* Passing different anonymous callback functions with passed by value and reference arguments,
+* Passing different anonymous callback functions with passed by value and reference arguments
*/
echo "*** Testing array_filter() : usage variations - Anonymous callback functions ***\n";
NULL
}
-Warning: array_filter(): The second argument, 'echo', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d
NULL
-Warning: array_filter(): The second argument, 'exit', should be a valid callback in %s on line %d
+Warning: array_filter() expects parameter 2 to be valid callback, string given in %s on line %d
NULL
Done
2 => "i");
$trans = array_flip($trans);
var_dump($trans);
-
-var_dump(array_flip());
-var_dump(array_flip(array()));
-var_dump(array_flip(array(1)));
-var_dump(array_flip(array(array())));
-
-echo "Done\n";
?>
--EXPECTF--
Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
["i"]=>
int(2)
}
-
-Warning: Wrong parameter count for array_flip() in %s on line %d
-NULL
-array(0) {
-}
-array(1) {
- [1]=>
- int(0)
-}
-
-Warning: array_flip(): Can only flip STRING and INTEGER values! in %s on line %d
-array(0) {
-}
-Done
*** Testing array_flip() : error conditions ***
-- Testing array_flip() function with Zero arguments --
-Warning: Wrong parameter count for array_flip() in %s on line %d
+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: Wrong parameter count for array_flip() in %s on line %d
+Warning: array_flip() expects exactly 1 parameter, 2 given in %s on line %d
NULL
Done
*** Testing array_flip() : usage variations - unexpected values for 'input' ***
-- Iteration 1 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, integer given in %s on line %d
+NULL
-- Iteration 2 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, integer given in %s on line %d
+NULL
-- Iteration 3 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, integer given in %s on line %d
+NULL
-- Iteration 4 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, integer given in %s on line %d
+NULL
-- Iteration 5 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d
+NULL
-- Iteration 6 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d
+NULL
-- Iteration 7 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d
+NULL
-- Iteration 8 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d
+NULL
-- Iteration 9 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, double given in %s on line %d
+NULL
-- Iteration 10 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d
+NULL
-- Iteration 11 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d
+NULL
-- Iteration 12 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
-- Iteration 13 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
-- Iteration 14 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
-- Iteration 15 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, boolean given in %s on line %d
+NULL
-- Iteration 16 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d
+NULL
-- Iteration 17 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d
+NULL
-- Iteration 18 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d
+NULL
-- Iteration 19 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, string given in %s on line %d
+NULL
-- Iteration 20 --
-array(0) {
-}
+
+Warning: array_flip() expects parameter 1 to be array, object given in %s on line %d
+NULL
-- Iteration 21 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d
+NULL
-- Iteration 22 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, null given in %s on line %d
+NULL
-- Iteration 23 --
-Warning: array_flip(): The argument should be an array in %s on line %d
-bool(false)
+Warning: array_flip() expects parameter 1 to be array, resource given in %s on line %d
+NULL
Done
// float values
'float_value1' => 1.2,
'float_value2' => 0.5,
- 'float_value3' => 3.4E3,
- 'float_value4' => 5.6E-6,
+ 'flaot_value3' => 3.4E3,
+ 'flaot_value4' => 5.6E-6,
// bool values
'bool_value1' => true,
Test of the *intersect* bunch of functions (both assoc and non-assoc)
--FILE--
<?php
-error_reporting(E_ALL|E_STRICT);
+error_reporting(E_ALL);
class cr {
private $priv_member;
public $public_member;
if ($a->priv_member === $b->priv_member) return 0;
return ($a->priv_member > $b->priv_member)? 1:-1;
}
-
- function __toString() {
- return "Object";
- }
}
function comp_func($a, $b) {
$a = array("0.1" => new cr(9), "0.5" => new cr(12), 0 => new cr(23), 1=> new cr(4), 2 => new cr(-15),);
$b = array("0.2" => new cr(9), "0.5" => new cr(22), 0 => new cr( 3), 1=> new cr(4), 2 => new cr(-15),);
-/* array_intersect() */
-echo "begin ------------ array_intersect() ----------------------------\n";
-echo '$a='.var_export($a,TRUE).";\n";
-echo '$b='.var_export($b,TRUE).";\n";
-echo 'var_dump(array_intersect($a, $b);'."\n";
-var_dump(array_intersect($a, $b));
-echo "end ------------ array_intersect() ----------------------------\n";
-
/* array_uintersect() */
echo "begin ------------ array_uintersect() ---------------------------\n";
echo '$a='.var_export($a,TRUE).";\n";
var_dump(array_uintersect($a, $b, "comp_func_cr"));
echo "end ------------ array_uintersect() ---------------------------\n";
-/* array_intersect_assoc() */
-echo "begin ------------ array_intersect_assoc() ----------------------\n";
-echo '$a='.var_export($a,TRUE).";\n";
-echo '$b='.var_export($b,TRUE).";\n";
-echo 'var_dump(array_intersect_assoc($a, $b));'."\n";
-var_dump(array_intersect_assoc($a, $b));
-echo "end ------------ array_intersect_assoc() ----------------------\n";
-
/* array_uintersect_assoc() */
echo "begin ------------ array_uintersect_assoc() ---------------------\n";
echo '$a='.var_export($a,TRUE).";\n";
var_dump(array_uintersect_assoc($a, $b, "comp_func_cr"));
echo "end ------------ array_uintersect_assoc() ---------------------\n";
-/* array_intersect_uassoc() */
-echo "begin ------------ array_intersect_uassoc() ---------------------\n";
-echo '$a='.var_export($a,TRUE).";\n";
-echo '$b='.var_export($b,TRUE).";\n";
-echo 'var_dump(array_intersect_uassoc($a, $b, "comp_func"));'."\n";
-var_dump(array_intersect_uassoc($a, $b, "comp_func"));
-echo "end ------------ array_intersect_uassoc() ---------------------\n";
-
/* array_uintersect_uassoc() - with ordinary function */
echo "begin ------------ array_uintersect_uassoc() with ordinary func -\n";
echo '$a='.var_export($a,TRUE).";\n";
echo "end ------------ array_uintersect_uassoc() with method --------\n";
?>
--EXPECTF--
-begin ------------ array_intersect() ----------------------------
-$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_intersect($a, $b);
-array(5) {
- ["0.1"]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(9)
- ["public_member"]=>
- int(9)
- }
- ["0.5"]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(12)
- ["public_member"]=>
- int(12)
- }
- [0]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(23)
- ["public_member"]=>
- int(23)
- }
- [1]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(4)
- ["public_member"]=>
- int(4)
- }
- [2]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(-15)
- ["public_member"]=>
- int(-15)
- }
-}
-end ------------ array_intersect() ----------------------------
begin ------------ array_uintersect() ---------------------------
$a=array (
'0.1' =>
array(3) {
["0.1"]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(9)
["public_member"]=>
int(9)
}
[1]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(4)
["public_member"]=>
int(4)
}
[2]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(-15)
["public_member"]=>
int(-15)
}
}
end ------------ array_uintersect() ---------------------------
-begin ------------ array_intersect_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_intersect_assoc($a, $b));
-array(4) {
- ["0.5"]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(12)
- ["public_member"]=>
- int(12)
- }
- [0]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(23)
- ["public_member"]=>
- int(23)
- }
- [1]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(4)
- ["public_member"]=>
- int(4)
- }
- [2]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(-15)
- ["public_member"]=>
- int(-15)
- }
-}
-end ------------ array_intersect_assoc() ----------------------
begin ------------ array_uintersect_assoc() ---------------------
$a=array (
'0.1' =>
array(2) {
[1]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(4)
["public_member"]=>
int(4)
}
[2]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(-15)
["public_member"]=>
int(-15)
}
}
end ------------ array_uintersect_assoc() ---------------------
-begin ------------ array_intersect_uassoc() ---------------------
-$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_intersect_uassoc($a, $b, "comp_func"));
-array(4) {
- ["0.5"]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(12)
- ["public_member"]=>
- int(12)
- }
- [0]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(23)
- ["public_member"]=>
- int(23)
- }
- [1]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(4)
- ["public_member"]=>
- int(4)
- }
- [2]=>
- object(cr)#%d (2) {
- ["priv_member:private"]=>
- int(-15)
- ["public_member"]=>
- int(-15)
- }
-}
-end ------------ array_intersect_uassoc() ---------------------
begin ------------ array_uintersect_uassoc() with ordinary func -
$a=array (
'0.1' =>
array(2) {
[1]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(4)
["public_member"]=>
int(4)
}
[2]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(-15)
["public_member"]=>
int(-15)
array(2) {
[1]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(4)
["public_member"]=>
int(4)
}
[2]=>
object(cr)#%d (2) {
- ["priv_member:private"]=>
+ ["priv_member":"cr":private]=>
int(-15)
["public_member"]=>
int(-15)
-- Testing array_intersect() function with Zero arguments --
-Warning: Wrong parameter count for array_intersect() in %s on line %d
+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: Wrong parameter count for array_intersect() in %s on line %d
+Warning: array_intersect(): at least 2 parameters are required, 1 given in %s on line %d
NULL
Done
--TEST--
-Test array_intersect() function : usage variations - two dimensional arrays for $arr1 and $arr2 arguments
+Test array_intersect() function : usage variations - two dimensional arrays for $arr1 and $arr2 arguments(Bug#43109)
--FILE--
<?php
/* Prototype : array array_intersect(array $arr1, array $arr2 [, array $...])
*** Testing error conditions ***
-Warning: Wrong parameter count for array_key_exists() in %s on line %d
+Warning: array_key_exists() expects exactly 2 parameters, 0 given in %s on line %d
NULL
Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
Warning: array_key_exists(): The second argument should be either an array or an object in %s on line %d
bool(false)
-Warning: Wrong parameter count for array_key_exists() in %s on line %d
+Warning: array_key_exists() expects exactly 2 parameters, 3 given in %s on line %d
NULL
Warning: array_key_exists(): The first argument should be either a string or an integer in %s on line %d
--- /dev/null
+--TEST--
+Test array_keys() function (basic)
+--FILE--
+<?php
+
+echo "*** Testing array_keys() on basic array operation ***\n";
+$basic_arr = array("a" => 1, "b" => 2, 2.0 => 2.0, -23.45 => "asdasd",
+ array(1,2,3));
+var_dump(array_keys($basic_arr));
+
+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
?>
--EXPECTF--
*** Testing error conditions ***
-Warning: array_keys(): The first argument should be an array in %s on line %d
+Warning: array_keys() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_keys(): The first argument should be an array in %s on line %d
+Warning: array_keys() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_keys(): The first argument should be an array in %s on line %d
+Warning: array_keys() expects parameter 1 to be array, object given in %s on line %d
NULL
-Warning: Wrong parameter count for array_keys() in %s on line %d
+Warning: array_keys() expects at least 1 parameter, 0 given in %s on line %d
NULL
-Warning: Wrong parameter count for array_keys() in %s on line %d
+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
);
$values = array(TRUE, FALSE, 1, 0, -1, "1", "0", "-1", NULL, array(), "php", "");
foreach ($values as $value){
- var_dump(array_keys($types_arr, $value));
+ var_dump($value);
+ var_dump(array_keys($types_arr, $value));
}
echo "Done\n";
?>
--EXPECTF--
*** Testing array_keys() on all the types other than arrays ***
+bool(true)
array(3) {
[0]=>
int(1)
[2]=>
string(3) "php"
}
+bool(false)
array(4) {
[0]=>
int(0)
[3]=>
string(0) ""
}
+int(1)
array(1) {
[0]=>
int(1)
}
+int(0)
array(4) {
[0]=>
int(0)
[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)
[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)
/* call static member function */
var_dump( array_map( array('check_array_map', 'Square'), array(1,2,3)) );
-/* call non static member function - notice should be issues*/
+/* call non static member function - warning should be issues*/
var_dump( array_map( array('check_array_map', 'Message'), array(1)) );
/* call function using object */
Warning: array_map(): Argument #2 should be an array in %s on line %d
NULL
-Warning: Wrong parameter count for array_map() %s on line %d
+Warning: array_map() expects at least 2 parameters, 0 given in %s on line %d
NULL
-Warning: array_map(): The first argument, 'echo', should be either NULL or a valid callback in %s on line %d
+Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d
NULL
-Warning: array_map(): The first argument, 'array', should be either NULL or a valid callback in %s on line %d
+Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d
NULL
-Warning: array_map(): The first argument, 'empty', should be either NULL or a valid callback in %s on line %d
+Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d
NULL
-Warning: array_map(): The first argument, 'eval', should be either NULL or a valid callback in %s on line %d
+Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d
NULL
-Warning: array_map(): The first argument, 'exit', should be either NULL or a valid callback in %s on line %d
+Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d
NULL
-Warning: array_map(): The first argument, 'isset', should be either NULL or a valid callback in %s on line %d
+Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d
NULL
-Warning: array_map(): The first argument, 'list', should be either NULL or a valid callback in %s on line %d
+Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d
NULL
-Warning: array_map(): The first argument, 'print', should be either NULL or a valid callback in %s on line %d
+Warning: array_map() expects parameter 1 to be valid callback, string given in %s on line %d
NULL
*** Testing operation on objects ***
int(9)
}
-Strict Standards: Non-static method check_array_map::Message() cannot be called statically in %s on line %d
-
-Strict Standards: Non-static method check_array_map::Message() cannot be called statically in %s on line %d
-array(1) {
- [0]=>
- int(1)
-}
+Warning: array_map() expects parameter 1 to be valid callback, array given in %s on line %d
+NULL
-Warning: Wrong parameter count for array_map() in %s on line %d
+Warning: array_map() expects at least 2 parameters, 1 given in %s on line %d
NULL
array(1) {
[0]=>
--- /dev/null
+--TEST--
+Test array_merge() function
+--INI--
+precision=14
+--FILE--
+<?php
+/* Prototype: array array_merge(array $array1 [, array $array2 [, array $...]]);
+ Description: Merge one or more arrays
+*/
+
+echo "\n*** Testing array_merge() basic functionality ***";
+$begin_array = array(
+ array(),
+ array( 1 => "string"),
+ array( "" => "string"),
+ array( -2.44444 => 12),
+ array( "a" => 1, "b" => -2.344, "b" => "string", "c" => NULL, "d" => -2.344),
+ array( 4 => 1, 3 => -2.344, "3" => "string", "2" => NULL,1 => -2.344),
+ array( NULL, 1.23 => "Hi", "string" => "hello",
+ array("" => "World", "-2.34" => "a", "0" => "b"))
+);
+
+$end_array = array(
+ array(),
+ array( 1 => "string"),
+ array( "" => "string"),
+ array( -2.44444 => 12),
+ array( "a" => 1, "b" => -2.344, "b" => "string", "c" => NULL, "d" => -2.344),
+ array( 4 => 1, 3 => -2.344, "3" => "string", "2" => NULL, 1=> -2.344),
+ array( NULL, 1.23 => "Hi", "string" => "hello",
+ array("" => "World", "-2.34" => "a", "0" => "b"))
+);
+
+/* loop through to merge two arrays */
+$count_outer = 0;
+foreach($begin_array as $first) {
+ echo "\n\n--- Iteration $count_outer ---";
+ $count_inner = 0;
+ foreach($end_array as $second) {
+ echo "\n-- Inner iteration $count_inner of Iteration $count_outer --\n";
+ $result = array_merge($first, $second);
+ print_r($result);
+ $count_inner++;
+ }
+ $count_outer++;
+}
+
+
+echo "\n*** Testing array_merge() with three or more arrays ***\n";
+var_dump( array_merge( $end_array[0],
+ $end_array[5],
+ $end_array[4],
+ $end_array[6]
+ )
+ );
+
+var_dump( array_merge( $end_array[0],
+ $end_array[5],
+ array("array on fly"),
+ array("nullarray" => array())
+ )
+ );
+
+
+echo "\n*** Testing single array argument ***\n";
+/* Empty array */
+var_dump(array_merge(array()));
+
+/* associative array with string keys, which will not be re-indexed */
+var_dump(array_merge($begin_array[4]));
+
+/* associative array with numeric keys, which will be re-indexed */
+var_dump(array_merge($begin_array[5]));
+
+/* associative array with mixed keys and sub-array as element */
+var_dump(array_merge($begin_array[6]));
+
+echo "\n*** Testing array_merge() with typecasting non-array to array ***\n";
+var_dump(array_merge($begin_array[4], (array)"type1", (array)10, (array)12.34));
+
+echo "\n*** Testing error conditions ***";
+/* Invalid argumens */
+var_dump(array_merge());
+var_dump(array_merge(100, 200));
+var_dump(array_merge($begin_array[0], $begin_array[1], 100));
+var_dump(array_merge($begin_array[0], $begin_array[1], $arr4));
+
+echo "Done\n";
+?>
+--EXPECTF--
+*** 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]=>
+ 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
echo "Done\n";
?>
--EXPECTF--
-Warning: Wrong parameter count for array_pad() in %s on line %d
+Warning: array_pad() expects exactly 3 parameters, 0 given in %s on line %d
NULL
-Warning: Wrong parameter count for array_pad() in %s on line %d
+Warning: array_pad() expects exactly 3 parameters, 1 given in %s on line %d
NULL
-Warning: Wrong parameter count for array_pad() in %s on line %d
+Warning: array_pad() expects exactly 3 parameters, 2 given in %s on line %d
NULL
array(1) {
[0]=>
Warning: array_pad(): You may only pad up to 1048576 elements at a time in %s on line %d
bool(false)
-Warning: array_pad(): The argument should be an array in %s on line %d
+Warning: array_pad() expects parameter 1 to be array, string given in %s on line %d
NULL
Done
--EXPECTF--
*** Testing Error Conditions ***
-Warning: Wrong parameter count for array_pop() in %s on line %d
+Warning: array_pop() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-Warning: array_pop(): The argument should be an array in %s on line %d
+Warning: array_pop() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_pop(): The argument should be an array in %s on line %d
+Warning: array_pop() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: Wrong parameter count for array_pop() in %s on line %d
+Warning: array_pop() expects exactly 1 parameter, 2 given in %s on line %d
NULL
NULL
--- /dev/null
+--TEST--
+Test array_push() function
+--FILE--
+<?php
+
+/* Prototype: int array_push( array &array );
+ * Description: Push one or more elements onto the end of array
+ and returns the new number of elements in the array.
+ */
+
+$empty_array = array();
+$number = 5;
+$str = "abc";
+
+
+/* Various combinations of arrays to be used for the test */
+$mixed_array = array(
+ array(),
+ array( 1,2,3,4,5,6,7,8,9 ),
+ array( "One", "_Two", "Three", "Four", "Five" ),
+ array( 6, "six", 7, "seven", 8, "eight", 9, "nine" ),
+ array( "a" => "aaa", "A" => "AAA", "c" => "ccc", "d" => "ddd", "e" => "eee" ),
+ array( "1" => "one", "2" => "two", "3" => "three", "4" => "four", "5" => "five" ),
+ array( 1 => "one", 2 => "two", 3 => 7, 4 => "four", 5 => "five" ),
+ array( "f" => "fff", "1" => "one", 4 => 6, "" => "blank", 2.4 => "float", "F" => "FFF",
+ "blank" => "", 3.7 => 3.7, 5.4 => 7, 6 => 8.6, '5' => "Five", "4name" => "jonny", "a" => NULL, NULL => 3 ),
+ array( 12, "name", 'age', '45' ),
+ array( array("oNe", "tWo", 4), array(10, 20, 30, 40, 50), array() ),
+ array( "one" => 1, "one" => 2, "three" => 3, 3, 4, 3 => 33, 4 => 44, 5, 6,
+ 5.4 => 54, 5.7 => 57, "5.4" => 554, "5.7" => 557 )
+);
+
+/* Error Conditions */
+echo "\n*** Testing Error Conditions ***\n";
+
+/* Zero argument */
+var_dump( array_push() );
+
+/* Scalar argument */
+var_dump( array_push($number, 22) );
+
+/* String argument */
+var_dump( array_push($str, 22) );
+
+/* Invalid Number of arguments */
+var_dump( array_push($mixed_array[1],1,2) );
+
+/* Empty Array as argument */
+var_dump( array_push($empty_array, 2) );
+
+
+/* Loop to test normal functionality with different arrays inputs */
+echo "\n*** Testing with various array inputs ***\n";
+
+$counter = 1;
+foreach( $mixed_array as $sub_array )
+{
+ echo "\n-- Input Array for Iteration $counter is --\n";
+ print_r( $sub_array );
+ echo "\nOutput after push is :\n";
+ var_dump( array_push($sub_array, 22, "abc") );
+ $counter++;
+}
+
+/* Checking for return value and the new array formed from push operation */
+echo "\n*** Checking for return value and the new array formed from push operation ***\n";
+var_dump( array_push($mixed_array[2], 22, 33, "44") );
+var_dump( $mixed_array[2] );
+
+echo"\nDone";
+?>
+--EXPECTF--
+*** 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) {
+ [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
echo "Done\n";
?>
--EXPECTF--
-Warning: Wrong parameter count for array_rand() in %s on line %d
+Warning: array_rand() expects at least 1 parameter, 0 given in %s on line %d
NULL
NULL
Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
NULL
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d
NULL
Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
-- with default argument --
int(%d)
Done
+
-- with default argument --
string(%d) "%s"
Done
+
-- Testing array_rand() function with Zero arguments --
-Warning: Wrong parameter count for array_rand() in %s on line %d
+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: Wrong parameter count for array_rand() in %s on line %d
+Warning: array_rand() expects at most 2 parameters, 3 given in %s on line %d
NULL
Done
+
--TEST--
-Test array_rand() function : usage variations - unexpected values for 'input' parameter
+Test array_rand() function : usage variations - unexpected values for 'input' parameter
--FILE--
<?php
/* Prototype : mixed array_rand(array input [, int num_req])
-- Iteration 1 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d
NULL
-- Iteration 2 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d
NULL
-- Iteration 3 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d
NULL
-- Iteration 4 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, integer given in %s on line %d
NULL
-- Iteration 5 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 6 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 7 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 8 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 9 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 10 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d
NULL
-- Iteration 11 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d
NULL
-- Iteration 12 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-- Iteration 13 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-- Iteration 14 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-- Iteration 15 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-- Iteration 16 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 17 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 18 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 19 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 20 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, object given in %s on line %d
NULL
-- Iteration 21 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, resource given in %s on line %d
NULL
-- Iteration 22 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d
NULL
-- Iteration 23 --
-Warning: array_rand(): First argument has to be an array in %s on line %d
+Warning: array_rand() expects parameter 1 to be array, null given in %s on line %d
NULL
Done
+
--TEST--
-Test array_rand() function : usage variations - unexpected values for 'num_req' parameter
+Test array_rand() function : usage variations - unexpected values for 'num_req' parameter
--FILE--
<?php
/* Prototype : mixed array_rand(array input [, int num_req])
-- Iteration 16 --
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
+Warning: array_rand() expects parameter 2 to be long, string given in %s on line %d
NULL
-- Iteration 17 --
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
+Warning: array_rand() expects parameter 2 to be long, string given in %s on line %d
NULL
-- Iteration 18 --
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
+Warning: array_rand() expects parameter 2 to be long, string given in %s on line %d
NULL
-- Iteration 19 --
-Warning: array_rand(): Second argument has to be between 1 and the number of elements in the array in %s on line %d
+Warning: array_rand() expects parameter 2 to be long, string given in %s on line %d
NULL
-- Iteration 20 --
-Notice: Object of class test could not be converted to int in %s on line %d
-int(%d)
+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
Done
+
string\([0-9]*\) "[#&!N <\n\t'"\0]*[U#$>]*[rL]*[L]*"
}
Done
+
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
+
string\([0-9]*\) "[a-z \n \t \0 0-9 ]*"
}
Done
+
-- Testing array_reverse() function with Zero arguments --
-Warning: Wrong parameter count for array_reverse() in %s on line %d
+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: Wrong parameter count for array_reverse() in %s on line %d
+Warning: array_reverse() expects at most 2 parameters, 3 given in %s on line %d
NULL
-Warning: Wrong parameter count for array_reverse() in %s on line %d
+Warning: array_reverse() expects at most 2 parameters, 3 given in %s on line %d
NULL
Done
*** Testing array_reverse() : usage variations - unexpected values for 'array' argument ***
-- Iteration 1 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
NULL
-- Iteration 2 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
NULL
-- Iteration 3 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
NULL
-- Iteration 4 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, integer given in %s on line %d
NULL
-- Iteration 5 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 6 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 7 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 8 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 9 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, double given in %s on line %d
NULL
-- Iteration 10 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
NULL
-- Iteration 11 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
NULL
-- Iteration 12 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-- Iteration 13 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-- Iteration 14 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-- Iteration 15 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, boolean given in %s on line %d
NULL
-- Iteration 16 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 17 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 18 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 19 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 20 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, string given in %s on line %d
NULL
-- Iteration 21 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, object given in %s on line %d
NULL
-- Iteration 22 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
NULL
-- Iteration 23 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, null given in %s on line %d
NULL
-- Iteration 24 --
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d
NULL
-Warning: array_reverse(): The argument should be an array in %s on line %d
+Warning: array_reverse() expects parameter 1 to be array, resource given in %s on line %d
NULL
Done
string(5) "green"
}
-- Iteration 10 --
-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"
-}
+
+Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d
+NULL
-- Iteration 11 --
-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"
-}
+
+Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d
+NULL
-- Iteration 12 --
-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"
-}
+
+Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d
+NULL
-- Iteration 13 --
-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"
-}
+
+Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d
+NULL
-- Iteration 14 --
-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"
-}
+
+Warning: array_reverse() expects parameter 2 to be boolean, array given in %s on line %d
+NULL
-- Iteration 15 --
array(6) {
[0]=>
string(5) "green"
}
-- Iteration 23 --
-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"
-}
+
+Warning: array_reverse() expects parameter 2 to be boolean, object given in %s on line %d
+NULL
-- Iteration 24 --
array(6) {
[0]=>
string(5) "green"
}
-- Iteration 26 --
-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"
-}
+
+Warning: array_reverse() expects parameter 2 to be boolean, resource given in %s on line %d
+NULL
Done
echo "Done\n";
?>
--EXPECTF--
-Warning: Wrong parameter count for array_search() in %s on line %d
+Warning: array_search() expects at least 2 parameters, 1 given in %s on line %d
NULL
-Warning: array_search(): Wrong datatype for second argument in %s on line %d
-bool(false)
+Warning: array_search() expects parameter 2 to be array, integer given in %s on line %d
+NULL
int(1)
bool(false)
int(1)
--EXPECTF--
*** Testing error conditions of array_search() ***
-Warning: Wrong parameter count for array_search() in %s on line %d
+Warning: array_search() expects at least 2 parameters, 0 given in %s on line %d
NULL
-Warning: Wrong parameter count for array_search() in %s on line %d
+Warning: array_search() expects at most 3 parameters, 4 given in %s on line %d
NULL
-Warning: Wrong parameter count for array_search() in %s on line %d
+Warning: array_search() expects at least 2 parameters, 1 given in %s on line %d
NULL
-Warning: array_search(): Wrong datatype for second argument in %s on line %d
-bool(false)
+Warning: array_search() expects parameter 2 to be array, string given in %s on line %d
+NULL
-Warning: array_search(): Wrong datatype for second argument in %s on line %d
-bool(false)
+Warning: array_search() expects parameter 2 to be array, integer given in %s on line %d
+NULL
Done
bool(false)
bool(false)
bool(false)
-Done
\ No newline at end of file
+Done
*** Testing objects with array_search() ***
-Warning: array_search(): Wrong datatype for second argument in %s on line %d
-bool(false)
+Warning: array_search() expects parameter 2 to be array, object given in %s on line %d
+NULL
-Warning: array_search(): Wrong datatype for second argument in %s on line %d
-bool(false)
+Warning: array_search() expects parameter 2 to be array, object given in %s on line %d
+NULL
int(1)
Done
bool(false)
int(0)
bool(false)
-Done
\ No newline at end of file
+Done
--- /dev/null
+--TEST--
+Testing array_slice() function
+--FILE--
+
+<?php
+
+$var_array = array(
+ array(),
+ array(1,2,3,4,5,6,7,8,9),
+ array("One", "Two", "Three", "Four", "Five"),
+ array(6, "six", 7, "seven", 8, "eight", 9, "nine"),
+ array( "a" => "aaa", "A" => "AAA", "c" => "ccc", "d" => "ddd", "e" => "eee"),
+ array("1" => "one", "2" => "two", "3" => "three", "4" => "four", "5" => "five"),
+ array(1 => "one", 2 => "two", 3 => 7, 4 => "four", 5 => "five"),
+ array("f" => "fff", "1" => "one", 4 => 6, "" => "blank", 2.4 => "float", "F" => "FFF",
+ "blank" => "", 3.7 => 3.7, 5.4 => 7, 6 => 8.6, '5' => "Five"),
+ array(12, "name", 'age', '45'),
+ array( array("oNe", "tWo", 4), array(10, 20, 30, 40, 50), array())
+ );
+
+$num = 4;
+$str = "john";
+
+/* Zero args */
+echo"\n*** Output for Zero Argument ***\n";
+array_slice();
+
+/* Single args */
+echo"\n*** Output for Single array Argument ***\n";
+array_slice($var_array);
+
+/* More than valid no. of args (ie. >4 ) */
+echo"\n*** Output for invalid number of Arguments ***\n";
+array_slice($var_array, 2, 4, true, 3);
+
+/* Scalar arg */
+echo"\n*** Output for scalar Argument ***\n";
+array_slice($num, 2);
+
+/* String arg */
+echo"\n*** Output for string Argument ***\n";
+array_slice($str, 2);
+
+$counter = 1;
+foreach ($var_array as $sub_array)
+{
+ /* variations with two arguments */
+ /* offset values >, < and = 0 */
+
+ echo"\n*** Iteration ".$counter." ***\n";
+ echo"\n*** Variation with first two Arguments ***\n";
+ var_dump ( array_slice($sub_array, 1) );
+ var_dump ( array_slice($sub_array, 0) );
+ var_dump ( array_slice($sub_array, -2) );
+
+ /* variations with three arguments */
+ /* offset value variations with length values */
+ echo"\n*** Variation with first three Arguments ***\n";
+ var_dump ( array_slice($sub_array, 1, 3) );
+ var_dump ( array_slice($sub_array, 1, 0) );
+ var_dump ( array_slice($sub_array, 1, -3) );
+ var_dump ( array_slice($sub_array, 0, 3) );
+ var_dump ( array_slice($sub_array, 0, 0) );
+ var_dump ( array_slice($sub_array, 0, -3) );
+ var_dump ( array_slice($sub_array, -2, 3) );
+ var_dump ( array_slice($sub_array, -2, 0 ) );
+ var_dump ( array_slice($sub_array, -2, -3) );
+
+ /* variations with four arguments */
+ /* offset value, length value and preserve_key values variation */
+ echo"\n*** Variation with first two arguments with preserve_key value TRUE ***\n";
+ var_dump ( array_slice($sub_array, 1, 3, true) );
+ var_dump ( array_slice($sub_array, 1, 0, true) );
+ var_dump ( array_slice($sub_array, 1, -3, true) );
+ var_dump ( array_slice($sub_array, 0, 3, true) );
+ var_dump ( array_slice($sub_array, 0, 0, true) );
+ var_dump ( array_slice($sub_array, 0, -3, true) );
+ var_dump ( array_slice($sub_array, -2, 3, true) );
+ var_dump ( array_slice($sub_array, -2, 0, true) );
+ var_dump ( array_slice($sub_array, -2, -3, true) );
+ $counter++;
+}
+
+ /* variation of offset and length to point to same element */
+ echo"\n*** Typical Variation of offset and length Arguments ***\n";
+ var_dump (array_slice($var_array[2], 1, -3, true) );
+ var_dump (array_slice($var_array[2], 1, -3, false) );
+ var_dump (array_slice($var_array[2], -3, -2, true) );
+ var_dump (array_slice($var_array[2], -3, -2, false) );
+
+?>
+
+--EXPECTF--
+*** Output for Zero Argument ***
+
+Warning: array_slice() expects at least %d parameters, %d given in %s on line %d
+
+*** Output for Single array Argument ***
+
+Warning: array_slice() expects at least %d parameters, %d given in %s on line %d
+
+*** Output for invalid number of Arguments ***
+
+Warning: array_slice() expects at most %d parameters, %d given in %s on line %d
+
+*** Output for scalar Argument ***
+
+Warning: array_slice() expects parameter %d to be array, integer given in %s on line %d
+
+*** Output for string Argument ***
+
+Warning: array_slice() expects parameter %d to be array, string given in %s on line %d%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"
+}
*** Testing error conditions of array_splice() ***
-Warning: Wrong parameter count for array_splice() in %s on line %d
+Warning: array_splice() expects at least 2 parameters, 0 given in %s on line %d
NULL
-Warning: Wrong parameter count for array_splice() in %s on line %d
+Warning: array_splice() expects at least 2 parameters, 1 given in %s on line %d
NULL
-Warning: Wrong parameter count for array_splice() in %s on line %d
+Warning: array_splice() expects at least 2 parameters, 1 given in %s on line %d
NULL
-Warning: array_splice(): The first argument should be an array in %s on line %d
+Warning: array_splice() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_splice(): The first argument should be an array in %s on line %d
+Warning: array_splice() expects parameter 1 to be array, object given in %s on line %d
NULL
-Done
\ No newline at end of file
+Done
[1]=>
int(3)
}
-Done
\ No newline at end of file
+Done
?>
--EXPECTF--
-Warning: Wrong parameter count for array_splice() in %s on line %d
+Warning: array_splice() expects at most 4 parameters, 10 given in %s on line %d
NULL
array(3) {
[0]=>
[2]=>
int(2)
}
-Done
\ No newline at end of file
+Done
[8]=>
int(5)
}
-Done
\ No newline at end of file
+Done
[2]=>
resource(%d) of type (stream)
}
-Done
\ No newline at end of file
+Done
[4]=>
int(2)
}
-Done
\ No newline at end of file
+Done
{
}
-// class with only one method and no variable
-class FuncClass
-{
- function fun() {
- echo "No variables here";
- }
-}
-
// abstract class
abstract class AbstractClass
{
$vars = array(
new SimpleClass(),
new EmptyClass(),
- new FuncClass(),
new ChildClass(),
new FinalClass(),
new StaticClass()
echo "-- Iteration $iterator --\n";
/* with default argument */
+ // returns element count in the resulting array after arguments are pushed to
+ // beginning of the given array
$temp_array = $array;
- var_dump( array_unshift($temp_array, $var) ); // pushes $var to $temp_array, return sizeof($temp_array)
+ var_dump( array_unshift($temp_array, $var) );
// dump the resulting array
var_dump($temp_array);
- /* with more data values to be pushed */
+ /* with optional arguments */
+ // returns element count in the resulting array after arguments are pushed to
+ // beginning of the given array
$temp_array = $array;
- var_dump( array_unshift($temp_array, $var, "hello", 'world') ); // pushes 3 more data to $temp_array, return sizeof($temp_array)
+ var_dump( array_unshift($temp_array, $var, "hello", 'world') );
// dump the resulting array
var_dump($temp_array);
}
-- Iteration 3 --
int(5)
-array(5) {
- [0]=>
- object(FuncClass)#%d (0) {
- }
- ["f"]=>
- string(5) "first"
- ["s"]=>
- string(6) "second"
- [1]=>
- int(1)
- [2]=>
- float(2.222)
-}
-int(7)
-array(7) {
- [0]=>
- object(FuncClass)#%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 4 --
-int(5)
array(5) {
[0]=>
object(ChildClass)#%d (2) {
- ["var3:private"]=>
+ ["var3":"ChildClass":private]=>
NULL
- ["var2:protected"]=>
+ ["var2":protected]=>
int(5)
}
["f"]=>
array(7) {
[0]=>
object(ChildClass)#%d (2) {
- ["var3:private"]=>
+ ["var3":"ChildClass":private]=>
NULL
- ["var2:protected"]=>
+ ["var2":protected]=>
int(5)
}
[1]=>
[4]=>
float(2.222)
}
--- Iteration 5 --
+-- Iteration 4 --
int(5)
array(5) {
[0]=>
object(FinalClass)#%d (1) {
- ["var4:private"]=>
+ ["var4":"FinalClass":private]=>
NULL
}
["f"]=>
array(7) {
[0]=>
object(FinalClass)#%d (1) {
- ["var4:private"]=>
+ ["var4":"FinalClass":private]=>
NULL
}
[1]=>
[4]=>
float(2.222)
}
--- Iteration 6 --
+-- Iteration 5 --
int(5)
array(5) {
[0]=>
[4]=>
float(2.222)
}
-Done
\ No newline at end of file
+Done
[4]=>
float(2.222)
}
-Done
\ No newline at end of file
+Done
--EXPECTF--
*** Testing error conditions ***
-Warning: Wrong parameter count for array_values() in %s on line %d
+Warning: array_values() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-Warning: Wrong parameter count for array_values() in %s on line %d
+Warning: array_values() expects exactly 1 parameter, 2 given in %s on line %d
NULL
-Warning: array_values(): The argument should be an array in %s on line %d
+Warning: array_values() expects parameter 1 to be array, string given in %s on line %d
NULL
-Warning: array_values(): The argument should be an array in %s on line %d
+Warning: array_values() expects parameter 1 to be array, integer given in %s on line %d
NULL
-Warning: array_values(): The argument should be an array in %s on line %d
+Warning: array_values() expects parameter 1 to be array, object given in %s on line %d
NULL
Done
Warning: array_walk() expects at least 2 parameters, 0 given in %s on line %d
NULL
-Warning: array_walk(): The argument should be an array in %s on line %d
-bool(false)
-bool(true)
+Warning: array_walk() expects parameter 2 to be valid callback, integer given in %s on line %d
+NULL
+
+Warning: array_walk() expects parameter 2 to be valid callback, string given in %s on line %d
+NULL
int(1)
int(0)
string(4) "data"
Warning: array_walk_recursive() expects at least 2 parameters, 0 given in %s on line %d
NULL
-Warning: array_walk_recursive(): The argument should be an array in %s on line %d
-bool(false)
-bool(true)
+Warning: array_walk_recursive() expects parameter 2 to be valid callback, integer given in %s on line %d
+NULL
+
+Warning: array_walk_recursive() expects parameter 2 to be valid callback, string given in %s on line %d
+NULL
int(1)
int(0)
string(4) "data"
Bug #14580 (key() not binary safe)
--FILE--
<?php
- $arr = array ("foo\0bar" => "foo\0bar");
+ $arr = array (b"foo\0bar" => b"foo\0bar");
$key = key($arr);
echo strlen($key), ': ';
echo urlencode($key), "\n";
[x] => 1
)
-)
\ No newline at end of file
+)
--TEST--
-Bug #29253 (array_diff with $GLOBALS argument fails)
+Bug #29253 (array_diff with $GLOBALS argument fails)
--FILE--
<?php
$zz = $GLOBALS;
var_dump(array_diff_assoc($GLOBALS, $zz));
var_dump($gg);
?>
---EXPECT--
+--EXPECTF--
array(0) {
}
string(4) "afad"
-
Bug #33940 (array_map() fails to pass by reference when called recursively)
--INI--
error_reporting=4095
-allow_call_time_pass_reference=1
--FILE--
<?php
function ref_map(&$item) {
echo 'Array: '; print_r($a);
echo 'Return: '; print_r($ret);
?>
---EXPECT--
+--EXPECTF--
Array: Array
(
[0] => Array
--TEST--
-Bug #34982 (array_walk_recursive() modifies elements outside function scope)
+Bug #34982 (array_walk_recursive() modifies elements outside function scope)
--FILE--
<?php
$ar = array(
}
?>
--EXPECTF--
-
-Warning: array_product(): The argument should be an array in %s on line %d
+Warning: array_product() expects parameter 1 to be array, string given in %s on line %d
NULL
int(0)
int(0)
}
?>
--EXPECTF--
-
-Warning: array_product(): The argument should be an array in %s on line %d
+Warning: array_product() expects parameter 1 to be array, string given in %s on line %d
NULL
int(0)
int(0)
echo "Done\n";
?>
--EXPECTF--
+
Warning: array_map(): An error occurred while invoking the map callback in %s on line %d
Fatal error: Uncaught exception 'Exception' in %s:%d
--TEST--
-compact() tests
+compact()
+--INI--
+unicode.script_encoding=UTF-8
+unicode.output_encoding=UTF-8
--FILE--
<?php
-$var1 = "test";
-$var2 = "one more";
-$var3 = "and the last one";
-$_ = "a";
+$çity = "San Francisco";
+$state = "CA";
+$event = "SIGGRAPH";
-var_dump(compact("var1", "var2", "var3"));
-var_dump(compact(""));
-var_dump(compact("-1"));
-var_dump(compact("."));
-var_dump(compact("_"));
-var_dump(compact("var3", "var4"));
-var_dump(compact(array("var2", "var3")));
-var_dump(compact(array(array("var1"), array("var1"))));
+$location_vars = array("c\u0327ity", "state");
-$a = array(2.0, -5);
-var_dump(compact($a));
-
-echo "Done\n";
+$result = compact("event", $location_vars);
+var_dump($result);
?>
---EXPECTF--
-array(3) {
- ["var1"]=>
- string(4) "test"
- ["var2"]=>
- string(8) "one more"
- ["var3"]=>
- string(16) "and the last one"
-}
-array(0) {
-}
-array(0) {
-}
-array(0) {
-}
-array(1) {
- ["_"]=>
- string(1) "a"
-}
-array(1) {
- ["var3"]=>
- string(16) "and the last one"
-}
+--EXPECT--
array(2) {
- ["var2"]=>
- string(8) "one more"
- ["var3"]=>
- string(16) "and the last one"
-}
-array(1) {
- ["var1"]=>
- string(4) "test"
-}
-array(0) {
+ ["event"]=>
+ string(8) "SIGGRAPH"
+ ["state"]=>
+ string(2) "CA"
}
-Done
--TEST--
-count
+Test count() function
+--SKIPIF--
+<?php if (!extension_loaded("spl")) die("skip no SPL extension"); ?>
--FILE--
<?php
-print "Testing NULL...\n";
+/* Prototype: int count ( mixed $var [, int $mode] );
+ Discription: Count elements in an array, or properties in an object
+*/
+
+echo "*** Testing basic functionality of count() function ***\n";
+print "-- Testing NULL --\n";
$arr = NULL;
print "COUNT_NORMAL: should be 0, is ".count($arr, COUNT_NORMAL)."\n";
print "COUNT_RECURSIVE: should be 0, is ".count($arr, COUNT_RECURSIVE)."\n";
-print "Testing arrays...\n";
+print "-- Testing arrays --\n";
$arr = array(1, array(3, 4, array(6, array(8))));
print "COUNT_NORMAL: should be 2, is ".count($arr, COUNT_NORMAL)."\n";
print "COUNT_RECURSIVE: should be 8, is ".count($arr, COUNT_RECURSIVE)."\n";
-print "Testing hashes...\n";
+print "-- Testing hashes --\n";
$arr = array("a" => 1, "b" => 2, array("c" => 3, array("d" => 5)));
print "COUNT_NORMAL: should be 3, is ".count($arr, COUNT_NORMAL)."\n";
print "COUNT_RECURSIVE: should be 6, is ".count($arr, COUNT_RECURSIVE)."\n";
-print "Testing strings...\n";
+print "-- Testing strings --\n";
print "COUNT_NORMAL: should be 1, is ".count("string", COUNT_NORMAL)."\n";
print "COUNT_RECURSIVE: should be 1, is ".count("string", COUNT_RECURSIVE)."\n";
-print "Testing various types with no second argument.\n";
+print "-- Testing various types with no second argument --\n";
print "COUNT_NORMAL: should be 1, is ".count("string")."\n";
print "COUNT_NORMAL: should be 2, is ".count(array("a", array("b")))."\n";
$arr = array('a'=>array(NULL, NULL, NULL), 1=>array(NULL=>1, 1=>NULL),
array(array(array(array(array(NULL))))));
-print "Testing really cool arrays ;)\n";
+print "-- Testing really cool arrays --\n";
print "COUNT_NORMAL: should be 3, is ".count($arr, COUNT_NORMAL)."\n";
print "COUNT_RECURSIVE: should be 13, is ".count($arr, COUNT_RECURSIVE)."\n";
+
+echo "\n*** Testing possible variations of count() function on arrays ***";
+$count_array = array(
+ array(),
+ array( 1 => "string"),
+ array( "" => "string", 0 => "a", NULL => "b", -1.00 => "c",
+ array(array(array(NULL)))),
+ array( -2.44444 => 12, array(array(1, 2, array(array("0"))))),
+ array( "a" => 1, "b" => -2.344, "b" => "string", "c" => NULL, "d" => -2.344),
+ array( 4 => 1, 3 => -2.344, "3" => "string", "2" => NULL,
+ 1 => -2.344, array()),
+ array( TRUE => TRUE, FALSE => FALSE, "" => "", " " => " ",
+ NULL => NULL, "\x000" => "\x000", "\000" => "\000"),
+ array( NULL, 1.23 => "Hi", "string" => "hello",
+ array("" => "World", "-2.34" => "a", "0" => "b"))
+);
+
+$i = 0;
+foreach ($count_array as $count_value) {
+ echo "\n-- Iteration $i --\n";
+ print "COUNT_NORMAL is ".count($count_value, COUNT_NORMAL)."\n";
+ print "COUNT_RECURSIVE is ".count($count_value, COUNT_RECURSIVE)."\n";
+ $i++;
+}
+
+
+/* Testing count() by passing constant with no second argument */
+print "\n-- Testing count() on constants with no second argument --\n";
+print "COUNT_NORMAL: should be 1, is ".count(100)."\n";
+print "COUNT_NORMAL: should be 1, is ".count(-23.45)."\n";
+
+print "\n-- Testing count() on NULL and Unset variables --\n";
+print "COUNT_NORMAL: should be 0, is ".count(NULL)."\n";
+print "COUNT_NORMAL: should be 1, is ".count("")."\n";
+print "COUNT_NORMAL: should be 0, is ".@count($a)."\n";
+
+
+print "\n-- Testing count() on an empty sub-array --\n";
+$arr = array(1, array(3, 4, array()));
+print "COUNT_NORMAL: should be 2, is ".count($arr, COUNT_NORMAL)."\n";
+print "COUNT_RECURSIVE: should be 5, is ".count($arr, COUNT_RECURSIVE)."\n";
+
+echo "\n-- Testing count() on objects with Countable interface --\n";
+class count_class implements Countable {
+ private $var_private;
+ public $var_public;
+ protected $var_protected;
+
+ public function count() {
+ return 3;
+ }
+}
+
+$obj = new count_class();
+print "COUNT_NORMAL: should be 3, is ".count($obj)."\n";
+
+
+echo "\n-- Testing count() on resource type --\n";
+$resource1 = fopen( __FILE__, "r" ); // Creating file(stream type) resource
+$resource2 = opendir( "." ); // Creating dir resource
+
+/* creating an array with resources as elements */
+$arr_resource = array("a" => $resource1, "b" => $resource2);
+var_dump(count($arr_resource));
+
+echo "\n-- Testing count() on arrays containing references --\n";
+$arr = array(1, array("a", "b", "c"));
+$arr[2] = &$arr[1];
+
+$mode_arr = array( COUNT_NORMAL, COUNT_RECURSIVE, 0, 1, -1, -1.45, 2, TRUE,
+ FALSE, NULL);
+for( $i =0; $i < count( $mode_arr ); $i++) {
+ echo "For mode '$mode_arr[$i]' count is => ";
+ var_dump(count($arr, $mode_arr[$i]));
+}
+
+
+echo "\n-- Testing error conditions --";
+var_dump( count() ); // No. of args = 0
+var_dump( count(array(), COUNT_NORMAL, 100) ); // No. of args > expected
+
+/* Testing Invalid type arguments */
+var_dump( count("string", ABCD) );
+var_dump( count(100, "string") );
+var_dump( count(array(), "") );
+
+echo "\nDone";
+
+--CLEAN--
+/* closing the resource handles */
+fclose( $resource1 );
+closedir( $resource2 );
?>
---EXPECT--
-Testing NULL...
+--EXPECTF--
+*** Testing basic functionality of count() function ***
+-- Testing NULL --
COUNT_NORMAL: should be 0, is 0
COUNT_RECURSIVE: should be 0, is 0
-Testing arrays...
+-- Testing arrays --
COUNT_NORMAL: should be 2, is 2
COUNT_RECURSIVE: should be 8, is 8
-Testing hashes...
+-- Testing hashes --
COUNT_NORMAL: should be 3, is 3
COUNT_RECURSIVE: should be 6, is 6
-Testing strings...
+-- Testing strings --
COUNT_NORMAL: should be 1, is 1
COUNT_RECURSIVE: should be 1, is 1
-Testing various types with no second argument.
+-- Testing various types with no second argument --
COUNT_NORMAL: should be 1, is 1
COUNT_NORMAL: should be 2, is 2
-Testing really cool arrays ;)
+-- Testing really cool arrays --
COUNT_NORMAL: should be 3, is 3
COUNT_RECURSIVE: should be 13, is 13
+
+*** Testing possible variations of count() function on arrays ***
+-- Iteration 0 --
+COUNT_NORMAL is 0
+COUNT_RECURSIVE is 0
+
+-- Iteration 1 --
+COUNT_NORMAL is 1
+COUNT_RECURSIVE is 1
+
+-- Iteration 2 --
+COUNT_NORMAL is 4
+COUNT_RECURSIVE is 7
+
+-- Iteration 3 --
+COUNT_NORMAL is 2
+COUNT_RECURSIVE is 8
+
+-- Iteration 4 --
+COUNT_NORMAL is 4
+COUNT_RECURSIVE is 4
+
+-- Iteration 5 --
+COUNT_NORMAL is 5
+COUNT_RECURSIVE is 5
+
+-- Iteration 6 --
+COUNT_NORMAL is 6
+COUNT_RECURSIVE is 6
+
+-- Iteration 7 --
+COUNT_NORMAL is 4
+COUNT_RECURSIVE is 7
+
+-- Testing count() on constants with no second argument --
+COUNT_NORMAL: should be 1, is 1
+COUNT_NORMAL: should be 1, is 1
+
+-- Testing count() on NULL and Unset variables --
+COUNT_NORMAL: should be 0, is 0
+COUNT_NORMAL: should be 1, is 1
+COUNT_NORMAL: should be 0, is 0
+
+-- Testing count() on an empty sub-array --
+COUNT_NORMAL: should be 2, is 2
+COUNT_RECURSIVE: should be 5, is 5
+
+-- Testing count() on objects with Countable interface --
+COUNT_NORMAL: should be 3, is 3
+
+-- Testing count() on resource type --
+int(2)
+
+-- Testing count() on arrays containing references --
+For mode '0' count is => int(3)
+For mode '1' count is => int(9)
+For mode '0' count is => int(3)
+For mode '1' count is => int(9)
+For mode '-1' count is => int(3)
+For mode '-1.45' count is => int(3)
+For mode '2' count is => int(3)
+For mode '1' count is => int(9)
+For mode '' count is => int(3)
+For mode '' count is => int(3)
+
+-- Testing error conditions --
+Warning: count() expects at least 1 parameter, 0 given in %s on line %d
+NULL
+
+Warning: count() expects at most 2 parameters, 3 given in %s on line %d
+NULL
+
+Notice: Use of undefined constant ABCD - assumed 'ABCD' in %s on line %d
+
+Warning: count() expects parameter 2 to be long, %s given in %s on line %d
+NULL
+
+Warning: count() expects parameter 2 to be long, %s given in %s on line %d
+NULL
+
+Warning: count() expects parameter 2 to be long, %s given in %s on line %d
+NULL
+
+Done
*** Testing error conditions ***
-Warning: Wrong parameter count for end() in %s on line %d
+Warning: end() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-Warning: Wrong parameter count for end() in %s on line %d
+Warning: end() expects exactly 1 parameter, 2 given in %s on line %d
NULL
-Warning: end(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: end() expects parameter 1 to be array, integer given in %s on line %d
+NULL
-Warning: end(): Passed variable is not an array or object in %s on line %d
-bool(false)
+Warning: end() expects parameter 1 to be array, string given in %s on line %d
+NULL
bool(false)
Done
echo "Done\n";
?>
-
--EXPECTF--
int(1)
string(3) "aaa"
--EXPECTF--
*** Testing error conditions of in_array() ***
-Warning: Wrong parameter count for in_array() in %s on line %d
+Warning: in_array() expects at least 2 parameters, 0 given in %s on line %d
NULL
-Warning: Wrong parameter count for in_array() in %s on line %d
+Warning: in_array() expects at most 3 parameters, 4 given in %s on line %d
NULL
-Warning: Wrong parameter count for in_array() in %s on line %d
+Warning: in_array() expects at least 2 parameters, 1 given in %s on line %d
NULL
-Warning: in_array(): Wrong datatype for second argument in %s on line %d
-bool(false)
+Warning: in_array() expects parameter 2 to be array, string given in %s on line %d
+NULL
-Warning: in_array(): Wrong datatype for second argument in %s on line %d
-bool(false)
+Warning: in_array() expects parameter 2 to be array, integer given in %s on line %d
+NULL
Done
*** Testing objects with in_array() ***
-Warning: in_array(): Wrong datatype for second argument in %s on line %d
-bool(false)
+Warning: in_array() expects parameter 2 to be array, object given in %s on line %d
+NULL
-Warning: in_array(): Wrong datatype for second argument in %s on line %d
-bool(false)
+Warning: in_array() expects parameter 2 to be array, object given in %s on line %d
+NULL
bool(true)
Done
die("skip setlocale() failed\n");
}
?>
+--INI--
+unicode.script_encoding=ISO8859-1
+unicode.output_encoding=ISO8859-1
--FILE--
<?php
setlocale(LC_ALL, 'fr_FR', 'fr_FR.ISO8859-1');
int(3)
}
-Done
\ No newline at end of file
+Done
*** Testing Error Conditions ***
-Warning: max(): At least one %s on line %d
+Warning: max(): At%seast 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
+Warning: max(): Array must contain at%seast one element in %s on line %d
bool(false)
Warning: Wrong parameter count for max() in %s on line %d
*** Testing large number of arguments ***
int(21)
-Done
\ No newline at end of file
+Done
int(-2147483647)
int(-2147483647)
-Done
\ No newline at end of file
+Done
int(0)
int(0)
-Done
\ No newline at end of file
+Done
*** Testing Error Conditions ***
-Warning: min(): At least one %s on line %d
+Warning: min(): At%seast 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
+Warning: min(): Array must contain at%seast one element in %s on line %d
bool(false)
Warning: Wrong parameter count for min() in %s on line %d
*** Testing large number of arguments ***
int(0)
-Done
\ No newline at end of file
+Done
float(-2147483648)
float(-2147483649)
-Done
\ No newline at end of file
+Done
--TEST--
-Test shuffle() function : usage variations - unexpected values for 'array_arg' argument
+Test shuffle() function : usage variations - unexpected values for 'array_arg' argument
--FILE--
<?php
/* Prototype : bool shuffle(array $array_arg)
echo "*** Testing shuffle() : with unexpected values for 'array_arg' argument ***\n";
+
//get an unset variable
$unset_var = 10;
unset ($unset_var);
Warning: shuffle() expects parameter 1 to be array, resource given in %s on line %d
bool(false)
Done
+
--TEST--
-Test shuffle() function : usage variation - arrays with diff. types of values
+Test shuffle() function : usage variation - arrays with diff types of values
--FILE--
<?php
/* Prototype : bool shuffle(array $array_arg)
int(-%d)
}
Done
+
--TEST--
-Test shuffle() function : usage variation - associative arrays with diff. types of values
+Test shuffle() function : usage variation - associative arrays with diff types of values
--FILE--
<?php
/* Prototype : bool shuffle(array $array_arg)
NULL
}
Done
+
string\(8\) "[heredoc 1-5]*"
}
Done
+
Base::__construct(1)
Base::__construct(2)
-Warning: call_user_func_array(): First argument is expected to be a valid callback, 'Base::__construct' was given in %sbug40398.php on line %d
+Warning: call_user_func_array() expects parameter 1 to be valid callback, string given in %sbug40398.php on line %d
-Warning: call_user_func_array(): First argument is expected to be a valid callback, 'parent::__construct' was given in %sbug40398.php on line %d
+Warning: call_user_func_array() expects parameter 1 to be valid callback, string given in %sbug40398.php on line %d
-Strict Standards: Non-static method Base::__construct() cannot be called statically, assuming $this from compatible context Derived_5 in %sbug40398.php on line %d
-Base::__construct(5)
+Warning: call_user_func_array() expects parameter 1 to be valid callback, array given in %sbug40398.php on line %d
-Strict Standards: Non-static method Base::__construct() cannot be called statically, assuming $this from compatible context Derived_6 in %sbug40398.php on line %d
-Base::__construct(6)
+Warning: call_user_func_array() expects parameter 1 to be valid callback, array given in %sbug40398.php on line %d
===DONE===
object(object_class)#%d (6) refcount(5){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(5){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(contains_object_class)#%d (9) refcount(4){
["p"]=>
long(30) refcount(2)
- ["p1:protected"]=>
+ ["p1":protected]=>
long(40) refcount(2)
- ["p2:private"]=>
+ ["p2":"contains_object_class":private]=>
long(50) refcount(2)
["class_object1"]=>
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
*RECURSION*
}
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
*RECURSION*
}
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(contains_object_class)#%d (9) refcount(1){
["p"]=>
long(30) refcount(2)
- ["p1:protected"]=>
+ ["p1":protected]=>
long(40) refcount(2)
- ["p2:private"]=>
+ ["p2":"contains_object_class":private]=>
long(50) refcount(2)
["class_object1"]=>
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
*RECURSION*
}
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
*RECURSION*
}
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(7){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(9){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(9){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(9){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(9){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(9){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(9){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(9){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (6) refcount(9){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(5)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(5)
["value4"]=>
long(30) refcount(7)
object(object_class)#%d (7) refcount(1){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(7)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(7)
["value4"]=>
long(30) refcount(8)
object(object_class)#%d (7) refcount(1){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(7)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(7)
["value4"]=>
long(30) refcount(8)
&object(object_class)#%d (7) refcount(2){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(7)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(7)
["value4"]=>
long(30) refcount(8)
object(object_class)#%d (7) refcount(1){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(7)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(7)
["value4"]=>
long(30) refcount(8)
&object(object_class)#%d (7) refcount(2){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(7)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(7)
["value4"]=>
long(30) refcount(8)
object(object_class)#%d (7) refcount(1){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(7)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(7)
["value4"]=>
long(30) refcount(8)
&object(object_class)#%d (7) refcount(2){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(7)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(7)
["value4"]=>
long(30) refcount(8)
&object(object_class)#%d (7) refcount(2){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(7)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(7)
["value4"]=>
long(30) refcount(8)
&object(object_class)#%d (7) refcount(2){
["value1"]=>
long(5) refcount(1)
- ["value2:private"]=>
+ ["value2":"object_class":private]=>
long(10) refcount(7)
- ["value3:protected"]=>
+ ["value3":protected]=>
long(20) refcount(7)
["value4"]=>
long(30) refcount(8)
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
)
- [class_object3:private] => object_class Object
+ [class_object3:contains_object_class:private] => object_class Object
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
)
- [class_object3:private] => object_class Object
+ [class_object3:contains_object_class:private] => object_class Object
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
)
- [class_object3:private] => object_class Object
+ [class_object3:contains_object_class:private] => object_class Object
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
)
- [class_object3:private] => object_class Object
+ [class_object3:contains_object_class:private] => object_class Object
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
)
- [class_object3:private] => object_class Object
+ [class_object3:contains_object_class:private] => object_class Object
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
)
- [class_object3:private] => object_class Object
+ [class_object3:contains_object_class:private] => object_class Object
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
)
- [class_object3:private] => object_class Object
+ [class_object3:contains_object_class:private] => object_class Object
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
)
- [class_object3:private] => object_class Object
+ [class_object3:contains_object_class:private] => object_class Object
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
)
- [class_object3:private] => object_class Object
+ [class_object3:contains_object_class:private] => object_class Object
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
)
- [class_object3:private] => object_class Object
+ [class_object3:contains_object_class:private] => object_class Object
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
)
- [class_object3:private] => object_class Object
+ [class_object3:contains_object_class:private] => object_class Object
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
)
- [class_object3:private] => object_class Object
+ [class_object3:contains_object_class:private] => object_class Object
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
(
[value] => 50
[public_var1] => 10
- [private_var1:private] => 20
- [private_var2:private] => 21
+ [private_var1:object_class:private] => 20
+ [private_var2:object_class:private] => 21
[protected_var1:protected] => string_1
[protected_var2:protected] => string_2
[public_var2] => 11
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#%d (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#9 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#10 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#9 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#10 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#2 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#3 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#2 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#3 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#9 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#10 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#9 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#10 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#2 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#3 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object3:private"]=>
+ ["class_object3":"contains_object_class":private]=>
object(object_class)#2 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
}
- ["class_object4:protected"]=>
+ ["class_object4":protected]=>
object(object_class)#3 (7) {
["value"]=>
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
int(50)
["public_var1"]=>
int(10)
- ["private_var1:private"]=>
+ ["private_var1":"object_class":private]=>
int(20)
- ["private_var2:private"]=>
+ ["private_var2":"object_class":private]=>
int(21)
- ["protected_var1:protected"]=>
+ ["protected_var1":protected]=>
string(8) "string_1"
- ["protected_var2:protected"]=>
+ ["protected_var2":protected]=>
string(8) "string_2"
["public_var2"]=>
int(11)
Test::__set
AutoGen::__get
object(Test)#%d (1) {
- ["x:protected"]=>
+ ["x":protected]=>
array(1) {
["baz"]=>
string(5) "Check"
===ArrayOverloading===
ArrayProxy::__construct(0)
object(ArrayProxy)#1 (2) {
- ["object:private"]=>
+ ["object":"ArrayProxy":private]=>
object(Peoples)#2 (1) {
["person"]=>
array(1) {
}
}
}
- ["element:private"]=>
+ ["element":"ArrayProxy":private]=>
int(0)
}
ArrayProxy::__construct(0)
ArrayProxy::offsetUnset(0, name)
ArrayProxy::__construct(0)
object(ArrayProxy)#1 (2) {
- ["object:private"]=>
+ ["object":"ArrayProxy":private]=>
object(Peoples)#2 (1) {
["person"]=>
array(1) {
}
}
}
- ["element:private"]=>
+ ["element":"ArrayProxy":private]=>
int(0)
}
ArrayProxy::__construct(0)
===ArrayOverloading===
ArrayReferenceProxy::__construct(Array)
object(ArrayReferenceProxy)#1 (2) {
- ["object:private"]=>
+ ["object":"ArrayReferenceProxy":private]=>
object(Peoples)#2 (1) {
["person"]=>
array(1) {
}
}
}
- ["element:private"]=>
+ ["element":"ArrayReferenceProxy":private]=>
&array(1) {
["name"]=>
string(3) "Foo"
ArrayReferenceProxy::offsetUnset(Array, name)
ArrayReferenceProxy::__construct(Array)
object(ArrayReferenceProxy)#1 (2) {
- ["object:private"]=>
+ ["object":"ArrayReferenceProxy":private]=>
object(Peoples)#2 (1) {
["person"]=>
array(1) {
}
}
}
- ["element:private"]=>
+ ["element":"ArrayReferenceProxy":private]=>
&array(0) {
}
}
===ArrayOverloading===
ArrayAccessReferenceProxy::__construct(0)
object(ArrayAccessReferenceProxy)#1 (3) {
- ["object:private"]=>
+ ["object":"ArrayAccessReferenceProxy":private]=>
object(Peoples)#2 (1) {
["person"]=>
&array(1) {
}
}
}
- ["oarray:private"]=>
+ ["oarray":"ArrayAccessReferenceProxy":private]=>
&array(1) {
[0]=>
array(1) {
string(3) "Foo"
}
}
- ["element:private"]=>
+ ["element":"ArrayAccessReferenceProxy":private]=>
int(0)
}
ArrayAccessReferenceProxy::__construct(0)
ArrayAccessReferenceProxy::offsetUnset(0, name)
ArrayAccessReferenceProxy::__construct(0)
object(ArrayAccessReferenceProxy)#1 (3) {
- ["object:private"]=>
+ ["object":"ArrayAccessReferenceProxy":private]=>
object(Peoples)#2 (1) {
["person"]=>
&array(1) {
}
}
}
- ["oarray:private"]=>
+ ["oarray":"ArrayAccessReferenceProxy":private]=>
&array(1) {
[0]=>
array(0) {
}
}
- ["element:private"]=>
+ ["element":"ArrayAccessReferenceProxy":private]=>
int(0)
}
ArrayAccessReferenceProxy::__construct(0)
$foo->bar('3');
?>
--EXPECTF--
-Called function foo:bar(%d)
+Called function foo:bar(1)
-Warning: call_user_func_array(): First argument is expected to be a valid callback, 'foo::bar' was given in %sbug27504.php on line %d
+Warning: call_user_func_array() expects parameter 1 to be valid callback, array given in %s on line %d
Fatal error: Call to private method foo::bar() from context '' in %s on line %d
[p4] => A
[p5] => test:5
[p2] => base:2
- [p6:private] => base:6
+ [p6:base:private] => base:6
)
Clown
test Object
[p4] => A
[p5] => clone:5
[p2] => base:2
- [p6:private] => base:6
+ [p6:base:private] => base:6
)
Done
derived Object
(
[member] => derived::member (default)
- [member:private] => base::member
+ [member:base:private] => base::member
)
derived::test
derived Object
(
[member] => derived::member (default)
- [member:private] => base::member
+ [member:base:private] => base::member
)
base::__construct(end)
base::test
derived Object
(
[member] => derived::member (default)
- [member:private] => base::member
+ [member:base:private] => base::member
)
base::test
derived Object
(
[member] => derived::member (default)
- [member:private] => base::member
+ [member:base:private] => base::member
)
derived::test
derived Object
(
[member] => derived::member (default)
- [member:private] => base::member
+ [member:base:private] => base::member
)
derived::__construct(end)
base::test
derived Object
(
[member] => derived::member
- [member:private] => base::member
+ [member:base:private] => base::member
)
derived::test
derived Object
(
[member] => derived::member
- [member:private] => base::member
+ [member:base:private] => base::member
)
Done