Re: Odd reference => global bug?
| From: | Michael Wallner | Date: | Mon, 04 Oct 2004 14:54:30 +0000 |
| Subject: | Re: Odd reference => global bug? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13141@lists.php.net to get a copy of this message | ||
Hi Bob Glamm, you wrote:
[...]
Seems to be the same bug as in:
function singleton()
{
static $instance;
if (!isset($instance)) {
$instance = &new SomeClass;
}
return $instance;
}
If you use "&new" notation in your script,
you'll see that $x will be NULL, too.
Regards,
--
Michael - < mike(@)php.net >
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc