# Obscure token name

- Thread: https://externals.io/message/48091
- Original archive: https://news-web.php.net/php.internals/48091
- Started by mathieu.suen on 2010-04-26T14:32:11+00:00
- Messages: 17
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #48091 — mathieu.suen — 2010-04-26T14:32:11+00:00

URL: https://externals.io/message/48091#48091

Hi,

I am wondering why is the token name so incomprehensible ?
Like T_PAAMAYIM_NEKUDOTAYIM...


-- Mathieu Suen

---

## #48092 — Jordi Boggiano — 2010-04-26T14:36:16+00:00

URL: https://externals.io/message/48091#48092 · In reply to: #48091

> I am wondering why is the token name so incomprehensible ?
> Like T_PAAMAYIM_NEKUDOTAYIM...

Historical reasons, easter egg, call it what you want, but it's probably
gonna stay.

http://en.wikipedia.org/wiki/Scope_resolution_operator#PHP

Cheers,
Jordi

---

## #48095 — Hannes Magnusson — 2010-04-26T16:16:57+00:00

URL: https://externals.io/message/48091#48095 · In reply to: #48091

> Hi,
>
> I am wondering why is the token name so incomprehensible ?
> Like T_PAAMAYIM_NEKUDOTAYIM...

"Paamayim Nekudotayim would, at first, seem like a strange choice for
naming a double-colon. However, while writing the Zend Engine 0.5
(which powers PHP 3), that's what the Zend team decided to call it. It
actually does mean double-colon - in Hebrew!"

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

-Hannes

---

## #48101 — mathieu.suen — 2010-04-27T06:50:55+00:00

URL: https://externals.io/message/48091#48101 · In reply to: #48095

Hannes Magnusson wrote:
> 
>   
> > […]
>
> "Paamayim Nekudotayim would, at first, seem like a strange choice for
> naming a double-colon. However, while writing the Zend Engine 0.5
> (which powers PHP 3), that's what the Zend team decided to call it. It
> actually does mean double-colon - in Hebrew!"
>
> http://php.net/manual/en/language.oop5.paamayim-nekudotayim.php
>
> -Hannes
>
>   
Then `T_DOUBLE_COLON` would have been perfectly clear.

-- Mathieu Suen

---

## #48102 — Stefan Marr — 2010-04-27T07:17:27+00:00

URL: https://externals.io/message/48091#48102 · In reply to: #48101

> Then `T_DOUBLE_COLON` would have been perfectly clear.
Honestly, token names in error messages is so '80s.
Instead of fixing internal details, form the users point of view it might be better to not expose token names at all, but have meaningful parser errors. 


Best regards
Stefan

---

## #48104 — Sebastian Bergmann — 2010-04-27T07:32:04+00:00

URL: https://externals.io/message/48091#48104 · In reply to: #48102

Am 27.04.2010 09:17, schrieb Stefan Marr:
> Instead of fixing internal details, form the users point of view it 
> might be better to not expose token names at all, but have meaningful
> parser errors.

 ... which we want to achieve with the migration from bison to lemon,
 right?

-- 
Sebastian Bergmann                    Co-Founder and Principal Consultant
http://sebastian-bergmann.de/                           http://thePHP.cc/

---

## #48109 — Davey Shafik — 2010-04-27T13:02:31+00:00

URL: https://externals.io/message/48091#48109 · In reply to: #48101

From the manual:

 `T_PAAMAYIM_NEKUDOTAYIM` ::	::. Also defined as T_DOUBLE_COLON.

http://php.net/manual/en/tokens.php

 `T_PAAMAYIM_NEKUDOTAYIM` is hardly un-google-able.

- Davey



> Hannes Magnusson wrote:
> > […]
> Then `T_DOUBLE_COLON` would have been perfectly clear.
> 
> -- Mathieu Suen

---

## #48110 — mathieu.suen — 2010-04-27T13:43:58+00:00

URL: https://externals.io/message/48091#48110 · In reply to: #48102

Stefan Marr wrote:
> 
>   
> > […]
> Honestly, token names in error messages is so '80s.
> Instead of fixing internal details, form the users point of view it might be better to not expose token names at all, but have meaningful parser errors. 
>
>
> Best regards
> Stefan
>
>
>   
+1

-- Mathieu Suen

---

## #48111 — mathieu.suen — 2010-04-27T13:53:52+00:00

URL: https://externals.io/message/48091#48111 · In reply to: #48109

OMG More than 100 token
I am pretty sure that more than 50% are syntactic sugar.




Davey Shafik wrote:
> From the manual:
>
> `T_PAAMAYIM_NEKUDOTAYIM` ::	::. Also defined as T_DOUBLE_COLON.
>
> http://php.net/manual/en/tokens.php
>
> `T_PAAMAYIM_NEKUDOTAYIM` is hardly un-google-able.
>
> - Davey
>
> 
>
>   
> > […]

