`doc/component/Pretty_printing.markdown`: `shortArraySyntax` not the legacy option
This is a legacy option, and
phpVersionshould be used to control this behavior instead.
it's invalid because you can use latest version of PHP, but print code compatible with old versions
I don't understand what you're trying to say. The phpVersion option has nothing to do with the version of PHP you're running on.
@nikic for example, we want use old array syntax to print AST contained flexible heredoc's, but we can't pass ['phpVersion' => PhpVersion::fromComponents(5, 4)] because this can fail rendering flexible heredoc's.
https://github.com/nikic/PHP-Parser/blob/b4b60c8460136c492dd551e14516e5caaceef8fa/lib/PhpParser/PrettyPrinterAbstract.php#L157