mirror of
https://github.com/php/php-src.git
synced 2024-10-17 06:22:53 +00:00
20 lines
465 B
Plaintext
20 lines
465 B
Plaintext
|
--TEST--
|
||
|
Bug #46381 (wrong $this passed to internal methods causes segfault)
|
||
|
--SKIPIF--
|
||
|
<?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?>
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
class test {
|
||
|
public function test() {
|
||
|
return ArrayIterator::current();
|
||
|
}
|
||
|
}
|
||
|
$test = new test();
|
||
|
$test->test();
|
||
|
|
||
|
echo "Done\n";
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Fatal error: Non-static method ArrayIterator::current() cannot be called statically, assuming $this from incompatible context in %s on line %d
|