Rikudou_Sennin
Rikudou_Sennin

Reputation: 1375

Zephir throws error on line 1

I am trying to make simple php extension via zephir, but zephir does not want to work.

Here is my code:

namespace Const;

class Hello {
    public static function world() {
        echo "Hello World!";
    }
}

And here is the error it produces on zephir build:

Zephir\ParseException: Syntax error in /root/compile/const/const/hello.zep on line 1

    namespace Const;
    ---------------^

Upvotes: 0

Views: 70

Answers (1)

rap-2-h
rap-2-h

Reputation: 31968

const is a reserved word in PHP: http://php.net/manual/fr/reserved.keywords.php. You should try another namespace.

Upvotes: 1

Related Questions