为什么这个PHP for循环在执行循环控制后没有分号


Why does this PHP for loop execute without a semicolon after the loop control?

以下是不使用分号执行的简单PHP代码:

<?php
for($a=1; $a<=10;Print $a,$a++)
?>

这怎么可能?

PHP代码块的结束标记自动暗示分号;不需要使用分号来终止最后一个PHP块的行。

请参阅PHP指令分离。

与C或Perl一样,PHP要求指令在每条语句的末尾以分号结尾PHP代码块的结束标记自动包含分号;您不需要在PHP块的最后一行末尾使用分号。

http://php.net/manual/en/language.basic-syntax.instruction-separation.php