new syntax
| From: | Dan Hsiung | Date: | Fri, 08 Dec 2000 08:57:23 +0000 |
| Subject: | new syntax | ||
| Groups: | php.migration | ||
| Request: | Send a blank email to php-migration+get-97@lists.php.net to get a copy of this message | ||
Hi,
I've been developing a site using PHP (version 3.0.11) on a server that was configured by
someone else. I recently installed PHP version 4.0.3 on a different server, and ported my code over
to the new machine. Unfortunately it seems that my code is using syntax not recognized by PHP4. I
have code like this:
echo "<a href=\"http://www.myserver.com/${user_dir}/files/\">click
here</a>";
that worked on PHP3, but now I get a parse error until I change it to:
echo "<a href=\"http://www.myserver.com/{$user_dir}/files/\">click
here</a>";
- note the reversal of the "$" and the "{"
This is problematic as I have lots of code that uses that syntax. Am I missing something in my
config files that would allow PHP4 to recognize the old PHP3 syntax? I find it hard to believe that
PHP4 would not be completely backwards compatible.
Any help would be much appreciated.
-Dan