Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:7806 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1457 invoked by uid 1010); 13 Feb 2004 14:48:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1355 invoked from network); 13 Feb 2004 14:48:49 -0000 Received: from unknown (HELO jdi.jdimedia.nl) (212.204.192.51) by pb1.pair.com with SMTP; 13 Feb 2004 14:48:49 -0000 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.10/8.12.10) with ESMTP id i1DEmmRj027104; Fri, 13 Feb 2004 15:48:48 +0100 Date: Fri, 13 Feb 2004 15:47:08 +0100 (CET) X-X-Sender: derick@localhost To: Martin Jansen cc: internals@lists.php.net In-Reply-To: <20040213143849.GA30166@divbyzero.net> Message-ID: References: <20040213143849.GA30166@divbyzero.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Improving error messages when using indirect references From: derick@php.net (Derick Rethans) On Fri, 13 Feb 2004, Martin Jansen wrote: > Hey, > > error_reporting(E_ALL); > > echo $$foo; > ?> > > results in > > Notice: Undefined variable: foo in /foo/bar.php on line 4 > > Notice: Undefined variable: in /foo/bar.php on line 4 > > Wouldn't it be more appropriate if the second notice was something like > "Notice: Undefined variable: in /foo/bar.php on line 4"? Would be a lie... $foo WILL evaluate to the empty string which used like this, although it does look weird, it is right :) Derick