ID: 36061
Updated by: [EMAIL PROTECTED]
Reported By: dahlgren dot andreas at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: Documentation problem
Operating System: Windows 2003 Server
PHP Version: 5.1.2
New Comment:
The {$var} syntax is still available. So yes, { } are in a way still
"special".
To have '{hello}' printed you now need to use "{\$var}" and not
"\{$var}" anymore.
Being able to use "\{$var}" to print '{hello}' was an inconsistency
that now is fixed.
No documentation bug here.
Previous Comments:
------------------------------------------------------------------------
[2006-01-18 11:14:34] dahlgren dot andreas at gmail dot com
"This is expected behaviour, {} is no longer special, they are being
treated like any other character."
Ok if the above is true then bothe these statements should display the
same thing?
echo "{".$var."}";
echo "{$var}";
but the first one is "{hello}" and the otherone is "hello".
------------------------------------------------------------------------
[2006-01-18 00:15:34] judas dot iscariote at gmail dot com
I reported this "problem" few weeks ago.
and it's not a bug according to PHP Developers.
it just changed the behaviour. :-(
http://bugs.php.net/bug.php?id=35527
now the change is documented here:
http://cl2.php.net/manual/en/language.types.string.php
------------------------------------------------------------------------
[2006-01-18 00:01:51] dahlgren dot andreas at gmail dot com
Description:
------------
\{$var} results in wrong output.
Reproduce code:
---------------
<?
$var = "hello";
echo "\{$var}";
?>
Expected result:
----------------
{hello}
Actual result:
--------------
\{hello}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36061&edit=1