php internals - why is this valid PHP code -



php internals - why is this valid PHP code -

put php interpreter , won't show errors. doesn't right me. can shed lite on why works? i'm looking insight on lexer/parser.

<?php -01;[];[];[];4;[[-1]];

although code seems have proper syntax, doesn't is.

there lack of line-breaks, looks jumbled together, does have proper syntax semi-colons @ end of each statement.

if rewrite code more legible, this:

-01; // negative number meaningless 0 padded in front end of it. []; // empty array isn't assigned variable, hence useless; []; // same []; // same 4; // again, number isn't assigned variable nor expression. [[-1]]; // multi-dimensional array -1 inner arrays value, isn't assigned either.

valid code, useless.

php php-internals

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -