cvs: ZendEngine2 /tests bug46381.phpt

From: Date: Fri, 24 Oct 2008 20:17:50 +0000
Subject: cvs: ZendEngine2 /tests bug46381.phpt
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-7172@lists.php.net to get a copy of this message
tony2001 Fri Oct 24 20:17:50 2008 UTC Modified files: /ZendEngine2/tests bug46381.phpt Log: add test http://cvs.php.net/viewvc.cgi/ZendEngine2/tests/bug46381.phpt?r1=1.1&r2=1.2&diff_format=u Index: ZendEngine2/tests/bug46381.phpt diff -u /dev/null ZendEngine2/tests/bug46381.phpt:1.2 --- /dev/null Fri Oct 24 20:17:50 2008 +++ ZendEngine2/tests/bug46381.phpt Fri Oct 24 20:17:50 2008 @@ -0,0 +1,19 @@ +--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

« previous php.zend-engine.cvs (#7172) next »