3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'abcdef'; echo substr($string, 2, 3).PHP_EOL; // cde echo substr($string, 2, 0).PHP_EOL; // (nothing) echo substr($string, 2, 10).PHP_EOL; // the rest echo substr($string, 2, null).PHP_EOL; // the rest echo substr($string, 2).PHP_EOL; // the rest

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.90.0350.00616.68
8.5.80.0340.00716.63
8.5.70.0330.00616.30
8.5.60.0340.00916.51
8.5.50.0330.00816.27
8.5.40.0290.01016.34
8.5.30.0260.00716.46
8.5.20.0280.00616.41
8.5.10.0340.01216.15
8.5.00.0120.00716.65
8.4.240.0270.01318.92
8.4.230.0330.00919.41
8.4.220.0320.01019.48
8.4.210.0350.00919.46
8.4.200.0320.01019.59
8.4.190.0280.00919.47
8.4.180.0200.00619.64
8.4.170.0210.00819.65
8.4.160.0380.01119.31
8.4.150.0330.01019.66
8.4.140.0290.01117.53
8.4.130.0340.00817.55
8.4.120.0300.00517.79
8.4.110.0270.00817.76
8.4.100.0290.01017.76
8.4.90.0380.00817.67
8.4.80.0360.00817.73
8.4.70.0370.00617.45
8.4.60.0340.00817.59
8.4.50.0380.00817.80
8.4.40.0330.01117.63
8.4.30.0430.00317.32
8.4.20.0380.01117.55
8.4.10.0340.00717.48
8.3.330.0280.00618.29
8.3.320.0270.00618.36
8.3.310.0320.00818.36
8.3.300.0320.00918.21
8.3.290.0340.00718.31
8.3.280.0290.01118.22
8.3.270.0360.00616.73
8.3.260.0240.00616.67
8.3.250.0330.01016.71
8.3.240.0320.00816.71
8.3.230.0320.00716.57
8.3.220.0330.00516.54
8.3.210.0320.00616.63
8.3.200.0330.00816.40
8.3.190.0330.00716.66
8.3.180.0370.00516.54
8.3.170.0350.01016.34
8.3.160.0330.01016.43
8.3.150.0400.00616.50
8.3.140.0320.00616.33
8.3.130.0230.00816.64
8.3.120.0280.00916.50
8.3.110.0260.00816.64
8.3.100.0270.00616.52
8.3.90.0230.00416.65
8.3.80.0130.00616.66
8.3.70.0250.00416.67
8.3.60.0330.00516.65
8.3.50.0340.00816.41
8.3.40.0390.00717.90
8.3.30.0310.00717.78
8.3.20.0260.00917.85
8.3.10.0260.01017.97
8.3.00.0260.00817.76
8.2.330.0480.00617.78
8.2.320.0360.01017.86
8.2.310.0270.00518.20

preferences:
51.91 ms | 769 KiB | 5 Q