Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15272 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21945 invoked by uid 1010); 6 Mar 2005 04:51:30 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 21929 invoked from network); 6 Mar 2005 04:51:26 -0000 Received: from unknown (HELO zend.com) (127.0.0.1) by localhost with SMTP; 6 Mar 2005 04:51:26 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:60037] helo=mail.zend.com) by pb1.pair.com (ecelerity HEAD r(5124)) with SMTP id DC/A9-29225-D4C8A224 for ; Sat, 05 Mar 2005 23:51:26 -0500 Received: (qmail 5767 invoked from network); 6 Mar 2005 04:51:20 -0000 Received: from localhost (HELO zeev-notebook.zend.com) (127.0.0.1) by localhost with SMTP; 6 Mar 2005 04:51:20 -0000 Message-ID: <5.1.0.14.2.20050306065057.06fcb310@localhost> X-Sender: zeev@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sun, 06 Mar 2005 06:51:18 +0200 To: yml@dtlink.com Cc: internals@lists.php.net In-Reply-To: <65354.207.192.181.138.1110084443.squirrel@secure.fieldpost .com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] PHP 5.0.3 E_STRICT question - returning NULL from reference returning function From: zeev@zend.com (Zeev Suraski) References: <65354.207.192.181.138.1110084443.squirrel@secure.fieldpost.com> At 06:47 06/03/2005, Yermo Lamers wrote: >What is the proper way to return a NULL condition from a method that >returns a reference? > >function &testfunc() >{ >return NULL; >} > >generates: > >"Strict Standards: Only variable references should be returned by >reference in ..." > >Is the correct approach to do something like: > >function &testfunc() >{ >$nullVar = NULL; >return $nullVar; >} That'd work, yep. Zeev