3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "\xb7\x51 &\xb4\xa6\xb6\x7d"; $pos1 = mb_strpos($str,'&',0,'utf-8'); var_dump($pos1); $pos2 = mb_strpos($str,'&',$pos1 + 1,'utf-8'); var_dump($pos2);

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.1.130.0030.00317.63
8.1.120.0070.00017.37
8.1.110.0000.00717.40
8.1.100.0000.00717.39
8.1.90.0070.00317.31
8.1.80.0050.00317.41
8.1.70.0040.00417.24
8.1.60.0090.00017.50
8.1.50.0030.00517.42
8.1.40.0110.00017.46
8.1.30.0030.00617.65
8.1.20.0050.00317.67
8.1.10.0050.00217.41
8.1.00.0050.00217.42
8.0.260.0030.00317.16
8.0.250.0000.00716.85
8.0.240.0060.00316.94
8.0.230.0060.00316.94
8.0.220.0030.00316.89
8.0.210.0030.00316.92
8.0.200.0000.00716.96
8.0.190.0000.00816.94
8.0.180.0000.00716.79
8.0.170.0020.00516.80
8.0.160.0030.00316.90
8.0.150.0030.00516.73
8.0.140.0030.00716.86
8.0.130.0000.00713.29
8.0.120.0040.00416.71
8.0.110.0070.00016.86
8.0.100.0040.00416.80
8.0.90.0030.00516.93
8.0.80.0100.00116.88
8.0.70.0020.00516.86
8.0.60.0050.00316.88
8.0.50.0050.00316.94
8.0.30.0060.00816.93
8.0.20.0080.00817.28
8.0.10.0040.00416.77
8.0.00.0070.00917.12
7.4.330.0000.00515.08
7.4.320.0000.00716.33
7.4.300.0000.00616.48
7.4.290.0030.00316.50
7.4.280.0060.00316.50
7.4.270.0000.00716.55
7.4.260.0000.00716.59
7.4.250.0030.00316.54
7.4.240.0060.00216.43
7.4.230.0040.00416.51
7.4.220.0080.00716.52
7.4.210.0060.00916.51
7.4.200.0030.00416.50
7.4.190.0030.00316.59
7.4.180.0030.00516.40
7.4.160.0070.00616.43
7.4.150.0040.00916.84
7.4.140.0100.00717.50
7.4.130.0080.00816.70
7.4.120.0060.00916.73
7.4.110.0070.00716.89
7.4.100.0080.00816.92
7.4.90.0100.00416.77
7.4.80.0080.00817.90
7.4.70.0110.00316.95
7.4.60.0050.00916.83
7.4.50.0070.00716.74
7.4.40.0070.00716.83
7.4.30.0070.00716.81
7.4.20.0050.00817.13
7.4.10.0060.00617.09
7.4.00.0110.00215.73
7.3.330.0030.00213.06
7.3.320.0060.00013.09
7.3.310.0030.00316.26
7.3.300.0050.00216.18
7.3.290.0040.00316.21
7.3.280.0090.00916.18
7.3.270.0050.00616.84
7.3.260.0070.00816.96
7.3.250.0090.00816.63
7.3.240.0090.00716.66
7.3.230.0090.00716.79
7.3.220.0060.00516.95
7.3.210.0060.01016.79
7.3.200.0090.00616.76
7.3.190.0070.00716.79
7.3.180.0090.00716.62
7.3.170.0060.00716.70
7.3.160.0070.00716.67
7.3.150.0090.00317.03
7.3.140.0050.00817.02
7.3.130.0040.00717.01
7.3.120.0040.01115.80
7.3.110.0070.00815.77
7.3.100.0060.00915.90
7.3.90.0090.00515.89
7.3.80.0070.01015.69
7.3.70.0060.00615.82
7.3.60.0060.00615.81
7.3.50.0030.01015.71
7.3.40.0090.00515.87
7.3.30.0060.00615.80
7.3.20.0080.00617.20
7.3.10.0090.00417.20
7.3.00.0080.00717.32
7.2.340.0130.01016.99
7.2.330.0130.00816.90
7.2.320.0160.00816.85
7.2.310.0120.00816.83
7.2.300.0100.00916.88
7.2.290.0120.00916.87
7.2.280.0130.00917.11
7.2.270.0160.00617.04
7.2.260.0150.00817.06
7.2.250.0070.01216.09
7.2.240.0070.01116.08
7.2.230.0110.00815.92
7.2.220.0130.00616.01
7.2.210.0110.01016.00
7.2.200.0130.00416.10
7.2.190.0090.00715.96
7.2.180.0100.01015.94
7.2.170.0060.00915.91
7.2.160.0130.00616.02
7.2.150.0080.01017.48
7.2.140.0090.00817.46
7.2.130.0130.00917.52
7.2.120.0110.00817.50
7.2.110.0120.00917.51
7.2.100.0140.00517.47
7.2.90.0120.00717.48
7.2.80.0100.00717.54
7.2.70.0130.00617.39
7.2.60.0130.00917.20
7.2.50.0170.01017.54
7.2.40.0160.00817.47
7.2.30.0100.00917.46
7.2.20.0110.00717.35
7.2.10.0120.00917.53
7.2.00.0100.00917.85
7.1.330.0110.00916.68
7.1.320.0090.00716.66
7.1.310.0090.00716.52
7.1.300.0100.00716.65
7.1.290.0140.00716.59
7.1.280.0080.00916.63
7.1.270.0100.00816.66
7.1.260.0170.00216.64
7.1.250.0090.00816.57
7.1.240.0090.00916.61
7.1.230.0100.00616.51
7.1.220.0070.01016.66
7.1.210.0080.00716.53
7.1.200.0070.00916.45
7.1.190.0090.00916.66
7.1.180.0240.00816.57
7.1.170.0190.00416.70
7.1.160.0080.00716.70
7.1.150.0110.00616.63
7.1.140.0100.01016.58
7.1.130.0100.00816.56
7.1.120.0090.00716.68
7.1.110.0160.00516.68
7.1.100.0100.00516.58
7.1.90.0100.00716.64
7.1.80.0100.00716.67
7.1.70.0070.00716.64
7.1.60.0080.00717.19
7.1.50.0090.00916.67
7.1.40.0100.00816.66
7.1.30.0100.00616.61
7.1.20.0110.00216.69
7.1.10.0120.00516.56
7.1.00.0110.01917.73
7.0.330.0090.00516.33
7.0.320.0100.00616.35
7.0.310.0120.00516.39
7.0.300.0110.00616.44
7.0.290.0090.00416.31
7.0.280.0130.01016.30
7.0.270.0150.01016.31
7.0.260.0070.00616.36
7.0.250.0120.00516.45
7.0.240.0110.00516.41
7.0.230.0090.00616.38
7.0.220.0160.00816.34
7.0.210.0090.00716.43
7.0.200.0080.00716.01
7.0.190.0090.00716.45
7.0.180.0050.01016.38
7.0.170.0100.00716.39
7.0.160.0110.00416.36
7.0.150.0100.00716.40
7.0.140.0120.00416.43
7.0.130.0110.01316.43
7.0.120.0070.00916.52
7.0.110.0070.01016.33
7.0.100.0080.01016.44
7.0.90.0560.00417.04
7.0.80.0530.00417.02
7.0.70.0220.00517.14
7.0.60.0230.00417.11
7.0.50.0210.00417.17
7.0.40.0190.00816.38
7.0.30.0220.00416.42
7.0.20.0170.00716.38
7.0.10.0200.00616.47
7.0.00.0200.00816.37
5.6.400.0080.00915.53
5.6.390.0080.00815.41
5.6.380.0090.00615.58
5.6.370.0130.00615.51
5.6.360.0110.00715.55
5.6.350.0040.01015.49
5.6.340.0090.00815.54
5.6.330.0100.00915.55
5.6.320.0100.00715.42
5.6.310.0080.00915.54
5.6.300.0070.01015.47
5.6.290.0090.00815.58
5.6.280.0100.00615.59
5.6.270.0120.00615.40
5.6.260.0090.00815.45
5.6.250.0100.00815.42
5.6.240.0220.00416.52
5.6.230.0210.00616.56
5.6.220.0220.00516.62
5.6.210.0230.00516.54
5.6.200.0230.00616.65
5.6.190.0230.00516.69
5.6.180.0210.00616.65
5.6.170.0210.00516.67
5.6.160.0200.00616.63
5.6.150.0190.00816.59
5.6.140.0210.00616.60
5.6.130.0190.00816.59
5.6.120.0190.00816.61
5.6.110.0200.00716.64
5.6.100.0220.00316.59
5.6.90.0220.00516.59
5.6.80.0250.00716.47
5.6.70.0210.01016.40
5.6.60.0230.00416.43
5.6.50.0220.00616.45
5.6.40.0210.00716.46
5.6.30.0210.00716.53
5.6.20.0250.00616.44
5.6.10.0210.00416.46
5.6.00.0190.00916.40

preferences:
12.58 ms | 406 KiB | 5 Q