3v4l.org

run code in 300+ PHP versions simultaneously
<?php // n-dashes are encoded as byte sequence \xe2\x80\x93 in UTF-8 $str = 'foo–bar–baz'; // take substring of 4 bytes length starting with the 4th byte var_dump(mb_strcut($str, 4, 4, 'UTF-8')); // take substring of 4 code points length starting with the 4th code point var_dump(mb_substr($str, 4, 4, 'UTF-8'));

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.0170.00316.38
8.3.50.0110.00822.07
8.3.40.0110.00418.63
8.3.30.0040.01118.82
8.3.20.0070.00020.35
8.3.10.0050.00323.71
8.3.00.0000.00719.21
8.2.180.0120.00325.92
8.2.170.0090.00618.96
8.2.160.0070.00719.23
8.2.150.0000.00724.18
8.2.140.0050.00224.66
8.2.130.0050.00226.16
8.2.120.0040.00419.83
8.2.110.0060.00321.08
8.2.100.0110.00017.66
8.2.90.0040.00417.84
8.2.80.0030.00619.89
8.2.70.0050.00317.50
8.2.60.0040.00417.50
8.2.50.0030.00517.63
8.2.40.0040.00419.65
8.2.30.0050.00219.46
8.2.20.0080.00017.62
8.2.10.0040.00417.92
8.2.00.0050.00218.04
8.1.280.0080.00825.92
8.1.270.0040.00420.23
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00020.74
8.1.230.0040.00822.20
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0090.00416.75
8.1.180.0060.00318.10
8.1.170.0050.00317.62
8.1.160.0050.00518.70
8.1.150.0000.00718.45
8.1.140.0000.00817.40
8.1.130.0000.00717.73
8.1.120.0050.00317.31
8.1.110.0050.00217.36
8.1.100.0030.00317.38
8.1.90.0050.00317.29
8.1.80.0070.00017.45
8.1.70.0000.00817.29
8.1.60.0050.00317.57
8.1.50.0050.00317.52
8.1.40.0110.00017.51
8.1.30.0030.00617.50
8.1.20.0050.00217.56
8.1.10.0030.00617.46
8.1.00.0040.00417.49
8.0.300.0030.00320.02
8.0.290.0000.00916.75
8.0.280.0030.00318.44
8.0.270.0000.00817.13
8.0.260.0000.00617.26
8.0.250.0000.00717.00
8.0.240.0000.00716.98
8.0.230.0040.00416.97
8.0.220.0040.00416.93
8.0.210.0070.00016.95
8.0.200.0030.00616.93
8.0.190.0000.00816.85
8.0.180.0050.00216.80
8.0.170.0000.00816.86
8.0.160.0030.00316.99
8.0.150.0000.00716.80
8.0.140.0030.00316.87
8.0.130.0040.00413.28
8.0.120.0000.00916.84
8.0.110.0000.00816.86
8.0.100.0040.00416.81
8.0.90.0000.00716.91
8.0.80.0110.00516.86
8.0.70.0040.00416.84
8.0.60.0050.00216.80
8.0.50.0040.00416.95
8.0.30.0070.01016.96
8.0.20.0070.01217.40
8.0.10.0040.00416.86
8.0.00.0090.01116.76
7.4.330.0030.00315.03
7.4.320.0030.00316.46
7.4.300.0000.00716.50
7.4.290.0000.00716.57
7.4.280.0000.00816.52
7.4.270.0000.00716.59
7.4.260.0060.00316.41
7.4.250.0050.00216.42
7.4.240.0040.00416.58
7.4.230.0070.00016.20
7.4.220.0090.00916.31
7.4.210.0070.01416.36
7.4.200.0070.00016.61
7.4.160.0030.01316.37
7.4.150.0100.00717.40
7.4.140.0120.00817.86
7.4.130.0110.00716.53
7.4.120.0080.00916.35
7.4.110.0080.00816.60
7.4.100.0000.01716.31
7.4.90.0080.00816.41
7.4.80.0100.00919.39
7.4.70.0090.00916.37
7.4.60.0070.01016.49
7.4.50.0030.00516.22
7.4.40.0120.00916.25
7.4.30.0060.01016.56
7.4.00.0070.00714.78
7.3.330.0030.00312.88
7.3.320.0090.00312.89
7.3.310.0040.00415.97
7.3.300.0030.00316.18
7.3.290.0090.00916.13
7.3.280.0100.00716.10
7.3.270.0060.01017.40
7.3.260.0090.01116.15
7.3.250.0090.00916.12
7.3.240.0070.01016.48
7.3.230.0120.00716.39
7.3.210.0080.00816.10
7.3.200.0120.01019.39
7.3.190.0090.00916.08
7.3.180.0090.01216.11
7.3.170.0060.01016.48
7.3.160.0080.00716.13
7.3.00.0090.00316.44
7.2.330.0130.01016.41
7.2.320.0060.01216.46
7.2.310.0100.00616.42
7.2.300.0130.00316.23
7.2.290.0120.00616.59
7.2.130.0040.00716.51
7.2.120.0040.00816.76
7.2.110.0060.00316.80
7.2.100.0090.00616.73
7.2.90.0090.00316.77
7.2.80.0000.01116.51
7.2.70.0070.00716.68
7.2.60.0090.00616.65
7.2.50.0030.01216.92
7.2.40.0030.00616.64
7.2.30.0100.00616.82
7.2.20.0030.01116.55
7.2.10.0060.00617.01
7.2.00.0090.00616.57
7.1.250.0030.00615.62
7.1.240.0030.00915.62
7.1.230.0030.00615.77
7.1.220.0080.00315.68
7.1.210.0070.01115.56
7.1.200.0040.00915.47
7.1.190.0030.00715.66
7.1.180.0080.00315.80
7.1.170.0090.00915.76
7.1.160.0080.00415.73
7.1.150.0060.00815.64
7.1.140.0090.00615.41
7.1.130.0030.01415.60
7.1.120.0090.00015.70
7.1.110.0040.01115.66
7.1.100.0070.00715.63
7.1.90.0070.00415.79
7.1.80.0000.00915.51
7.1.70.0030.00916.20
7.1.60.0080.01017.73
7.1.50.0090.01116.34
7.1.40.0030.00715.48
7.1.30.0100.00315.71
7.1.20.0030.00615.69
7.1.10.0090.00415.73
7.1.00.0030.04318.99
7.0.330.0140.00315.25
7.0.320.0040.00815.19
7.0.310.0000.01015.13
7.0.300.0080.00415.11
7.0.290.0030.01014.94
7.0.280.0040.01115.25
7.0.270.0070.01015.23
7.0.260.0090.00315.21
7.0.250.0110.00415.20
7.0.240.0070.01015.39
7.0.230.0070.00715.43
7.0.220.0040.00915.26
7.0.210.0000.00915.15
7.0.200.0080.00515.80
7.0.190.0060.00615.08
7.0.180.0070.00315.16
7.0.170.0070.00715.12
7.0.160.0040.01115.26
7.0.150.0100.00315.31
7.0.140.0080.00414.95
7.0.130.0060.00615.39
7.0.120.0060.00315.27
7.0.110.0040.00415.36
7.0.100.0000.01215.13
7.0.90.0030.00715.16
7.0.80.0000.01415.36
7.0.70.0030.01015.15
7.0.60.0070.02717.67
7.0.50.0110.01816.43
7.0.40.0060.03216.78
7.0.30.0200.04216.55
7.0.20.0180.02316.57
7.0.10.0120.01916.81
7.0.00.0120.04016.56
5.6.380.0100.00314.09
5.6.370.0030.00514.13
5.6.360.0060.00714.39
5.6.350.0030.00714.30
5.6.340.0000.00814.05
5.6.330.0030.00914.43
5.6.320.0030.00714.23
5.6.310.0070.00714.14
5.6.300.0030.00913.76
5.6.290.0060.00914.18
5.6.280.0030.04117.56
5.6.270.0100.00014.07
5.6.260.0040.00814.09
5.6.250.0030.00814.22
5.6.240.0000.01414.20
5.6.230.0030.01014.05
5.6.220.0040.01113.88
5.6.210.0050.02417.20
5.6.200.0100.03915.99
5.6.190.0050.02317.13
5.6.180.0130.02717.22
5.6.170.0170.02617.20
5.6.160.0020.02717.10
5.6.150.0020.04516.07
5.6.140.0060.04316.18
5.6.130.0080.03816.09
5.6.120.0060.02817.52
5.6.110.0100.02917.46
5.6.100.0050.03417.43
5.6.90.0070.04817.60
5.6.80.0080.04017.01
5.6.70.1350.01817.28
5.6.60.0000.01314.05
5.6.50.0030.01013.85
5.6.40.0070.00413.99
5.6.30.0000.00914.19
5.6.20.0030.00813.94
5.6.10.0090.00613.99
5.6.00.0070.00314.07
5.5.380.0030.00311.18
5.5.370.0040.00311.18
5.5.360.0030.00611.18
5.5.350.0130.04315.80
5.5.340.0010.03614.53
5.5.330.0070.04015.80
5.5.320.0170.04215.69
5.5.310.0080.02815.72
5.5.300.0050.04014.61
5.5.290.0070.03514.56
5.5.280.0070.03016.02
5.5.270.0100.04015.96
5.5.260.0070.04215.99
5.5.250.0050.03815.97
5.5.240.1880.02015.72
5.5.230.0000.00811.18
5.5.220.0050.00311.18
5.5.210.0030.00611.18
5.5.200.0060.00311.18
5.5.190.0030.00611.18
5.5.180.0050.00511.18
5.5.170.0050.00311.18
5.5.160.0040.00811.18
5.5.150.0060.00311.18
5.5.140.0000.00711.18
5.5.130.0040.00411.18
5.5.120.0030.00611.18
5.5.110.0000.01011.18
5.5.100.0050.00511.18
5.5.90.0030.00611.18
5.5.80.0000.01111.18
5.5.70.0060.00311.18
5.5.60.0110.00011.18
5.5.50.0100.00011.18
5.5.40.0030.00911.18
5.5.30.0080.00311.18
5.5.20.0030.00311.18
5.5.10.0060.00611.18
5.5.00.0030.00311.18
5.4.450.0150.02515.19
5.4.440.0310.02815.36
5.4.430.0460.02415.19
5.4.420.0050.03415.30
5.4.410.0080.03014.92
5.4.400.0080.02514.92
5.4.390.0070.02814.83
5.4.380.0030.03314.88
5.4.370.0050.03314.85
5.4.360.0100.02814.93
5.4.350.0050.03214.95
5.4.340.0070.02614.89
5.4.330.0000.00811.18
5.4.320.0030.03314.85
5.4.310.0100.03314.91
5.4.300.0070.03014.92
5.4.290.0050.02914.89
5.4.280.0060.03014.82
5.4.270.0080.02814.91
5.4.260.0030.03214.91
5.4.250.0100.02614.93
5.4.240.0060.03014.90
5.4.230.0050.02814.86
5.4.220.0110.03414.83
5.4.210.0070.02714.85
5.4.200.0050.02713.83
5.4.190.0090.02614.86
5.4.180.0080.02714.83
5.4.170.0100.03114.81
5.4.160.0080.02514.84
5.4.150.0080.02814.85
5.4.140.0120.02213.69
5.4.130.0030.03013.65
5.4.120.0070.02513.65
5.4.110.0100.02213.68
5.4.100.0040.02813.62
5.4.90.0050.02713.67
5.4.80.0050.02713.61
5.4.70.0050.02813.69
5.4.60.0060.02813.69
5.4.50.0020.02813.70
5.4.40.0020.03013.75
5.4.30.0050.02713.65
5.4.20.0120.02213.72
5.4.10.0110.02513.59
5.4.00.0030.03113.44
5.3.290.0030.03312.91
5.3.280.0050.03012.89
5.3.270.0020.03112.94
5.3.260.0030.03012.94
5.3.250.0100.02512.83
5.3.240.0080.02512.88
5.3.230.0020.03312.84
5.3.220.0030.03012.84
5.3.210.0120.04812.84
5.3.200.0100.02612.88
5.3.190.0080.03612.90
5.3.180.0120.02312.82
5.3.170.0100.03112.84
5.3.160.0030.03112.86
5.3.150.0050.03012.84
5.3.140.0090.02512.85
5.3.130.0070.02912.87
5.3.120.0100.02512.82
5.3.110.0060.02912.85
5.3.100.0050.02712.58
5.3.90.0020.03412.59
5.3.80.0050.02812.56
5.3.70.0050.02912.61
5.3.60.0110.02012.63
5.3.50.0030.03012.55
5.3.40.0020.03212.53
5.3.30.0080.02812.53
5.3.20.0140.02012.43
5.3.10.0070.02512.36
5.3.00.0050.02712.39
5.2.170.0090.02511.15
5.2.160.0040.02211.15
5.2.150.0090.02011.12
5.2.140.0080.02011.19
5.2.130.0060.02311.21
5.2.120.0030.02311.11
5.2.110.0030.02111.15
5.2.100.0060.01811.12
5.2.90.0020.02811.14
5.2.80.0070.02211.10
5.2.70.0090.01711.12
5.2.60.0050.02311.13
5.2.50.0030.02511.12
5.2.40.0030.02211.09
5.2.30.0070.02011.07
5.2.20.0050.02611.03
5.2.10.0000.02511.06
5.2.00.0030.02510.94
5.1.60.0050.01710.60
5.1.50.0020.02310.59
5.1.40.0060.01810.64
5.1.30.0100.01510.74
5.1.20.0070.02010.77
5.1.10.0060.01910.64
5.1.00.0030.02110.61
5.0.50.0050.0159.89
5.0.40.0000.0189.80
5.0.30.0030.0249.73
5.0.20.0020.0169.69
5.0.10.0000.0189.69
5.0.00.0030.0239.68
4.4.90.0050.0108.55
4.4.80.0030.0138.54
4.4.70.0050.0128.53
4.4.60.0050.0108.53
4.4.50.0050.0158.55
4.4.40.0020.0208.52
4.4.30.0030.0128.53
4.4.20.0020.0138.56
4.4.10.0000.0158.54
4.4.00.0020.0208.56
4.3.110.0020.0128.49
4.3.100.0090.0078.52
4.3.90.0020.0178.51
4.3.80.0050.0178.48
4.3.70.0030.0118.48
4.3.60.0020.0128.53
4.3.50.0010.0138.47
4.3.40.0000.0218.45
4.3.30.0010.0137.88
4.3.20.0010.0147.87
4.3.10.0000.0157.86
4.3.00.0050.00613.62

preferences:
37.93 ms | 401 KiB | 5 Q