Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in /in/mXpQQ:22
Stack trace:
#0 /in/mXpQQ(22): in_array(NULL, 'test1')
#1 [internal function]: filter_them(Object(MyClass))
#2 /in/mXpQQ(28): array_filter(Array, 'filter_them')
#3 {main}
thrown in /in/mXpQQ on line 22
Process exited with code 255.
Warning: in_array() expects parameter 2 to be array, string given in /in/mXpQQ on line 22
Warning: in_array() expects parameter 2 to be array, string given in /in/mXpQQ on line 22
Warning: in_array() expects parameter 2 to be array, string given in /in/mXpQQ on line 22
Warning: in_array() expects parameter 2 to be array, string given in /in/mXpQQ on line 22
Array
(
[0] => MyClass Object
(
[prop] => test1
)
[1] => MyClass Object
(
[prop] => test1
)
[2] => MyClass Object
(
[prop] => test2
)
[3] => MyClass Object
(
[prop] => test1
)
)
Warning: in_array(): Wrong datatype for second argument in /in/mXpQQ on line 22
Warning: in_array(): Wrong datatype for second argument in /in/mXpQQ on line 22
Warning: in_array(): Wrong datatype for second argument in /in/mXpQQ on line 22
Warning: in_array(): Wrong datatype for second argument in /in/mXpQQ on line 22
Array
(
[0] => MyClass Object
(
[prop] => test1
)
[1] => MyClass Object
(
[prop] => test1
)
[2] => MyClass Object
(
[prop] => test2
)
[3] => MyClass Object
(
[prop] => test1
)
)
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/mXpQQ on line 4
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/mXpQQ on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/mXpQQ on line 4
Process exited with code 255.