php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35411 brace escape problem (changed behaviour)
Submitted: 2005-11-26 17:51 UTC Modified: 2005-11-27 07:49 UTC
From: frisauf at comnet dot cz Assigned: iliaa (profile)
Status: Closed Package: Strings related
PHP Version: 5.1.0 OS: linux
Private report: No CVE-ID: None
 [2005-11-26 17:51 UTC] frisauf at comnet dot cz
Description:
------------
I have found unexpected behaviour in PHP 5.1.0.

Escaping braces in strings doesn't work as in previous version.

Reproduce code:
---------------
$string="abc";

echo "... {$string} ...\n";
echo "... \{$string} ...\n";


Expected result:
----------------
php 5.0.5:

... abc ...
... {abc} ...


Actual result:
--------------
php 5.1.0:

... abc ...
... {$string} ...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-26 18:42 UTC] pajoye@php.net
This commit seems to be the cause:
http://cvs.php.net/diff.php/ZendEnine2/zend_language_scanner.l?r1=1.131.2.1&r2=1.131.2.2&ty=u

I give infos to ilia, he likes to fix that.
 [2005-11-27 07:49 UTC] iliaa@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2014-02-16 23:55 UTC] mail at mkharitonov dot net
Behaviour is still not matched to the expected result.

Actual result (in php 5.5.9):
-----------------------------
... abc ...
... \{abc} ...

Another example:
----------------
print "\{ \$";

Expected result:
----------------
{ $

Actual result (in php 5.5.9):
-----------------------------
\{ $
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC