3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 0; $i < 10; $i++) { var_dump(log10($i % 10 + 1) * 10 + 1); }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
float(1) float(4.0102999566398125) float(5.771212547196624) float(7.020599913279624) float(7.989700043360188) float(8.781512503836437) float(9.450980400142567) float(10.030899869919436) float(10.542425094393248) float(11)
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.8, 5.5.37 - 5.5.38, 5.6.23 - 5.6.28, 7.0.8 - 7.0.20, 7.1.0 - 7.1.7, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33
float(1) float(4.0102999566398) float(5.7712125471966) float(7.0205999132796) float(7.9897000433602) float(8.7815125038364) float(9.4509804001426) float(10.030899869919) float(10.542425094393) float(11)

preferences:
161.15 ms | 405 KiB | 220 Q