php-src/Zend/tests/methods-on-non-objects.phpt

15 lines
279 B
Plaintext
Raw Normal View History

2014-04-19 20:01:16 +08:00
--TEST--
Method calls on non-objects raise recoverable errors
--FILE--
<?php
$x= null;
$x->method();
echo "Should not get here!\n";
?>
--EXPECTF--
Fatal error: Uncaught Error: Call to a member function method() on null in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d