Thursday, February 07, 2008

Life with PHP

Imagine getting the following error message:
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home/icon/test.php on line 9
This is not a fluke, it's actually defined in the standard PHP tokens. :)

PS: I may sound amused, but I'm really not.
PPS: This happens, for example, when you're trying to access a static method of a class using $this::methodName().
PPPS: Seriously, wtf?


Anonymous said...

It's Hebrew. Apparently it means "double colon". The Zend engine was developed by a team of Israeli students. Why they used transliterated Hebrew for that one but not for any other token is beyond me.

skvidal said...

That's hilarious. I think you should start defining things in russian.

Anonymous said...


classname::foobar() or self::foobar (if you are within the class)

You don't access static variables via an object, doesn't make much sense anyway.

stephdau said...

I had replied the following to Nini's post of FB or IM (?), but I guess you were the real source of the question.

As @anonymous mentioned, it's indeed hebrew for double colon, but it's documented as the scope resolution operator.

Not cool to put as an error constant though...

Ilya Sergeevich said...

а ты на каком языке кодил?

или с ООП не встречался?