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); $counter+=10; } ?>
Output for 4.3.0 - 7.1.0
Counter -360 - Opacity 90Counter -350 - Opacity 80Counter -340 - Opacity 70Counter -330 - Opacity 60Counter -320 - Opacity 50Counter -310 - Opacity 40Counter -300 - Opacity 30Counter -290 - Opacity 20Counter -280 - Opacity 10Counter -270 - Opacity 0Counter -260 - Opacity 10Counter -250 - Opacity 20Counter -240 - Opacity 30Counter -230 - Opacity 40Counter -220 - Opacity 50Counter -210 - Opacity 60Counter -200 - Opacity 70Counter -190 - Opacity 80Counter -180 - Opacity 90Counter -170 - Opacity 80Counter -160 - Opacity 70Counter -150 - Opacity 60Counter -140 - Opacity 50Counter -130 - Opacity 40Counter -120 - Opacity 30Counter -110 - Opacity 20Counter -100 - Opacity 10Counter -90 - Opacity 0Counter -80 - Opacity 10Counter -70 - Opacity 20Counter -60 - Opacity 30Counter -50 - Opacity 40Counter -40 - Opacity 50Counter -30 - Opacity 60Counter -20 - Opacity 70Counter -10 - Opacity 80Counter 0 - Opacity 90Counter 10 - Opacity 80Counter 20 - Opacity 70Counter 30 - Opacity 60Counter 40 - Opacity 50Counter 50 - Opacity 40Counter 60 - Opacity 30Counter 70 - Opacity 20Counter 80 - Opacity 10Counter 90 - Opacity 0Counter 100 - Opacity 10Counter 110 - Opacity 20Counter 120 - Opacity 30Counter 130 - Opacity 40Counter 140 - Opacity 50Counter 150 - Opacity 60Counter 160 - Opacity 70Counter 170 - Opacity 80Counter 180 - Opacity 90Counter 190 - Opacity 80Counter 200 - Opacity 70Counter 210 - Opacity 60Counter 220 - Opacity 50Counter 230 - Opacity 40Counter 240 - Opacity 30Counter 250 - Opacity 20Counter 260 - Opacity 10Counter 270 - Opacity 0Counter 280 - Opacity 10Counter 290 - Opacity 20Counter 300 - Opacity 30Counter 310 - Opacity 40Counter 320 - Opacity 50Counter 330 - Opacity 60Counter 340 - Opacity 70Counter 350 - Opacity 80Counter 360 - Opacity 90