do-while循环的替代语法(使用冒号)


Alternative syntax for do-while loop (using colon)

手册中引用了大多数使用冒号的控制结构的替代语法,但我没有看到do-while循环的语法。这可能吗?像这样:

//Simple example
$arr = array(1,2,3,4,5,6);
$i = 0;
do :
    echo $arr[$i].'<br/>';
    $i++;
while($i < count($arr)) endwhile;

从手册:-

do-while循环只有一种语法:
$i = 0;
do {
    echo $i;
} while ($i > 0);