Page MenuHomePhabricator

xhpast not support the php 5.4 syntax of array defined with bracket
Closed, WontfixPublic


I got error when genertate php symbols using scripts/symbols/generate_php_symbols.php

EXCEPTION: (XHPASTSyntaxErrorException) XHPAST Parse Error: syntax error, unexpected '[' on line 48
at [path/to/phabricator/phabricator/libphutil/src/parser/xhpast/api/XHPASTTree.php:62]

The code is like this:

$array = ['foo','bar'];

Event Timeline

iodragon raised the priority of this task from to High.
iodragon updated the task description. (Show Details)
iodragon added projects: XHPAST, Phabricator.
iodragon added a subscriber: iodragon.
epriestley claimed this task.

Because Phabricator targets PHP 5.2, we haven't gotten around to adding support for PHP 5.4+ features. See discussion here:

Also related: