Bug #18045 Updated: Parse error: parse error, unexpected ':', expecting '}'
| From: | sander@php.net | Date: | Fri, 28 Jun 2002 15:04:57 +0000 |
| Subject: | Bug #18045 Updated: Parse error: parse error, unexpected ':', expecting '}' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-12417@lists.php.net to get a copy of this message | ||
ID: 18045
Updated by: sander@php.net
Reported By: webmaster@phpindex.com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 4.2.1
New Comment:
This is not a bug but expected behaviour. ${ and {$ begin a variable
name, and : is not allowed in a variable name.
Not a bug -> bogus.
Previous Comments:
------------------------------------------------------------------------
[2002-06-28 10:28:06] webmaster@phpindex.com
This simple script crash with
Parse error: parse error, unexpected ':', expecting '}' in
/usr/local/apache/htdocs/armel/crash.php on line 5
<?php
$foo = "php";
print "{$foo}";
print "{:$foo}";
print "{$foo:}";
?>
Note that if you comment the last print, it just return
php{:php}
and not
{php}{:php}
May be a small problem in the Zend Engine (see T_CURLY_OPEN) :
line 695 -> Zend/zend_language_parser.y
line 1348 -> Zend/zend_language_scanner.l
This bug is reproducible and have been tested with php 4.2.1 (apxs) and
4.2.0 (CGI).
Regards,
Armel.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18045&edit=1