Menu

#971 PHPParser: Variable beside {}-enclosed variable causes error

closed-fixed
None
5
2010-09-09
2008-03-11
Keilaron
No

Given this code:
<?php
$is = "is";
$a = "a ";
$test = "test";
echo "this {$is} $a{$test}";
?>
PHPParser gives these errors on the last echo line:
';' expected
expression expected
unexpected token: 'a'

This code is valid in PHP.
(Naturally, there's the workaround of also enclosing $a as {$a} or not enclosing $test if possible.)

Discussion

  • Matthieu Casanova

    • assigned_to: nobody --> kpouer
     
  • Matthieu Casanova

    fixed in trunk

     
  • Matthieu Casanova

    • status: open --> closed-fixed
     

Log in to post a comment.