3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'a b'; $c1 = substr($string, 1, 1); $c2 = mb_substr($string, 1, 1); $c3 = iconv_substr($string, 1, 1); var_dump($c1, $c2, $c3);

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.70.0130.00618.30
8.3.60.0150.00016.63
8.3.50.0110.00416.18
8.3.40.0160.00618.54
8.3.30.0070.00718.69
8.3.20.0070.00021.85
8.3.10.0000.00821.73
8.3.00.0050.00321.90
8.2.190.0170.00716.58
8.2.180.0070.00718.01
8.2.170.0170.00322.96
8.2.160.0070.00721.11
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00019.45
8.2.120.0070.00026.35
8.2.110.0040.00420.57
8.2.100.0130.00317.78
8.2.90.0080.00017.63
8.2.80.0040.00418.54
8.2.70.0000.00817.50
8.2.60.0030.00517.50
8.2.50.0040.00417.55
8.2.40.0000.00720.42
8.2.30.0000.00819.25
8.2.20.0000.00917.98
8.2.10.0050.00217.98
8.2.00.0040.00417.93
8.1.280.0180.00325.92
8.1.270.0070.00023.91
8.1.260.0030.00526.35
8.1.250.0080.00028.09
8.1.240.0030.00620.76
8.1.230.0090.00320.89
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0000.00817.11
8.1.190.0090.00916.88
8.1.180.0130.00018.10
8.1.170.0080.00018.74
8.1.160.0040.00418.70
8.1.150.0040.00419.03
8.1.140.0070.00017.63
8.1.130.0040.00419.01
8.1.120.0040.00417.27
8.1.110.0070.00017.39
8.1.100.0070.00417.29
8.1.90.0000.00817.29
8.1.80.0000.00717.41
8.1.70.0030.00317.39
8.1.60.0080.00017.47
8.1.50.0110.00317.47
8.1.40.0040.00417.55
8.1.30.0030.00617.54
8.1.20.0080.00417.60
8.1.10.0040.00717.48
8.1.00.0030.00617.49
8.0.300.0040.00418.77
8.0.290.0000.00816.63
8.0.280.0000.00718.35
8.0.270.0000.00717.16
8.0.260.0000.00719.05
8.0.250.0080.00017.05
8.0.240.0020.00517.00
8.0.230.0040.00416.89
8.0.220.0070.00016.88
8.0.210.0070.00016.78
8.0.200.0030.00316.87
8.0.190.0000.00916.84
8.0.180.0000.00816.77
8.0.170.0060.00316.76
8.0.160.0000.00716.99
8.0.150.0040.00416.74
8.0.140.0040.00416.90
8.0.130.0060.00013.31
8.0.120.0030.00617.02
8.0.110.0030.00616.91
8.0.100.0030.00616.93
8.0.90.0060.00316.92
8.0.80.0030.01916.95
8.0.70.0060.00316.91
8.0.60.0030.00616.89
8.0.50.0000.00916.90
8.0.30.0100.01417.08
8.0.20.0090.01217.40
8.0.10.0000.00916.92
8.0.00.0070.01216.72
7.4.330.0000.00615.55
7.4.320.0030.00316.55
7.4.300.0000.00616.57
7.4.290.0030.00316.53
7.4.280.0060.00316.52
7.4.270.0070.00016.55
7.4.260.0080.00016.35
7.4.250.0050.00516.65
7.4.240.0030.00616.69
7.4.230.0050.00516.76
7.4.220.0030.00616.56
7.4.210.0060.01416.56
7.4.200.0030.00616.76
7.4.160.0100.01116.66
7.4.140.0120.01017.86
7.4.130.0110.00816.63
7.4.120.0090.01416.48
7.4.110.0160.00316.63
7.4.100.0120.00816.60
7.4.90.0130.01016.48
7.4.80.0130.01019.39
7.4.70.0100.01416.56
7.4.60.0080.01116.51
7.4.50.0060.00916.80
7.4.40.0180.00416.46
7.4.00.0040.01115.07
7.3.330.0030.00313.19
7.3.320.0050.00013.08
7.3.310.0060.00316.14
7.3.300.0080.00016.19
7.3.290.0040.00416.27
7.3.280.0140.00816.28
7.3.260.0180.00516.37
7.3.240.0040.01516.32
7.3.230.0080.01616.33
7.3.210.0030.01616.55
7.3.200.0100.01016.30
7.3.190.0040.02016.59
7.3.180.0030.01516.41
7.3.170.0130.00616.57
7.3.160.0160.00616.32
7.3.10.0050.00916.47
7.3.00.0000.01416.47
7.2.330.0120.00816.56
7.2.320.0120.01116.58
7.2.310.0040.01516.79
7.2.300.0110.01116.80
7.2.290.0060.01216.54
7.2.130.0020.01316.80
7.2.120.0020.01416.88
7.2.110.0090.00616.70
7.2.100.0060.00816.79
7.2.90.0080.00617.08
7.2.80.0030.01216.91
7.2.70.0040.00916.87
7.2.60.0050.01116.95
7.2.50.0040.01316.75
7.2.40.0040.01217.85
7.2.30.0130.00517.75
7.2.20.0060.01017.70
7.2.10.0060.01117.75
7.2.00.0040.01217.86
7.1.250.0070.00815.71
7.1.200.0090.00915.82
7.1.160.0070.01018.59
7.1.150.0070.01018.61
7.1.140.0090.01019.01
7.1.130.0070.01218.54
7.1.120.0090.01218.90
7.1.110.0080.00918.29
7.1.100.0090.00918.00
7.1.90.0080.00918.15
7.1.80.0100.00818.36
7.1.70.0040.01217.10
7.1.60.0210.01735.28
7.1.50.0220.01735.05
7.1.40.0230.01534.61
7.1.30.0300.01934.81
7.1.20.0230.01734.92
7.1.10.0060.01416.86
7.1.00.0100.00816.71

preferences:
33.25 ms | 404 KiB | 6 Q