Unexpected T_PAAMAYIM_NEKUDOTAYIM, expecting T_NS_Separator

前端 未结 2 1909
再見小時候
再見小時候 2021-01-04 13:43

I moved an application from an Ubuntu 11.04 (Natty Narwhal) Server to a Red Hat Enterprise Linux (RHEL) server over the weekend. My error log is full of the PHP errors

相关标签:
2条回答
  • 2021-01-04 14:29

    It looks like your new server is running PHP 5.3, while your old one was running an earlier version.

    In PHP 5.3, namespace is a keyword, thanks to the new namespace feature.

    Your existing Namespace class is going to need to be renamed. The parse error is occurring as the code tries to resolve Namespace::isTalk() into a namespace name. (The syntax for doing so would be something akin to namespace Foo; it becomes confused at seeing the :: resolution operator.)

    0 讨论(0)
  • 2021-01-04 14:32

    PAAMAYIM_NEKUDOTAYIM is the name for the :: (it is Hebrew for twice colon)

    Check all the lines that contain :: and make sure they are all correct calls.

    0 讨论(0)
提交回复
热议问题