3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$utf8string = '测试杂志hello123等々'; $utf8string = '测试杂志'; $utf8string = mb_substr('测试杂志', 0, 20, 'UTF-8'); //$var = 'hello123'; //$pos = strpos($utf8string, $var); //if ($pos!==false) { echo substr($utf8string, 0, 10); //}

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.0070.01116.50
8.3.50.0140.00521.98
8.3.40.0110.00318.67
8.3.30.0070.00718.79
8.3.20.0040.00420.21
8.3.10.0080.00021.77
8.3.00.0040.00420.94
8.2.180.0040.01116.50
8.2.170.0070.00722.96
8.2.160.0100.00322.09
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00419.54
8.2.110.0100.00720.36
8.2.100.0080.00417.96
8.2.90.0000.00819.17
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0080.00417.91
8.2.50.0000.00818.07
8.2.40.0050.00319.82
8.2.30.0000.00718.05
8.2.20.0030.00517.73
8.2.10.0000.00818.10
8.2.00.0000.00717.72
8.1.280.0140.00425.92
8.1.270.0060.00319.06
8.1.260.0030.00626.35
8.1.250.0070.00028.09
8.1.240.0060.00323.85
8.1.230.0050.00519.01
8.1.220.0080.00017.76
8.1.210.0080.00018.77
8.1.200.0060.00317.22
8.1.190.0050.00317.23
8.1.180.0040.00418.10
8.1.170.0060.00318.65
8.1.160.0030.00521.98
8.1.150.0000.00718.72
8.1.140.0040.00417.28
8.1.130.0050.00317.80
8.1.120.0060.00317.28
8.1.110.0030.00517.44
8.1.100.0050.00217.23
8.1.90.0050.00217.30
8.1.80.0000.00817.40
8.1.70.0030.00317.36
8.1.60.0080.00017.39
8.1.50.0000.00817.43
8.1.40.0040.00417.39
8.1.30.0040.00417.64
8.1.20.0000.00917.59
8.1.10.0030.00617.38
8.1.00.0040.00417.48
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0000.00718.56
8.0.270.0030.00317.23
8.0.260.0030.00317.14
8.0.250.0030.00317.05
8.0.240.0000.00917.02
8.0.230.0000.00716.99
8.0.220.0000.00716.88
8.0.210.0000.00716.85
8.0.200.0000.00716.93
8.0.190.0000.00716.88
8.0.180.0030.00316.78
8.0.170.0040.00416.95
8.0.160.0040.00416.87
8.0.150.0080.00016.78
8.0.140.0030.00616.73
8.0.130.0080.00013.32
8.0.120.0030.00516.85
8.0.110.0000.00816.89
8.0.100.0040.00416.77
8.0.90.0000.00716.86
8.0.80.0090.00916.78
8.0.70.0070.00016.90
8.0.60.0000.00716.89
8.0.50.0040.00416.78
8.0.30.0080.01116.96
8.0.20.0110.00617.40
8.0.10.0000.00716.80
8.0.00.0090.00816.72
7.4.330.0030.00315.09
7.4.320.0000.00716.55
7.4.300.0040.00416.53
7.4.290.0040.00416.40
7.4.280.0040.00416.43
7.4.270.0030.00316.38
7.4.260.0030.00316.30
7.4.250.0040.00416.38
7.4.240.0060.00116.49
7.4.230.0030.00316.42
7.4.220.0140.00416.47
7.4.210.0100.00816.42
7.4.200.0030.00316.52
7.4.160.0030.01216.46
7.4.150.0130.00317.40
7.4.140.0080.01017.86
7.4.130.0060.01316.34
7.4.120.0060.01016.48
7.4.110.0070.01016.33
7.4.100.0040.01216.51
7.4.90.0080.00816.47
7.4.80.0090.00916.48
7.4.70.0130.00316.34
7.4.60.0060.01116.44
7.4.50.0050.00316.43
7.4.40.0160.00616.45
7.4.30.0070.01016.39
7.4.00.0000.01714.84
7.3.330.0000.00512.95
7.3.320.0080.00413.01
7.3.310.0000.00715.95
7.3.300.0030.00316.16
7.3.290.0070.00016.05
7.3.280.0130.00716.12
7.3.270.0120.00617.40
7.3.260.0130.00316.52
7.3.250.0110.00616.18
7.3.240.0140.00716.37
7.3.230.0080.01116.39
7.3.210.0040.01216.54
7.3.200.0060.01219.39
7.3.190.0060.01016.43
7.3.180.0090.00616.21
7.3.170.0060.01216.33
7.3.160.0070.01016.12
7.2.330.0130.00316.57
7.2.320.0100.00716.57
7.2.310.0040.01216.45
7.2.300.0150.00016.45
7.2.290.0140.00316.63
7.1.200.0050.00215.72
7.1.100.0060.00918.22
7.1.70.0070.00016.89
7.1.60.0070.01719.46
7.1.50.0000.02316.64
7.1.00.0170.06022.54
7.0.200.0750.00614.78
7.0.140.0070.07321.98
7.0.60.0100.07319.91
7.0.50.0070.06717.84
7.0.40.0130.05020.04
7.0.30.0270.07720.30
7.0.20.0330.04320.20
7.0.10.0200.07720.15
7.0.00.0030.05720.29
5.6.210.0070.08020.60
5.6.200.0030.08318.19
5.6.190.0070.04020.49
5.6.180.0370.07720.27
5.6.170.0330.07020.33
5.6.160.0130.07720.40
5.6.150.0170.04018.24
5.6.140.0130.07718.14
5.6.130.0100.04718.12
5.6.120.0030.06021.09
5.6.110.0030.04720.95
5.6.100.0030.04720.97
5.6.90.0100.03320.92
5.6.80.0130.06720.41
5.5.350.0230.04720.45
5.5.340.0030.08317.95
5.5.330.0170.06720.46
5.5.320.0030.06020.32
5.5.310.0230.04320.29
5.5.300.0130.06717.96
5.5.290.0070.08017.96
5.5.280.0200.06720.86
5.5.270.0070.04020.88
5.5.260.0100.08320.81
5.5.250.0030.04320.68
5.5.240.0130.07320.25
5.4.450.0430.04319.39
5.4.440.0900.04019.25
5.4.430.0830.03719.45
5.4.420.0430.03319.45
5.4.410.0570.03318.95
5.4.400.0670.03718.93
5.4.390.0400.03719.16
5.4.380.0670.05018.95
5.4.370.0870.04019.05
5.4.360.0800.04719.21
5.4.350.0530.04019.21
5.4.340.1030.03719.05
5.4.320.0900.03318.81
5.4.310.0530.04018.79
5.4.300.0300.04318.88
5.4.290.1130.03019.05
5.4.280.0700.04318.90
5.4.270.0500.03719.25
5.4.260.0400.04719.09
5.4.250.0900.04718.87
5.4.240.0630.04019.21
5.4.230.0500.04718.88
5.4.220.0300.04018.87
5.4.210.0400.04318.92
5.4.200.0700.04019.09
5.4.190.0430.08719.25
5.4.180.0770.03718.76
5.4.170.0230.03318.89
5.4.160.0530.03319.13
5.4.150.0370.04318.77
5.4.140.0400.04016.46
5.4.130.0500.04316.53
5.4.120.0830.03316.22
5.4.110.0930.03716.22
5.4.100.0170.04316.43
5.4.90.0270.04016.47
5.4.80.0730.04016.41
5.4.70.0600.03716.41
5.4.60.0570.04716.45
5.4.50.0570.04016.39
5.4.40.0600.03716.20
5.4.30.0630.03316.29
5.4.20.0300.05316.36
5.4.10.0500.03716.34
5.4.00.0430.03716.01
5.3.290.0800.04016.02
5.3.280.0630.03316.01
5.3.270.0730.03716.01
5.3.260.0830.03716.01
5.3.250.0270.05316.01
5.3.240.0570.02716.01
5.3.230.0330.03716.01
5.3.220.0730.03716.01
5.3.210.0500.03316.01
5.3.200.0630.04716.01
5.3.190.0470.03316.01
5.3.180.0730.03716.01
5.3.170.0800.02716.01
5.3.160.0300.03716.01
5.3.150.1000.04016.01
5.3.140.0500.04316.01
5.3.130.0570.04016.01
5.3.120.0270.04016.01
5.3.110.0770.03316.01
5.3.100.0300.04316.01
5.3.90.0300.03716.01
5.3.80.0900.04716.01
5.3.70.0600.02716.01
5.3.60.0470.03316.01
5.3.50.0730.03316.01
5.3.40.0870.03016.01
5.3.30.0700.04016.01
5.3.20.0330.03716.01
5.3.10.0700.03316.01
5.3.00.0400.02716.01
5.2.170.0900.02316.01
5.2.160.0730.02316.01
5.2.150.0600.02716.01
5.2.140.0530.03716.01
5.2.130.0330.03016.01
5.2.120.0370.03316.01
5.2.110.0230.02716.01
5.2.100.0370.02716.01
5.2.90.0500.03016.01
5.2.80.0500.03316.01
5.2.70.0730.02316.01
5.2.60.0600.03016.01
5.2.50.0500.04316.01
5.2.40.0530.03016.01
5.2.30.0600.02716.01
5.2.20.0600.03316.01
5.2.10.0400.03316.01
5.2.00.0430.03316.01
5.1.60.0530.02316.01
5.1.50.0270.02016.01
5.1.40.0470.03316.01
5.1.30.0630.02316.01
5.1.20.0330.03716.01
5.1.10.0400.02716.01
5.1.00.0400.02716.01
5.0.50.0200.02016.01
5.0.40.0230.01016.01
5.0.30.0130.02716.01
5.0.20.0270.02016.01
5.0.10.0030.02016.01
5.0.00.0070.03316.01
4.4.90.0170.02016.01
4.4.80.0170.01316.01
4.4.70.0130.01316.01
4.4.60.0000.01316.01
4.4.50.0230.01716.01
4.4.40.0130.03716.01
4.4.30.0230.01316.01
4.4.20.0100.01316.01
4.4.10.0230.01716.01
4.4.00.0230.02016.01
4.3.110.0230.02016.01
4.3.100.0030.02016.01
4.3.90.0270.01316.01
4.3.80.0200.02716.01
4.3.70.0030.02016.02
4.3.60.0300.01716.02
4.3.50.0200.02016.02
4.3.40.0200.02716.01
4.3.30.0170.02016.01
4.3.20.0130.01316.01
4.3.10.0000.03016.01
4.3.00.0030.01716.01

preferences:
45.25 ms | 401 KiB | 5 Q