xref: /PHP-7.4/Zend/tests/bug46381.phpt (revision 782352c5)
1--TEST--
2Bug #46381 (wrong $this passed to internal methods causes segfault)
3--FILE--
4<?php
5
6class test {
7	public function method() {
8		return ArrayIterator::current();
9	}
10}
11$test = new test();
12$test->method();
13
14echo "Done\n";
15?>
16--EXPECTF--
17Fatal error: Uncaught Error: Non-static method ArrayIterator::current() cannot be called statically in %s:%d
18Stack trace:
19#0 %s(%d): test->method()
20#1 {main}
21  thrown in %s on line %d
22