About Me

My photo

Father, hacker, partner, feminist, atheist, socialist, SJW. Ex-Russian, Canadian, Québécois par adoption; universal basic income NDP-er (and I vote!); electric-car driving pansy; lapsed artist and photographer.

Abusive comments will be deleted, and abusive posters banned without warning.

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?

5 comments:

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.

Seth said...

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

Helgi Þormar Þorbjörnsson said...

Do:

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.

http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php

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

Ilya Sergeevich said...

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

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