3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original_multibyte_string = 'țată în HERE'; $a_non_multibyte_str_same_length = '123456789HERE'; // HERE is on 10th (9th element) character echo 'strpos finds HERE at: '.strpos($original_multibyte_string,'HERE').' '.'strpos finds HERE at: '.strpos($a_non_multibyte_str_same_length,'HERE'); // OUTPUTS: strpos finds HERE at: 12 mb_strpos finds HERE at: 9 echo "\n"; // now lets test the multibyte: echo 'mb_strpos finds HERE at: '.mb_strpos($original_multibyte_string,'HERE',0,'UTF-8').' '.'mb_strpos finds HERE at: '.mb_strpos($a_non_multibyte_str_same_length,'HERE',0,'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.0120.00918.18
8.3.50.0130.01122.11
8.3.40.0040.01118.75
8.3.30.0110.00418.71
8.3.20.0000.00720.31
8.3.10.0040.00421.78
8.3.00.0040.00419.05
8.2.180.0150.00718.54
8.2.170.0170.00318.88
8.2.160.0160.00322.96
8.2.150.0030.00524.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00419.66
8.2.110.0060.00322.05
8.2.100.0120.00018.16
8.2.90.0000.00719.05
8.2.80.0040.00417.97
8.2.70.0040.00417.50
8.2.60.0050.00217.93
8.2.50.0080.00018.07
8.2.40.0060.00317.98
8.2.30.0080.00018.02
8.2.20.0030.00517.74
8.2.10.0000.00718.12
8.2.00.0000.00817.72
8.1.280.0060.01525.92
8.1.270.0030.00618.75
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00322.03
8.1.230.0080.00419.17
8.1.220.0080.00017.78
8.1.210.0030.00618.77
8.1.200.0040.00717.13
8.1.190.0030.00717.10
8.1.180.0000.00718.10
8.1.170.0050.00318.51
8.1.160.0040.00422.05
8.1.150.0040.00418.76
8.1.140.0050.00319.19
8.1.130.0040.00417.86
8.1.120.0000.00717.36
8.1.110.0040.00417.45
8.1.100.0020.00517.45
8.1.90.0030.00317.48
8.1.80.0030.00517.43
8.1.70.0040.00417.46
8.1.60.0080.00017.63
8.1.50.0050.00217.62
8.1.40.0000.00817.46
8.1.30.0080.00017.66
8.1.20.0050.00317.65
8.1.10.0000.00717.40
8.1.00.0040.00417.48
8.0.300.0000.00818.77
8.0.290.0000.00716.75
8.0.280.0050.00318.48
8.0.270.0070.00017.28
8.0.260.0030.00318.49
8.0.250.0070.00016.97
8.0.240.0070.00016.91
8.0.230.0000.00717.05
8.0.220.0030.00316.99
8.0.210.0000.00716.94
8.0.200.0030.00317.02
8.0.190.0060.00317.00
8.0.180.0000.00716.97
8.0.170.0040.00416.95
8.0.160.0040.00316.93
8.0.150.0000.00716.88
8.0.140.0000.00716.93
8.0.130.0030.00313.42
8.0.120.0030.00616.89
8.0.110.0030.00516.98
8.0.100.0040.00416.96
8.0.90.0040.00416.86
8.0.80.0130.01016.88
8.0.70.0040.00416.91
8.0.60.0070.00016.82
8.0.50.0020.00516.91
8.0.30.0120.00617.19
8.0.20.0070.01117.40
8.0.10.0070.00016.86
8.0.00.0080.00916.62
7.4.330.0050.00015.03
7.4.320.0040.00416.62
7.4.300.0030.00316.50
7.4.290.0000.00716.62
7.4.280.0000.00716.40
7.4.270.0070.00016.36
7.4.260.0060.00016.52
7.4.250.0070.00016.46
7.4.240.0020.00516.56
7.4.230.0030.00316.54
7.4.220.0100.00716.48
7.4.210.0110.00516.46
7.4.200.0050.00216.57
7.4.160.0090.01216.38
7.4.150.0000.01917.40
7.4.140.0050.01617.86
7.4.130.0150.00516.53
7.4.120.0120.00616.55
7.4.110.0100.01016.57
7.4.100.0120.00616.37
7.4.90.0030.01416.62
7.4.80.0180.00319.39
7.4.70.0180.00016.52
7.4.60.0030.01316.48
7.4.50.0000.00416.47
7.4.40.0070.01316.53
7.4.30.0090.00916.31
7.4.00.0110.00415.12
7.3.330.0050.00213.09
7.3.320.0000.00512.96
7.3.310.0040.00416.34
7.3.300.0070.00016.06
7.3.290.0100.00416.23
7.3.280.0090.01016.24
7.3.270.0080.01217.40
7.3.260.0070.01016.25
7.3.250.0060.01116.31
7.3.240.0130.00316.23
7.3.230.0100.00716.39
7.3.210.0070.01016.38
7.3.200.0100.00716.20
7.3.190.0090.00616.55
7.3.180.0060.01416.27
7.3.170.0070.01416.27
7.3.160.0060.01216.52
7.2.330.0090.00916.69
7.2.320.0030.01416.30
7.2.310.0150.00316.30
7.2.300.0060.01016.73
7.2.290.0120.00916.56
7.2.00.0080.00819.54
7.1.100.0040.00718.27
7.1.70.0030.00617.07
7.1.60.0000.01017.35
7.1.50.0240.01234.70
7.1.00.0070.07322.51
7.0.200.0060.00916.74
7.0.140.0070.03021.95
7.0.60.0070.08320.04
7.0.50.0100.08017.73
7.0.40.0170.06720.12
7.0.30.0270.03720.18
7.0.20.0330.06020.33
7.0.10.0070.05320.12
7.0.00.0100.08720.17
5.6.280.0030.07321.02
5.6.210.0100.05320.46
5.6.200.0070.08318.22
5.6.190.0130.08320.56
5.6.180.3900.03720.64
5.6.170.0230.07320.33
5.6.160.0000.04720.50
5.6.150.0170.07018.15
5.6.140.0030.08718.20
5.6.130.0130.04018.20
5.6.120.0100.08320.94
5.6.110.0100.08321.13
5.6.100.0170.07320.95
5.6.90.0100.07321.12
5.6.80.0030.07320.35
5.6.70.3970.04020.41
5.5.350.0100.08720.32
5.5.340.0070.07718.01
5.5.330.0030.05720.38
5.5.320.3070.04320.31
5.5.310.0300.07720.31
5.5.300.0000.04317.98
5.5.290.0070.05717.98
5.5.280.0070.08720.87
5.5.270.0170.07720.86
5.5.260.0030.08720.75
5.5.250.0100.07720.57
5.5.240.0270.07020.07
5.4.450.0500.05019.48
5.4.440.0570.05719.10
5.4.430.0100.06319.30
5.4.420.0170.05019.31
5.4.410.0070.06019.39
5.4.400.0100.05319.16
5.4.390.0130.06318.49
5.4.380.0100.06318.71
5.4.370.0130.05318.64
5.4.360.0200.04718.66
5.4.350.0200.05018.43
5.4.340.0170.05318.50
5.4.320.0070.06018.48
5.4.310.0170.06018.71
5.4.300.0200.05318.76
5.4.290.0170.05018.63
5.4.280.0170.06018.43
5.4.270.0200.05018.42
5.4.260.0100.06318.48
5.4.250.0100.06018.71
5.4.240.0270.05318.66
5.4.230.0100.06318.73
5.4.220.0170.05718.54
5.4.210.0170.05018.45
5.4.200.0170.05016.64
5.4.190.0330.03718.47
5.4.180.0300.04018.66
5.4.170.0130.05718.47
5.4.160.0200.04718.41
5.4.150.0230.04318.52
5.4.140.0130.05316.33
5.4.130.0270.04716.23
5.4.120.0230.04316.09
5.4.110.0100.05316.22
5.4.100.0070.05716.15
5.4.90.0230.05016.35
5.4.80.0200.04716.11
5.4.70.0170.05316.01
5.4.60.0130.06316.20
5.4.50.0100.05716.27
5.4.40.0170.05016.03
5.4.30.0230.04716.22
5.4.20.0170.05316.22
5.4.10.0230.05316.09
5.4.00.0170.06715.54
5.3.290.0300.06014.59
5.3.280.0170.05314.48
5.3.270.0170.05314.58
5.3.260.0170.05314.57
5.3.250.0230.04314.58
5.3.240.0100.06014.70
5.3.230.0170.05014.56
5.3.220.0100.06314.65
5.3.210.0200.05714.52
5.3.200.0300.04714.55
5.3.190.0130.05314.51
5.3.180.0070.05714.59
5.3.170.0170.05014.54
5.3.160.0130.05014.55
5.3.150.0100.05714.55
5.3.140.0100.05714.48
5.3.130.0100.05714.47
5.3.120.0230.04714.58
5.3.110.0130.06014.64
5.3.100.0200.04714.03
5.3.90.0200.04314.07
5.3.80.0270.04014.05
5.3.70.0170.04714.11
5.3.60.0130.05013.95
5.3.50.0170.04713.89
5.3.40.0200.05013.93
5.3.30.0170.04713.98
5.3.20.0100.05713.58
5.3.10.0130.05013.64
5.3.00.0070.05713.56
5.2.170.0100.04311.18
5.2.160.0070.04711.19
5.2.150.0100.05011.11
5.2.140.0130.03711.14
5.2.130.0130.04311.08
5.2.120.0130.03711.23
5.2.110.0100.05311.08
5.2.100.0070.04311.16
5.2.90.0170.04011.14
5.2.80.0070.04711.08
5.2.70.0200.04011.13
5.2.60.0100.04310.99
5.2.50.0130.04011.15
5.2.40.0100.04310.97
5.2.30.0230.03010.90
5.2.20.0000.05311.07
5.2.10.0130.03710.93
5.2.00.0170.03710.91
5.1.60.0100.03310.06
5.1.50.0170.03010.02
5.1.40.0100.0339.99
5.1.30.0130.03710.34
5.1.20.0100.04010.33
5.1.10.0130.03710.04
5.1.00.0070.04010.15
5.0.50.0030.0378.61
5.0.40.0030.0338.38
5.0.30.0130.0408.29
5.0.20.0100.0238.19
5.0.10.0000.0338.35
5.0.00.0070.0438.22
4.4.90.0100.0176.92
4.4.80.0070.0206.92
4.4.70.0030.0276.92
4.4.60.0130.0136.92
4.4.50.0070.0206.92
4.4.40.0030.0376.92
4.4.30.0030.0236.92
4.4.20.0030.0276.92
4.4.10.0030.0276.92
4.4.00.0030.0376.92
4.3.110.0030.0236.92
4.3.100.0030.0236.92
4.3.90.0100.0176.93
4.3.80.0030.0376.93
4.3.70.0030.0236.93
4.3.60.0000.0276.93
4.3.50.0070.0236.93
4.3.40.0100.0336.93
4.3.30.0030.0236.93
4.3.20.0070.0206.93
4.3.10.0030.0236.93
4.3.00.0100.0208.78

preferences:
47.78 ms | 401 KiB | 5 Q