Annotation of embedaddon/php/Zend/tests/bug46381.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #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:
! 8: class test {
! 9: public function test() {
! 10: return ArrayIterator::current();
! 11: }
! 12: }
! 13: $test = new test();
! 14: $test->test();
! 15:
! 16: echo "Done\n";
! 17: ?>
! 18: --EXPECTF--
! 19: Fatal error: Non-static method ArrayIterator::current() cannot be called statically, assuming $this from incompatible context in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>