Parse error syntax error, unexpected T PAAMAYIM NEKUDOTAYIM

July 7, 2021 . 1 MIN READ

T_PAAMAYIM_NEKUDOTAYIM is the double colon scope resolution thingy PHP uses – ::

Quick glance at your code, I think this line:

return $cnf::getConfig($key);

should be

return $cnf->getConfig($key);

The first is the way to call a method statically – this code would be valid if $cnf contained a string that was also a valid class. The -> syntax is for calling a method on an instance of a class/object.

 

http://stackoverflow.com/questions/1966010/what-does-this-mean-parse-error-syntax-error-unexpected-t-paamayim-nekudotay
http://www.seblod.com/v2/forum/105-General-Discussions/35230-SOLVED-Parse-error-syntax-error-unexpected-T_PAAMAYIM_NEKUDOTAYIM-in-homea3273512public_htmllibrariescmscckcckphp-on-line-27.html

Leave a Reply

Your email address will not be published. Required fields are marked *