Why are the curly braces around the while loop not necessary in this context?

The curly braces around the while loop are not necessary in this context because there is only one statement following the while condition. When there is only one statement, the curly braces can be omitted, and the statement can directly follow the while condition. This is a shorthand syntax allowed in PHP for better readability and conciseness.

// Example of a while loop without curly braces
$i = 0;
while ($i < 5)
    echo $i++;