summaryrefslogtreecommitdiff
path: root/Zend/tests/bug46381.phpt
blob: db948832e68b70dfac9aa15a63a0f77ebeb0f4b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
Bug #46381 (wrong $this passed to internal methods causes segfault)
--FILE--
<?php

class test {
    public function method() {
        return ArrayIterator::current();
    }
}
$test = new test();
$test->method();

echo "Done\n";
?>
--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