escaping braces
| From: | Brian Moon | Date: | Mon, 01 May 2006 19:53:28 +0000 |
| Subject: | escaping braces | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-23066@lists.php.net to get a copy of this message | ||
There are severals bugs about this and I would like some clarification.
http://bugs.php.net/bug.php?id=35527
http://bugs.php.net/bug.php?id=37263
Reproduce:
---------------
<?php
$string="abc";
echo "... {$string} ...\n";
echo "... \{$string} ...\n";
?>
PHP4:
------
... abc ...
... {abc} ...
PHP 5.1.2:
-----------
... abc ...
... \{abc} ...
===============
Now, I can see changing it so that {} is not escapable. However, it is being escaped. The {} are not being evaluted with the variable in 5.1.2. However, the \ is being left in the string. IMO, you can't have it both ways.
I expect from PHP5:
--------------------
... abc ...
... \abc ...
Also, this is not listed in the upgrade notes at all http://www.php.net/README_UPGRADE_51.php.
Thanks,
Brian Moon
dealnews.com