Just checking something before posting a bug report
| From: | Martin Alterisio | Date: | Wed, 26 Sep 2007 18:33:26 +0000 |
| Subject: | Just checking something before posting a bug report | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-32447@lists.php.net to get a copy of this message | ||
I did as much as possible from the steps asked in the php bugs page, but
still I want to check with you folks before submitting a bug report.
I found a strange behavior in PHP 5.2.4. Try running the following code:
<?php
class Foo {
static public $foo;
function __toString() {
self::$foo = $this;
return 'foo';
}
}
$foo = (string) new Foo();
var_dump(Foo::$foo);
?>
At the end of the script, the static var stores not the object but the
string returned by toString.