xref: /PHP-5.6/Zend/tests/bug46381.phpt (revision 73f81e9d)
1--TEST--
2Bug #46381 (wrong $this passed to internal methods causes segfault)
3--SKIPIF--
4<?php if (!extension_loaded("spl")) die("skip SPL is no available"); ?>
5--FILE--
6<?php
7
8class test {
9	public function test() {
10		return ArrayIterator::current();
11	}
12}
13$test = new test();
14$test->test();
15
16echo "Done\n";
17?>
18--EXPECTF--
19Fatal error: Non-static method ArrayIterator::current() cannot be called statically, assuming $this from incompatible context in %s on line %d
20