diff --git a/Zend/tests/methods-on-non-objects-call-user-func.phpt b/Zend/tests/methods-on-non-objects-call-user-func.phpt new file mode 100644 index 00000000000..f76b7d43a09 --- /dev/null +++ b/Zend/tests/methods-on-non-objects-call-user-func.phpt @@ -0,0 +1,13 @@ +--TEST-- +call_user_func() in combination with "Call to a member function method() on a non-object" +--FILE-- + +--EXPECTF-- +Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in %s on line %d +NULL +Alive + diff --git a/Zend/tests/methods-on-non-objects-usort.phpt b/Zend/tests/methods-on-non-objects-usort.phpt new file mode 100644 index 00000000000..df702d3a9a5 --- /dev/null +++ b/Zend/tests/methods-on-non-objects-usort.phpt @@ -0,0 +1,43 @@ +--TEST-- +usort() in combination with "Call to a member function method() on a non-object" +--FILE-- +compare($a, $b); +}); +var_dump($list); +echo "Alive\n"; +?> +--EXPECTF-- +int(4096) +string(51) "Call to a member function compare() on a non-object" +int(4096) +string(51) "Call to a member function compare() on a non-object" +int(4096) +string(51) "Call to a member function compare() on a non-object" +int(4096) +string(51) "Call to a member function compare() on a non-object" +int(4096) +string(51) "Call to a member function compare() on a non-object" +int(4096) +string(51) "Call to a member function compare() on a non-object" +array(5) { + [0]=> + int(-1) + [1]=> + int(3) + [2]=> + int(2) + [3]=> + int(4) + [4]=> + int(1) +} +Alive +