while syntax

Práve tak ako s if..endif, syntax while..endwhile sa tiež zmenil:

Príklad D-7. Migrácia: starý while..endwhile syntax

while ($more_to_come);
    ...
endwhile;

Príklad D-8. Migrácia: nový while..endwhile syntax

while ($more_to_come):
    ...
endwhile;

Varovanie

Ak používate starý while..endwhile syntax v PHP 3.0, dostanete nekonečnú slučku.