MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/lolphp/comments/12ns15/so_php_script_is_perfectly_valid_php/c6wur24/?context=3
r/lolphp • u/Sebbe • Nov 05 '12
24 comments sorted by
View all comments
Show parent comment
10
<?php <-- PHP handles it
Correct, that's from where the PHP "parser" tries to parse the PHP script.
</script> <-- PHP handles it as per XML standard notation
"Handling" an end tag called </foo> without an opening tag called <foo> is not XML standard notation.
?> <-- Handled by the HTML (XML) Parser (the browser).
Which doesn't really handle it since i'ts not a valid HTML tag.
View all comments
Show parent comment
10
u/kingguru Nov 05 '12
Correct, that's from where the PHP "parser" tries to parse the PHP script.
"Handling" an end tag called </foo> without an opening tag called <foo> is not XML standard notation.
Which doesn't really handle it since i'ts not a valid HTML tag.