Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

php parsing issue #127

Open
jcberleur opened this issue Jul 3, 2015 · 1 comment
Open

php parsing issue #127

jcberleur opened this issue Jul 3, 2015 · 1 comment

Comments

@jcberleur
Copy link

I get "warning: parsing problem in FILE" when using sgrep on a file with parent in a namespace while working in php/hhvm

<?php

namespace foo\parent\bar {
    class Foo { }
}

namespace {
    $foo = new foo\parent\bar\Foo();
    var_dump($foo);
}
@aryx
Copy link
Contributor

aryx commented Jul 18, 2015

Yes it's because parent is considered a keyword. IMHO you should not use namespace names
which happen to also be keywords. I know the official PHP languages allows that, but I'm not
sure it's a good idea.

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

No branches or pull requests

2 participants