-- Mathieu Suen

---

## #48112 — Rune Kaagaard — 2010-04-27T14:19:11+00:00

URL: https://externals.io/message/48091#48112 · In reply to: #48111

You can pry `T_PAAMAYIM_NEKUDOTAYIM` from my cold dead fingers!


> OMG More than 100 token
> I am pretty sure that more than 50% are syntactic sugar.
>
>
>
>
> Davey Shafik wrote:
> > […]
>
> -- Mathieu Suen

---

## #48122 — johannes@schlueters.de — 2010-04-28T14:27:41+00:00

URL: https://externals.io/message/48091#48122 · In reply to: #48091

> I am wondering why is the token name so incomprehensible ?
> Like T_PAAMAYIM_NEKUDOTAYIM...

I don't mind if we change the name in the error message. Seems to be an
issue for some ... but I think you have to look it (quickly) up the
first time you stumble over it and then remember it so it shouldn't be a
tooo big issue.
If you fear typing it: The tokenizer extension already provides
 `T_DOUBLE_COLON` as synonym :-)

php> $t=token_get_all("<?::"); // Token 0: <?   Token 1: ::
php> var_dump($t[1][0] == `T_DOUBLE_COLON` && $t[1][0] == T_PAAMAYIM_NEKUDOTAYIM);
bool(true)

johannes

---

## #48150 — mathieu.suen — 2010-04-29T11:13:00+00:00

URL: https://externals.io/message/48091#48150 · In reply to: #48122

Johannes Schlüter wrote:
> 
>   
> > […]
>
> I don't mind if we change the name in the error message. Seems to be an
> issue for some ... but I think you have to look it (quickly) up the
> first time you stumble over it and then remember it so it shouldn't be a
> tooo big issue.
> If you fear typing it: The tokenizer extension already provides
> `T_DOUBLE_COLON` as synonym :-)
>
> php> $t=token_get_all("<?::"); // Token 0: <?   Token 1: ::
> php> var_dump($t[1][0] == `T_DOUBLE_COLON` && $t[1][0] == T_PAAMAYIM_NEKUDOTAYIM);
> bool(true)
>
> johannes
>
>
>   
The question is that I want to understand  error messages.
I can google it but that is not a good way of doing things.
Stefan got the right answer: "Better parser errors"

--Mathieu Suen

---

## #48151 — Martin Jansen — 2010-04-29T12:07:02+00:00

URL: https://externals.io/message/48091#48151 · In reply to: #48150

> Johannes Schlüter wrote:
> > […]
> The question is that I want to understand  error messages.
> I can google it but that is not a good way of doing things.

Folks, can't you just accept that `T_PAAMAYIM_NEKUDOTAYIM` is intended to
make you smile?  There's nothing to see here, please move along.

- Martin

---

## #48152 — Dennis Haarbrink — 2010-04-29T12:17:51+00:00

URL: https://externals.io/message/48091#48152 · In reply to: #48151

> -----Oorspronkelijk bericht-----
> Van: Martin Jansen [mailto:martin@divbyzero.net]
> Verzonden: donderdag 29 april 2010 14:07
> Aan: mathieu.suen
> CC: PHP internals
> Onderwerp: Re: [PHP-DEV] Obscure token name
> 
> 
> > […]
> an
> > […]
> 
> Folks, can't you just accept that `T_PAAMAYIM_NEKUDOTAYIM` is intended to
> make you smile?  There's nothing to see here, please move along.
> 
> - Martin

+1

I remember 'back in the days' when I first saw this error. I googled
it, learned what it meant and never forgot it since.

- Dennis

---

## #48153 — Steven Van Poeck — 2010-04-29T12:25:21+00:00

URL: https://externals.io/message/48091#48153 · In reply to: #48151

>
> Folks, can't you just accept that `T_PAAMAYIM_NEKUDOTAYIM` is intended to
> make you smile?  There's nothing to see here, please move along.
>
> - Martin
+1

---

## #48154 — mathieu.suen — 2010-04-29T13:42:47+00:00

URL: https://externals.io/message/48091#48154 · In reply to: #48153

Steven Van Poeck wrote:
> > […]
> +1
>
Don' t you read what I say?
So to be clear:

I don't car the name of the token.

I care not understanding the parser error.

=> (enhance)
Better parser error is a possible solution

-- Mathieu Suen

---

## #48156 — Peter Lind — 2010-04-29T14:41:15+00:00

URL: https://externals.io/message/48091#48156 · In reply to: #48154

> Steven Van Poeck wrote:
> > […]
> Don' t you read what I say?

I'd be surprised if they haven't read it. My guess: they just don't
care because it seems you're kicking up a fuss about very little -
i.e. you're whining because you had to google.

If only all problems were as small as that.

Regards
Peter

-- 
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51
</hype
