Posted by Leif K-Brooks on 11/07/05 08:04
X l e c t r i c wrote:
> Is $var1.bar PHP 5 dot notation ?
>
> If so, then that explains why it doesn't work for me. The host I tried
> it at is at PHP 4.3.11.
No, it's concatenation
<http://php.net/manual/en/language.operators.string.php> combined with
abuse of a PHP misfeature which turns missing constants into strings. It
works fine with my copy of PHP 4.3.10:
leif@debian:~$ php -v
PHP 4.3.10-15 (cli) (built: May 9 2005 08:54:56)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
leif@debian:~/ecritters/web/html$ php
<?php
$var1 = "foo";
${$var1.bar} = "great!";
print $foobar;
// Outputs "great!"
?>
great!leif@debian:~$
Navigation:
[Reply to this message]
|