Bug #17899 Updated: (Probably) Bug in zend parser
| From: | carldrinkwater at mac dot com | Date: | Sat, 22 Jun 2002 14:03:08 +0000 |
| Subject: | Bug #17899 Updated: (Probably) Bug in zend parser | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-11789@lists.php.net to get a copy of this message | ||
ID: 17899
Updated by: carldrinkwater@mac.com
Reported By: othalla@wp.pl
Status: Feedback
Bug Type: Zend Engine 2 problem
Operating System: linux RH6.1
PHP Version: 4.2.1
New Comment:
Well, you would expect yacc to return the static_scalar
rather than the '+' of this rule ... Here is a script that
demonstrates the problem ...
<?
static $a = +1;
static $b = -1;
echo $a."\n";
echo $b."\n";
?>
This gives the output ...
2969616
-1
Which as you can see, isn't entirely correct!
Previous Comments:
------------------------------------------------------------------------
[2002-06-21 12:15:07] sander@php.net
This is a Zend Engine 2 problem I guess...
Can you elaborate on this 'bug'? Why do you think it's wrong? Can you
show us a script, etc...
------------------------------------------------------------------------
[2002-06-21 10:41:52] othalla@wp.pl
In zend_language_parser.y there is code:
[...]
static_scalar: /* compile-time evaluated scalars */
[...]
| '+' static_scalar { $$ = $1; }
[...]
but I think that schould be:
[...]
static_scalar: /* compile-time evaluated scalars */
[...]
| '+' static_scalar { $$ = $2; }
[...]
-----------------------------------------------------
$2 instead of $1
It's still in PHP 4.3.0-alpha tarball.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17899&edit=1