3v4l.org

run code in 300+ PHP versions simultaneously
<?php for($i = 0.99; $i<= 30.99; $i++){ echo $i; if(number_format($i,2) == "22.99"){ echo '<--- selected'; } echo "\n"; }
Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.30, 8.0.0 - 8.0.20, 8.1.0 - 8.1.7
0.99 1.99 2.99 3.99 4.99 5.99 6.99 7.99 8.99 9.99 10.99 11.99 12.99 13.99 14.99 15.99 16.99 17.99 18.99 19.99 20.99 21.99 22.99<--- selected 23.99 24.99 25.99 26.99 27.99 28.99 29.99

preferences:
50.73 ms | 410 KiB | 5 Q