3.4. Abnormal Script TerminationMost scripts will execute from start to finish, but sometimes they might end prematurely. There is a variety of reasons why this will happen:
To be brutally honest, the first situation is unequivocally the most common. This will change a little as your skill with PHP improves, but the first situation is still the most common, even among the most veteran programmers. Common errors include missing semicolons and parentheses, for example: <?php $i = 10 $j = 5; if (($i + 2) - ($j + 5) == 10 { print "Success!"; } ?> The first line is missing a semicolon, which will cause PHP to flag an error on the second line. Also, the second line is missing a parenthesis after "== 10", causing another error. |