Re: PHP 5.0.3 E_STRICT question - returning NULL from reference returning function

From: Date: Sun, 06 Mar 2005 19:39:38 +0000
Subject: Re: PHP 5.0.3 E_STRICT question - returning NULL from reference returning function
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-15291@lists.php.net to get a copy of this message
>> > >function &testfunc() >> > >{ >> > >$nullVar = NULL; >> > >return $nullVar; >> > >} >> > >> > That'd work, yep. >> >>Wrong ;-) It causes problems with reference counting - and will segfault >>PHP after some time. > > Hmm, that in itself shouldn't cause any problems unless it's coupled with > something else that's causing problems... Not that it helps you any if > you end up bumping into problems :) True; but it's good to know what the "correct" thing to do is; even if there is an underlying bug. -- Yermo ---------------------------------------------------------------------------- DTLink Software http://www.dtlink.com Desktop Software and Web Applications ----------------------------------------------------------------------------

« previous php.internals (#15291) next »