3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'H', 'E', 'L', 'L', 'O', ]; $string = implode("", $array); for ($i = 0; $i <= count($array); $i++) { echo substr($string, 0, $i)."\n"; }

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.4.20.0160.00317.68
8.4.10.0000.00919.23
8.3.150.0140.00420.65
8.3.140.0110.00716.55
8.3.130.0030.00618.39
8.3.120.0060.01218.99
8.3.110.0040.00420.94
8.3.100.0110.00716.79
8.3.90.0060.00918.49
8.3.80.0080.00419.36
8.3.70.0150.00418.55
8.3.60.0070.01016.38
8.3.50.0140.00724.51
8.3.40.0130.01318.67
8.3.30.0070.00718.76
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.270.0070.01017.30
8.2.260.0110.00718.84
8.2.250.0100.01016.46
8.2.240.0080.00017.04
8.2.230.0000.00822.58
8.2.220.0000.00837.54
8.2.210.0120.00626.77
8.2.200.0060.00316.63
8.2.190.0000.01516.58
8.2.180.0090.00625.92
8.2.170.0040.01118.83
8.2.160.0070.01422.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00426.35
8.2.110.0060.00321.00
8.2.100.0060.00617.79
8.2.90.0000.00817.91
8.2.80.0040.00417.97
8.2.70.0080.00017.50
8.2.60.0030.00617.50
8.2.50.0050.00318.05
8.2.40.0090.00018.28
8.2.30.0060.00317.94
8.2.20.0040.00418.00
8.2.10.0030.00519.35
8.2.00.0050.00219.20
8.1.310.0150.00416.66
8.1.300.0030.00518.46
8.1.290.0090.00018.88
8.1.280.0040.01425.92
8.1.270.0080.00023.99
8.1.260.0060.00328.09
8.1.250.0000.00828.09
8.1.240.0070.00322.06
8.1.230.0060.00620.97
8.1.220.0040.00417.79
8.1.210.0050.00319.94
8.1.200.0030.00617.23
8.1.190.0030.00617.23
8.1.180.0070.00718.10
8.1.170.0060.00318.53
8.1.160.0040.00418.93
8.1.150.0050.00218.80
8.1.140.0050.00318.76
8.1.130.0000.00720.14
8.1.120.0030.00517.39
8.1.110.0040.00417.47
8.1.100.0030.00617.41
8.1.90.0000.00717.34
8.1.80.0000.00717.37
8.1.70.0000.00717.42
8.1.60.0040.00417.61
8.1.50.0000.00817.43
8.1.40.0080.00417.41
8.1.30.0040.00417.66
8.1.20.0080.00017.58
8.1.10.0040.00417.52
8.1.00.0050.00517.45
8.0.300.0040.00420.15
8.0.290.0000.00716.75
8.0.280.0000.00720.11
8.0.270.0000.00718.00
8.0.260.0000.00620.20
8.0.250.0040.00416.91
8.0.240.0000.00616.88
8.0.230.0000.00816.85
8.0.220.0030.00316.88
8.0.210.0070.00016.87
8.0.200.0000.00716.97
8.0.190.0070.00016.95
8.0.180.0040.00416.96
8.0.170.0030.00716.95
8.0.160.0070.00016.97
8.0.150.0040.00416.74
8.0.140.0080.00016.87
8.0.130.0000.00513.34
8.0.120.0000.00716.91
8.0.110.0000.00716.72
8.0.100.0030.00516.90
8.0.90.0040.00416.74
8.0.80.0040.01216.91
8.0.70.0000.00716.87
8.0.60.0040.00417.01
8.0.50.0040.00416.91
8.0.30.0110.01116.84
8.0.20.0120.00617.11
8.0.10.0070.00016.89
8.0.00.0090.00916.97
7.4.330.0000.00515.55
7.4.320.0030.00516.64
7.4.300.0030.00316.40
7.4.290.0090.00016.50
7.4.280.0050.00316.63
7.4.270.0040.00416.51
7.4.260.0000.00513.30
7.4.250.0030.00316.36
7.4.240.0000.00716.39
7.4.230.0070.00016.70
7.4.220.0000.00716.59
7.4.210.0080.00916.58
7.4.200.0040.00416.54
7.4.130.0090.01116.46
7.4.120.0120.01216.46
7.4.110.0100.01316.62
7.4.100.0080.00816.42
7.4.90.0060.01216.42
7.4.80.0090.01116.51
7.4.70.0120.00616.22
7.4.60.0070.01016.26
7.4.50.0100.00616.44
7.4.40.0040.01416.45
7.4.30.0060.01216.48
7.4.20.0110.00516.18
7.4.10.0100.00716.41
7.4.00.0140.00716.45
7.3.330.0000.00716.18
7.3.320.0050.00013.18
7.3.310.0000.00716.11
7.3.300.0000.00716.25
7.3.290.0090.00716.20
7.3.280.0100.00516.22
7.3.260.0030.01516.38
7.3.230.0050.01316.50
7.3.210.0140.00316.29
7.3.200.0080.00816.57
7.3.190.0130.00316.48
7.3.180.0100.00716.04
7.3.170.0040.01516.48
7.3.160.0150.00416.13
7.3.150.0150.00316.21
7.3.140.0160.00316.36
7.3.130.0090.00616.40
7.3.120.0090.01216.13
7.3.110.0090.00916.48
7.3.100.0160.00316.36
7.3.90.0120.00616.23
7.3.80.0160.00616.40
7.3.70.0150.00716.24
7.3.60.0070.01016.11
7.3.50.0130.00316.14
7.3.40.0100.00716.12
7.3.30.0080.00816.06
7.3.20.0200.00516.26
7.3.10.0150.00316.29
7.3.00.0150.00316.23
7.2.330.0150.00316.31
7.2.320.0070.01016.72
7.2.310.0110.00816.56
7.2.300.0040.01716.39
7.2.290.0060.00916.80
7.2.280.0060.01216.27
7.2.270.0070.01016.57
7.2.260.0060.01316.47
7.2.250.0160.00316.54
7.2.240.0090.00916.69
7.2.230.0150.00616.55
7.2.220.0140.01116.62
7.2.210.0090.01316.57
7.2.200.0040.01516.43
7.2.190.0070.01116.30
7.2.180.0080.01516.23
7.2.170.0000.01616.39
7.2.160.0100.00716.26
7.2.150.0160.00716.23
7.2.140.0080.01116.39
7.2.130.0030.01616.33
7.2.120.0080.01116.54
7.2.110.0120.00616.48
7.2.100.0030.01716.55
7.2.90.0070.01016.39
7.2.80.0080.01116.48
7.2.70.0090.00916.05
7.2.60.0120.00816.49
7.2.50.0090.00916.56
7.2.40.0070.01116.28
7.2.30.0190.00016.42
7.2.20.0120.00816.33
7.2.10.0100.01016.25
7.2.00.0130.00616.55

preferences:
28.6 ms | 403 KiB | 5 Q