Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:581 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 32061 invoked by uid 1007); 2 Apr 2003 04:15:18 -0000 Message-ID: <20030402041517.32060.qmail@pb1.pair.com> To: internals@lists.php.net Reply-To: References: <3E8A54B8.1080207@chiaraquartet.net> Date: Tue, 1 Apr 2003 20:13:56 -0800 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Posted-By: 64.142.6.230 Subject: Re: variable variables in global - bug? From: pollita@php.net > It was brought to my attention that this code is legal in PHP 4: > > function foo($param = 'test') > { > global $$param; > echo $$param; > } > > $test = 'bar'; > foo(); // prints bar > > Is this a feature or a bug? (Should we support this syntax in > phpDocumentor, or might it change in php 5?) > It's a feature, and it ain't goin' nowhere.