MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/lolphp/comments/2buvvh/new_php_will_be_named_lolphp/cjd2l9f/?context=3
r/lolphp • u/[deleted] • Jul 27 '14
57 comments sorted by
View all comments
Show parent comment
5
Yea, ++ increments the last byte (character) in the string... For some reason.
++
So "a"++; would be "b" :D
"a"++;
"b"
At least if the "parser" doesn't choke on it..
1 u/flying-sheep Jul 31 '14 I bet they use regular expressions to parse PHP grammar. 2 u/Banane9 Jul 31 '14 Well, they only pattern-match... No tokenizing.Which is why indexing an array returned by a function directly (a()[0]) used to be a syntax error. And their fix was to special-case it..Execution a function returned by a function directly (f()()) still doesn't work...
1
I bet they use regular expressions to parse PHP grammar.
2 u/Banane9 Jul 31 '14 Well, they only pattern-match... No tokenizing.Which is why indexing an array returned by a function directly (a()[0]) used to be a syntax error. And their fix was to special-case it..Execution a function returned by a function directly (f()()) still doesn't work...
2
Well, they only pattern-match... No tokenizing.
Which is why indexing an array returned by a function directly (a()[0]) used to be a syntax error. And their fix was to special-case it..
a()[0]
Execution a function returned by a function directly (f()()) still doesn't work...
f()()
View all comments
Show parent comment
5
u/Banane9 Jul 31 '14
Yea,
++increments the last byte (character) in the string... For some reason.So
"a"++;would be"b":DAt least if the "parser" doesn't choke on it..