-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/src/php/Zend/tests/
File Upload :
Current File : //usr/src/php/Zend/tests/bug42772.phpt

--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) {
}

Copyright © 2017 || Recoded By Mr.Bumblebee