3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $counter=-360; $opacity=0; while($counter<=360) { $opacity=abs((abs($counter)%180)-90); echo("Counter ".$counter." - Opacity ".$opacity."<br>"); $counter+=10; } ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Counter -360 - Opacity 90<br>Counter -350 - Opacity 80<br>Counter -340 - Opacity 70<br>Counter -330 - Opacity 60<br>Counter -320 - Opacity 50<br>Counter -310 - Opacity 40<br>Counter -300 - Opacity 30<br>Counter -290 - Opacity 20<br>Counter -280 - Opacity 10<br>Counter -270 - Opacity 0<br>Counter -260 - Opacity 10<br>Counter -250 - Opacity 20<br>Counter -240 - Opacity 30<br>Counter -230 - Opacity 40<br>Counter -220 - Opacity 50<br>Counter -210 - Opacity 60<br>Counter -200 - Opacity 70<br>Counter -190 - Opacity 80<br>Counter -180 - Opacity 90<br>Counter -170 - Opacity 80<br>Counter -160 - Opacity 70<br>Counter -150 - Opacity 60<br>Counter -140 - Opacity 50<br>Counter -130 - Opacity 40<br>Counter -120 - Opacity 30<br>Counter -110 - Opacity 20<br>Counter -100 - Opacity 10<br>Counter -90 - Opacity 0<br>Counter -80 - Opacity 10<br>Counter -70 - Opacity 20<br>Counter -60 - Opacity 30<br>Counter -50 - Opacity 40<br>Counter -40 - Opacity 50<br>Counter -30 - Opacity 60<br>Counter -20 - Opacity 70<br>Counter -10 - Opacity 80<br>Counter 0 - Opacity 90<br>Counter 10 - Opacity 80<br>Counter 20 - Opacity 70<br>Counter 30 - Opacity 60<br>Counter 40 - Opacity 50<br>Counter 50 - Opacity 40<br>Counter 60 - Opacity 30<br>Counter 70 - Opacity 20<br>Counter 80 - Opacity 10<br>Counter 90 - Opacity 0<br>Counter 100 - Opacity 10<br>Counter 110 - Opacity 20<br>Counter 120 - Opacity 30<br>Counter 130 - Opacity 40<br>Counter 140 - Opacity 50<br>Counter 150 - Opacity 60<br>Counter 160 - Opacity 70<br>Counter 170 - Opacity 80<br>Counter 180 - Opacity 90<br>Counter 190 - Opacity 80<br>Counter 200 - Opacity 70<br>Counter 210 - Opacity 60<br>Counter 220 - Opacity 50<br>Counter 230 - Opacity 40<br>Counter 240 - Opacity 30<br>Counter 250 - Opacity 20<br>Counter 260 - Opacity 10<br>Counter 270 - Opacity 0<br>Counter 280 - Opacity 10<br>Counter 290 - Opacity 20<br>Counter 300 - Opacity 30<br>Counter 310 - Opacity 40<br>Counter 320 - Opacity 50<br>Counter 330 - Opacity 60<br>Counter 340 - Opacity 70<br>Counter 350 - Opacity 80<br>Counter 360 - Opacity 90<br>