incompatibe php3 <-> 4 + suggestion for php3

From: Date: Wed, 30 Jun 1999 14:22:13 +0000
Subject: incompatibe php3 <-> 4 + suggestion for php3
Groups: php.version4 
Request: Send a blank email to php-version4+get-1752@lists.php.net to get a copy of this message
hi script (taken from twig): <? error_reporting(-1); $login[username] = "tubu"; $session[thisGroup] = "tubu"; function groupSelect($username = "$login[username]", $gid = "$session[thisGroup]") { } ?> wroks in 3.0 but barfs with 4.0 i never knew you could do stuff like this! one other thing that comes to my mind is that many people seem to use: $data[tubu] = 1; instead of: $data["tubu"] = 1; so they can embed this in strings like: echo "name is $data[tubu]"; without escaping! now - if you use "error_reporting(-1);" (which i prefer to do) you get: PHP 3 Warning: 'tubu' is not a valid constant - assumed to be "tubu" in hmm.php on line 3. could we remove this warning (in PHP3!) as it seems to be standart coding-practise to ommit the quotes around array indices? tc Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.version4 (#1752) next »