Status of undocumented language constructs
[email protected] ("Gerard Neil")
| Newsgroups | php.lang |
|---|---|
| Organization | Sausage Software |
| Message-ID | <[email protected]> |
Hi there,
I'm in the process of (re)building a PHP syntax highlighter. I've been using
both the doco, the Zend lexer/parser code, and the mailing lists as my
reference, and I've been able to work out most things for myself. But I've
found a few that I can't suss.
Firstly, I can't find any descriptions of these constructs, even though Zend
recognises them:
- The "scope resolution" operator ::, which is given the endearing and
cryptic token
T_PAAMAYIM_NEKUDOTAYIM in the lexer.
- declare
- enddeclare
- const
- use
Clearly, these aren't in common use, and not many people will suffer if I
get it wrong, but I'd still like to know:
- what version of PHP did these things appear?
- what version of PHP did they get deprecated?
Secondly, there's the status of string literals and the back-tick operator,
and whether embedded newlines are supposed to be legal. I know they work,
but are the following *supposed* to be legal, or not?
"I am a multi
line string"
'So am
I'
`echo exec
me`
Thanks,
Gid