Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:580 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4926 invoked by uid 1007); 2 Apr 2003 03:05:57 -0000 To: internals@lists.php.net Message-ID: <3E8A54B8.1080207@chiaraquartet.net> Date: Tue, 01 Apr 2003 22:10:48 -0500 User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 66.65.33.77 Subject: variable variables in global - bug? From: greg@chiaraquartet.net (Greg Beaver) Hi, 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?) Greg -- phpDocumentor http://www.phpdoc.org