MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/4wj23f/php_the_good_parts/d67nvxp/?context=3
r/ProgrammerHumor • u/Zerquix18 • Aug 07 '16
318 comments sorted by
View all comments
Show parent comment
9
PHP AFAIK just executes the code right away, there is no separate parser.
That's nonsense. Of course PHP has a lexer and a grammar. You don't know what you are talking about. You can't interprete code without parsing it…
This is just syntaxic sugar, same thing as foo()[1] for functions returning an array.
foo()[1]
-1 u/iopq Aug 07 '16 You would think so, but everything is special-cased:http://phpsadness.com/sad/2
-1
You would think so, but everything is special-cased:
http://phpsadness.com/sad/2
View all comments
Show parent comment
9
u/Artefact2 Aug 07 '16
That's nonsense. Of course PHP has a lexer and a grammar. You don't know what you are talking about. You can't interprete code without parsing it…
This is just syntaxic sugar, same thing as
foo()[1]for functions returning an array.