Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is the strangest parsing fact I've learned since PHP having a token named T_PAAMAYIM_NEKUDOTAYIM. (Because the parser was developed in Israel.)

https://stackoverflow.com/questions/592322/php-expects-t-paa...




I don’t speak hebrew but someone online said that this is an unnecessarily literal translation of "double colon" and it’s not what most developers would call it. Take that with a grain of salt though.


The history of that entire fiasco is quite comprehensivly summarized at https://phil.tech/2013/wtf-is-t-paamayim-nekudotayim/ .


What a childish rant that blog post is though...


That was a nice history lesson actually. I remember being confused at the error message, looking it up, being confused at the explanation... because I hadn't learned static calls yet. I may not have even understood classes at that point, but that was way back in the day.

If PHP support has to handle the same stupid question about the meaning of a very unnecessary term that's confusing people and causing more support requests than anything else... then it made sense to change it.

I'm glad I read the blog post; it clears up a LOT of thoughts I had about the error... calling it childish seems off. Maybe you had a dog in the fight at some point?


> Maybe you had a dog in the fight at some point?

No! But read the part where Rasmus Lerdorf "beams into" the conversation and his opinion is dismissed with "let's take a vote".

I mean, if you wanted a language that wasn't intentionally designed by Rasmus Lerdorf, you kinda picked the wrong one. This is what I was referring to.


Seems plausible since afaik the other constants were in English, so this seems to be a developer's joke.


It was a joke, a troll really, that just gave PHP haters something else to deride the language with to people who don't know it that well.


If you look it up, this token can have two names. It is indeed a double colon :)


Oooh now I wonder if it literally means "dual intestine".


Nope, it's literally "twice colon" where colon is specifically the punctuation mark. פעמים נקודותיים


Ahh dreams dashed.


I thought we were talking about colons?


Dashed? Em-dashed? Hyphenated? Or just subtracted?


U+1F4A8


Widely known because the token names were surfaced to users in error messages, so some common syntax mistakes would produce deeply unhelpful "Unexpected T_PAAMAYIM_NEKUDOTAYIM" errors. Hopefully they eventually did something about it, but it was like that for years and was one of the many things that put me off PHP for life.


> Widely known because the token names were surfaced to users in error messages, so some common syntax mistakes would produce deeply unhelpful "Unexpected T_PAAMAYIM_NEKUDOTAYIM" errors. Hopefully they eventually did something about it, but it was like that for years and was one of the many things that put me off PHP for life.

One can like or dislike PHP for a variety of reasons, but surely being put off it for life because a non-English string is exposed to the end user is a bit much.


As another commenter said it was "one of many things". Also, it's not the fact that it was non-English that was off-putting. It's more the fact that the T_ identifier was used, presumably via a macro.

People are often defensive about PHP, but at the end of the day we choose our tools. I wrote a significant amount of PHP for a brief period and out of maybe 20 or so languages I've used professionally I found it by a wide margin the least pleasant to work with. Supposedly it has improved a lot, and I'm glad if so. But I have no desire to use it again, and am unlikely to ever have a reason to.


Also the only information available to the developer when it was added in PHP 3 in 1997, good luck Googling that error. They didn't add the actual token to the error message until PHP 5.4 over a decade later.


No, it shows a certain sloppiness around the language. This has all been cleaned up and a lot of effort has gone into resolving most issues in PHP.


"One of the many things", so not the only thing, but a thing nonetheless.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: