Nikita Popov
Nikita Popov
I think the suggestion makes sense in general, but I'm going to punt on this for 4.0. I don't want to change types at this point.
What do you think about using `Expr\List_` for both `list($x, $y) = $z` and `[$x, $y] = $z`, together with an attribute that determines the actual style used (like `kind`...
What use case do you have in mind for this? Is it to throw a warning when it's quoted / not quoted, to preserve the format during pretty-printing, or something...
Landed two micro-optimizations https://github.com/nikic/PHP-Parser/commit/3bbf8d8f7a21397030f9729041df3cf5cb74d217 and https://github.com/nikic/PHP-Parser/commit/8f623fb2413f95cc3cefe0747c22f8abe89692cf, which together improve parser performance by about ~12%. ~~From a quick run through massif, the memory overhead of the attribute system is *huge*. Attributes...
This is one of those cases where we run afoul of PHP's inadequate GC algorithm -- the majority of time is not spent parsing, but rather scanning the object graph...
@theofidry I've added a performance section to the docs: https://github.com/nikic/PHP-Parser/blob/master/doc/component/Performance.markdown
@Gert-dev Just to make sure there is no misunderstanding here: Even if you manually invoke the cycle collector using `gc_collect_cycles()`, this will only perform GC on the objects in the...
Just to be clear, as long as you don't disable GC, hitting the root buffer limit isn't going to cause a leak --- it "only" kills performance if it's happening...
> When parsing the above example, the Comment 2 is lost. I think it is because it would be stored against a potential third item on the array. It would...
> The 4 spaces are hardcoded, when it could be an option to the prettyprinter I'm okay with making that an option. (That is, make the number of spaces configurable,...