Re: [studs-user] Fwd: This is frustrating!
Status: Beta
Brought to you by:
mojavelinux
|
From: Earnie B. <ea...@us...> - 2006-05-15 13:29:30
|
Quoting Dan Allen <dan...@gm...>:
>
> // ALLOWED
> function &foobar() {
> return ref(null);
> }
>
I'm finding this doesn't work well either.
// INSTEAD
function &foobar () {
$ret =& ref(null);
return $ret;
}
This must be done for any returned data.
// E.G.
function &getAttribute($name)
{
if (!isset($this->attributes[$name]))
{
$return =& ref(null);
}
else
{
$return =& ref($this->attributes[$name]);
}
return $return;
}
Earnie Boyd
http://shop.siebunlimited.com
|