File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug42772.phpt
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:52 2012 UTC (13 years, 2 months ago) by misho
CVS tags: MAIN, HEAD
Initial revision

--TEST--
Bug #42772 (Storing $this in a static var fails while handling a cast to string)
--FILE--
<?php
class Foo {
    static public $foo;
    function __toString() {
        self::$foo = $this;
        return 'foo';
    }
}

$foo = (string)new Foo();
var_dump(Foo::$foo);
?>
--EXPECT--
object(Foo)#1 (0) {
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>