# String BC break \{$a}

- Thread: https://externals.io/message/28569
- Original archive: https://news-web.php.net/php.internals/28569
- Started by Christian Schneider on 2007-03-23T09:30:20+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #28569 — Christian Schneider — 2007-03-23T09:30:20+00:00

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

Tomas Kuliavas wrote:
> It was changed in 5.1.0-5.1.1 versions.
> 
> According to PHP Manual (http://www.php.net/language.types.string) curly
> brackets are not escaped with backslash. Escape worked in older PHP
> versions. It does not work in 5.1.1+.
> 
> http://bugs.php.net/31341
> http://bugs.php.net/35411

These two (fixed and closed) bugs diff from mine I think:
31341: $     \{	=> $     \{
vs.
35411: \{$string}	=> {$string}
vs.
my problem with PHP 5.1.5/5.2.1: \${string}	=> \{abc}
vs.
PHP4: \{$string}	=> {abc}

So with PHP 5.1.5 and PHP 5.2.1 curly braces *are* escaped (they are 
still output) but the backslash is output as well. If they would not be 
escaped at all I would have expected \abc. I still think the PHP4 way 
has the lowest WTF factor.

Is this behaviour an oversight (and I should open a bug report) or is 
this intentional? I'm still not sure.

- Chris
