+ 8
This code should show error. But it is not showing. Some one help please.
According to the php course in sololearn, if we didn't keep semicolon at the end it should show error. But this code is not showing. <?php echo "A"; echo "B"; echo "C" ?> I Removed semicolon at the end of C. https://code.sololearn.com/wX6GxOKHFB3M/?ref=app
6 Respostas
+ 4
Semicolons are statement separator, PHP can ignore the missing semicolon because there is nothing more to process past the last statement `echo "C"`.
Try adding one more statement after the last statement in current code. You will see what I mean : )
+ 5
Thanks Ipang sir
+ 5
Ok Ipang 😅
+ 4
But sir if I remove semicolon after A or B it is showing error
+ 4
No problem buddy 👌
And don't sir me please, I'm just a guy 😁
+ 3
That's what I mean, PHP forgives a missing semicolon only for the very last statement, nowhere else : )