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

Support for the "global" namespace #2

Closed
fabpot opened this issue Jun 20, 2011 · 1 comment
Closed

Support for the "global" namespace #2

fabpot opened this issue Jun 20, 2011 · 1 comment

Comments

@fabpot
Copy link
Contributor

fabpot commented Jun 20, 2011

The following construct is valid but not supported by PHP-Parser:

namespace {
    echo 'Hello';
}

Here is the error:

PHP Catchable fatal error:  Argument 1 passed to PHPParser_PrettyPrinterAbstract::p() must be an instance of PHPParser_NodeAbstract, array given, called in lib/PHPParser/PrettyPrinterAbstract.php on line 105 and defined in lib/PHPParser/PrettyPrinterAbstract.php on line 127
@nikic
Copy link
Owner

nikic commented Jun 26, 2011

The parser did support this, but the pretty printer failed to print it. Fixed in fb45e8a.

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