Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13019 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28444 invoked by uid 1010); 27 Sep 2004 18:04:57 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 28412 invoked from network); 27 Sep 2004 18:04:57 -0000 Received: from unknown (HELO mail3.panix.com) (166.84.1.74) by pb1.pair.com with SMTP; 27 Sep 2004 18:04:57 -0000 Received: from panix5.panix.com (panix5.panix.com [166.84.1.5]) by mail3.panix.com (Postfix) with ESMTP id 2BA48981EC; Mon, 27 Sep 2004 14:04:57 -0400 (EDT) Received: (from analysis@localhost) by panix5.panix.com (8.11.6p2-a/8.8.8/PanixN1.1) id i8RI4vG17862; Mon, 27 Sep 2004 14:04:57 -0400 (EDT) Date: Mon, 27 Sep 2004 14:04:57 -0400 To: Jeffrey Moss Cc: internals@lists.php.net Message-ID: <20040927180456.GA17529@panix.com> References: <001b01c4a4ba$bf575320$2c02a8c0@hans> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001b01c4a4ba$bf575320$2c02a8c0@hans> User-Agent: Mutt/1.4.2.1i Subject: Re: [PHP-DEV] return NULL by reference From: danielc@analysisandsolutions.com (Daniel Convissor) On Mon, Sep 27, 2004 at 11:52:24AM -0600, Jeffrey Moss wrote: > return NULL; ... snip ... > "Only variable references should be returned by reference " Just like the error message says. "References" are referring to variables. NULL isn't a variable. Do this instead: $tmp = null; return $tmp; --Dan -- T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409