Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc/component/Pretty_printing.markdown: shortArraySyntax not the legacy option #890

Open
WinterSilence opened this issue Sep 10, 2022 · 2 comments

Comments

@WinterSilence
Copy link
Contributor

This is a legacy option, and phpVersion should 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

@nikic
Copy link
Owner

nikic commented Sep 10, 2022

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.

@WinterSilence
Copy link
Contributor Author

WinterSilence commented Sep 10, 2022

@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.

public function __construct(array $options = []) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants