Alternative syntax for if, while loop, for loop, foreach and switch statement

In PHP have an alternative syntax for if, while, for, foreach, and switch. The basic form of the alternate syntax is to change the opening brace to a colon (:) and the closing brace to endif;, endwhile;, endfor;, endforeach;, or endswitch;, respectively.

Syntax :
for (initial; condition; increment)  :
    Program will execute if condition is true;
endfor;

Print some numbers from 1 to 4 using For loops
<?php
$i = 1;
for($i=0;$i<=4;$i++) : 
    echo $i;
endfor;
?>

Output : 1 2 3 4 .