Re: [PHP-DEV] Variable Variables and Superglobals

2004-08-05 Thread Sara Golemon
> function foo($arg){ > $lvar="_ENV"; > > echo $_ENV["OS"]; // --> Windows NT > echo ${$arg}["OS"]; // --> *nothing* > echo ${$lvar}["OS"]; // --> *nothing* > var_dump( $$arg ); // --> NULL > var_dump( $$lvar); // --> NULL > } > // END ///

Re: [PHP-DEV] Variable Variables and Superglobals

2004-08-05 Thread Curt Zirzow
* Thus wrote A.Rico: >What the PHP documentation says about variable variables and > superglobals is that you can't use them as a "pointer": > >/*Warning*/ > >/ Please note that variable variables cannot be used with PHP's >Superglobal arrays > >

Re: [PHP-DEV] Variable Variables and Superglobals

2004-08-04 Thread Andi Gutmans
Right. Variable variables don't work with super-globals and I think it is documented in this way. This is on purpose as we decided to only support them this way both for clarity reasons and for performance. There are no plans to change this. Andi At 01:35 AM 8/5/2004 +0200, A.Rico wrote: Usin