php-src/Zend/tests/bug46381.phpt

22 lines
437 B
Plaintext
Raw Normal View History

2008-10-24 20:17:50 +00:00
--TEST--
Bug #46381 (wrong $this passed to internal methods causes segfault)
--FILE--
<?php
class test {
2015-03-31 14:10:06 +00:00
public function method() {
2008-10-24 20:17:50 +00:00
return ArrayIterator::current();
}
}
$test = new test();
2015-03-31 14:10:06 +00:00
$test->method();
2008-10-24 20:17:50 +00:00
echo "Done\n";
?>
--EXPECTF--
Fatal error: Uncaught EngineException: Non-static method ArrayIterator::current() cannot be called statically in %s:%d
Stack trace:
#0 %s(%d): test->method()
#1 {main}
thrown in %s on line %d