Menu

#1121 PHPParser: Doesn`t support PHP 5.3 Closures

closed-accepted
None
5
2010-09-09
2008-12-23
No

$x = function() { echo "hello"; };
print_r($x);

Discussion

  • Matthieu Casanova

    fixed in trunk for version 1.2.7

     
  • Matthieu Casanova

    • status: open --> closed-fixed
     
  • Vadim Voituk

    Vadim Voituk - 2010-01-08

    Sorry, for reopening old bug, but it`s not fixed completely - it doesn`t support Closues with "use" keyword:

    for example:

    //Attach last_down_unix value...
    array_walk($videos, function(&$it, $key) use ($last) {
    $it['last_down_unix'] = (int)$last[$it['id_video']];
    } );

     
  • Vadim Voituk

    Vadim Voituk - 2010-01-08
    • status: closed-fixed --> open-accepted
     
  • Vadim Voituk

    Vadim Voituk - 2010-02-02

    and another example that cause syntax error:

    array_map( function($it) { return $it->contentId; }, $subscrList);

     
  • Matthieu Casanova

    fixed in trunk

     
  • Matthieu Casanova

    • status: open-accepted --> closed-accepted
     

Log in to post a comment.