# escaping braces

- Thread: https://externals.io/message/23066
- Original archive: https://news-web.php.net/php.internals/23066
- Started by Brian Moon on 2006-05-01T19:53:28+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #23066 — Brian Moon — 2006-05-01T19:53:28+00:00

URL: https://externals.io/message/23066#23066

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
