php-src/Zend/tests/bug46381.phpt

22 lines
438 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 {
2020-02-03 21:52:20 +00:00
public function method() {
return ArrayIterator::current();
}
2008-10-24 20:17:50 +00:00
}
$test = new test();
2015-03-31 14:10:06 +00:00
$test->method();
2008-10-24 20:17:50 +00:00
echo "Done\n";
?>
2018-09-16 17:16:42 +00:00
--EXPECTF--
Fatal error: Uncaught Error: 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