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
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 barIs 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.
I just checked out a copy of HEAD and can't build PHP5, it looks like
some changes were made to rename everything from php4->php5 and there
are still some php4 references floating around that end up in the
Makefile:
[php@localhost ~/php5]$ make
make: *** No rule to make target libphp4.la', needed byall'. Stop.
Looking in the MakeFile one of the problems is OVERALL_TARGET (which
points to libphp4.la instead of libphp5.la) but changing that alone
isn't fixing it. Since I am sure there are those who know the build
system better than I maybe someone else could look at it.
John
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~