diff options
author | Timm Friebe <thekid@thekid.de> | 2014-04-28 21:44:24 +0200 |
---|---|---|
committer | Timm Friebe <thekid@thekid.de> | 2014-04-28 21:44:24 +0200 |
commit | da1db5e688c46a044bc0745c86cc34cc4e9ab808 (patch) | |
tree | 91b061f53db04ae24da9309ff56f64bd04e436af /Zend/tests/methods-on-non-objects-call-user-func.phpt | |
parent | a86e7621666bce5dcf5ac3304b2384b254319025 (diff) | |
download | php-git-da1db5e688c46a044bc0745c86cc34cc4e9ab808.tar.gz |
Add tests for indirect calls to methods on non-objects
http://news.php.net/php.internals/73823
Diffstat (limited to 'Zend/tests/methods-on-non-objects-call-user-func.phpt')
-rw-r--r-- | Zend/tests/methods-on-non-objects-call-user-func.phpt | 13 |
1 files changed, 13 insertions, 0 deletions
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 0000000000..f76b7d43a0 --- /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-- +<?php +$comparator= null; +var_dump(call_user_func([$comparator, 'compare'], 1, 2)); +echo "Alive\n"; +?> +--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 + |