3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = '444 444 444'; $n = preg_replace('/\s/', '', $n); //echo $n . "\n"; $t = substr(0, 2, $n); echo $t;

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.3.60.0080.00816.63
8.3.50.0330.00716.27
8.3.40.0160.00018.74
8.3.30.0040.01118.79
8.3.20.0080.00021.90
8.3.10.0090.00921.89
8.3.00.0030.00521.77
8.2.180.0070.01418.67
8.2.170.0140.00722.96
8.2.160.0130.00019.10
8.2.150.0090.00024.18
8.2.140.0030.00624.66
8.2.130.0070.00726.16
8.2.120.0090.00021.18
8.2.110.0070.00420.99
8.2.100.0060.00617.91
8.2.90.0000.00918.09
8.2.80.0000.00818.03
8.2.70.0040.00417.68
8.2.60.0000.00817.80
8.2.50.0000.00818.16
8.2.40.0000.00920.47
8.2.30.0000.00819.45
8.2.20.0080.00018.17
8.2.10.0040.00419.84
8.2.00.0040.00418.04
8.1.280.0110.00425.92
8.1.270.0030.01522.05
8.1.260.0140.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00923.98
8.1.230.0080.00320.86
8.1.220.0000.00817.79
8.1.210.0030.00718.97
8.1.200.0000.00917.35
8.1.190.0080.00017.23
8.1.180.0080.00018.10
8.1.170.0040.00418.72
8.1.160.0040.00418.69
8.1.150.0000.00719.05
8.1.140.0000.00817.56
8.1.130.0000.00920.18
8.1.120.0040.00417.55
8.1.110.0000.00717.52
8.1.100.0040.00417.56
8.1.90.0080.00017.54
8.1.80.0030.00617.58
8.1.70.0000.00717.48
8.1.60.0080.00017.69
8.1.50.0040.00417.58
8.1.40.0070.00317.59
8.1.30.0050.00317.71
8.1.20.0030.00517.64
8.1.10.0030.00617.56
8.1.00.0000.00917.60
8.0.300.0040.00420.03
8.0.290.0000.00816.88
8.0.280.0030.00318.50
8.0.270.0000.00717.32
8.0.260.0000.00716.91
8.0.250.0040.00416.98
8.0.240.0030.00317.16
8.0.230.0070.00016.99
8.0.220.0050.00216.97
8.0.210.0080.00016.95
8.0.200.0080.00017.02
8.0.190.0060.00317.04
8.0.180.0040.00417.02
8.0.170.0030.00616.99
8.0.160.0000.00716.93
8.0.150.0060.00616.90
8.0.140.0070.00016.93
8.0.130.0000.00613.39
8.0.120.0040.00416.88
8.0.110.0030.00517.03
8.0.100.0040.00416.93
8.0.90.0030.00316.99
8.0.80.0070.01016.93
8.0.70.0030.00717.00
8.0.60.0040.00416.93
8.0.50.0080.00017.02
8.0.30.0090.00817.09
8.0.20.0060.01217.40
8.0.10.0020.00517.00
8.0.00.0110.00616.95
7.4.330.0000.00515.55
7.4.320.0000.00616.78
7.4.300.0000.00616.65
7.4.290.0000.00816.73
7.4.280.0040.00416.63
7.4.270.0040.00416.62
7.4.260.0070.00016.71
7.4.250.0050.00216.62
7.4.240.0090.00016.66
7.4.230.0070.00016.84
7.4.220.0030.00516.76
7.4.210.0080.00716.71
7.4.200.0060.00316.38
7.4.160.0110.00516.61
7.4.140.0120.00917.86
7.4.130.0070.01116.73
7.4.120.0090.01116.66
7.4.110.0090.00916.63
7.4.100.0110.01116.55
7.4.90.0120.00616.82
7.4.80.0070.01419.39
7.4.70.0090.00916.82
7.4.60.0110.00416.57
7.4.50.0070.00716.74
7.4.40.0090.01016.66
7.4.00.0100.00714.98
7.3.330.0000.00613.07
7.3.320.0000.00513.16
7.3.310.0050.00216.36
7.3.300.0000.01016.38
7.3.290.0070.00016.24
7.3.280.0050.01416.39
7.3.260.0070.01016.49
7.3.240.0110.01016.33
7.3.230.0100.00716.52
7.3.210.0130.00316.42
7.3.200.0100.00716.29
7.3.190.0030.01416.74
7.3.180.0110.00516.53
7.3.170.0150.00516.66
7.3.160.0150.00316.62
7.2.330.0120.00616.59
7.2.320.0100.01416.58
7.2.310.0100.01116.50
7.2.300.0030.01316.70
7.2.290.0100.00716.64
7.2.60.0060.00617.02
7.2.50.0040.01117.02
7.2.40.1490.01418.15
7.2.30.0270.00817.79
7.2.20.1320.00917.84
7.2.10.1470.01317.93
7.2.00.1230.01117.78
7.1.200.0030.01015.92
7.1.160.1360.01116.70
7.1.150.1270.01016.83
7.1.140.1220.01117.16
7.1.130.1630.01116.76
7.1.120.1020.01316.89
7.1.110.1230.01216.39
7.1.100.1220.00915.99
7.1.90.2380.00816.03
7.1.80.1900.00916.07
7.1.70.1680.01415.35
7.1.60.1700.01233.33
7.1.50.2100.01333.10
7.1.40.1130.01532.75
7.1.30.2320.01032.82
7.1.20.1970.01932.84
7.1.10.2580.01614.84
7.1.00.0790.00815.14

preferences:
62.38 ms | 400 KiB | 5 Q