3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str1 = "— lorem lorem Alice lorem lorem lorem loremlorem"; // | < Why would a dash make a difference in the the found index? $str2 = "a lorem lorem Alice lorem lorem lorem loremlorem"; $str3 = " lorem lorem Alice lorem lorem lorem loremlorem"; // The found index is always the same $foundIndex = mb_stripos($str1, "Alice"); var_dump(substr($str1, $foundIndex - 6, 24), $foundIndex); $foundIndex = mb_stripos($str2, "Alice"); var_dump(substr($str2, $foundIndex - 6, 24), $foundIndex); $foundIndex = mb_stripos($str3, "Alice"); var_dump(substr($str3, $foundIndex - 6, 24), $foundIndex);

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.0090.00516.38
8.3.50.0090.00618.39
8.3.40.0070.01518.49
8.3.30.0120.00618.54
8.3.20.0070.00024.18
8.3.10.0000.00724.66
8.3.00.0000.00726.16
8.2.180.0090.00925.92
8.2.170.0100.00718.56
8.2.160.0060.00922.96
8.2.150.0090.00025.66
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0120.00619.54
8.2.110.0040.00419.45
8.2.100.0080.00317.72
8.2.90.0000.00817.84
8.2.80.0080.00018.09
8.2.70.0050.00317.50
8.2.60.0080.00017.50
8.2.50.0000.00719.38
8.2.40.0000.00821.06
8.2.30.0070.00017.88
8.2.20.0040.00417.99
8.2.10.0000.00719.25
8.2.00.0000.00719.21
8.1.280.0110.01125.92
8.1.270.0080.00323.99
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0090.00022.41
8.1.230.0120.00020.91
8.1.220.0050.00317.74
8.1.210.0000.00818.97
8.1.200.0080.00017.36
8.1.190.0050.00317.23
8.1.180.0060.00319.04
8.1.170.0030.00620.42
8.1.160.0070.00018.87
8.1.150.0040.00418.70
8.1.140.0040.00418.91
8.1.130.0030.00318.82
8.1.120.0030.00517.34
8.1.110.0000.00717.46
8.1.100.0040.00417.32
8.1.90.0030.00617.47
8.1.80.0080.00017.33
8.1.70.0040.00417.34
8.1.60.0040.00417.55
8.1.50.0040.00417.40
8.1.40.0070.00317.51
8.1.30.0050.00317.54
8.1.20.0040.00417.54
8.1.10.0090.00317.51
8.1.00.0050.00217.32
8.0.300.0050.00319.83
8.0.290.0000.00816.75
8.0.280.0030.00318.35
8.0.270.0070.00018.03
8.0.260.0060.00018.43
8.0.250.0070.00016.94
8.0.240.0000.00816.99
8.0.230.0000.00816.83
8.0.220.0050.00316.80
8.0.210.0000.00716.87
8.0.200.0000.00716.95
8.0.190.0030.00416.93
8.0.180.0030.00516.89
8.0.170.0050.00316.82
8.0.160.0070.00016.76
8.0.150.0000.00716.84
8.0.140.0040.00416.75
8.0.130.0050.00013.39
8.0.120.0080.00016.84
8.0.110.0020.00516.68
8.0.100.0000.00716.84
8.0.90.0030.00416.80
8.0.80.0050.00216.82
8.0.70.0030.00516.93
8.0.60.0050.00316.79
8.0.50.0030.00516.84
8.0.30.0040.00316.81
8.0.20.0050.00316.86
8.0.10.0040.00416.90
8.0.00.0050.00416.90
7.4.330.0040.00015.55
7.4.320.0030.00316.63
7.4.300.0030.00316.36
7.4.290.0070.00016.43
7.4.280.0040.00416.62
7.4.270.0070.00016.51
7.4.260.0000.00513.23
7.4.250.0070.00016.55
7.4.240.0030.00316.50
7.4.230.0040.00416.27
7.4.220.0040.00416.63
7.4.210.0030.00416.50
7.4.200.0010.00616.52
7.4.190.0020.00516.60
7.4.180.0040.00416.54
7.4.160.0040.00316.59
7.4.150.0040.00316.48
7.4.140.0040.00416.53
7.4.130.0040.00416.27
7.4.120.0030.00416.37
7.4.110.0030.00516.41
7.4.100.0030.00516.47
7.4.90.0040.00316.43
7.4.80.0040.00416.27
7.4.70.0050.00316.41
7.4.60.0020.00616.30
7.4.50.0030.00416.34
7.4.40.0030.00416.32
7.4.30.0020.00616.39
7.4.20.0030.00416.45
7.4.10.0040.00416.33
7.4.00.0020.00516.49
7.3.330.0030.00316.27
7.3.320.0030.00313.23
7.3.310.0070.00016.19
7.3.300.0030.00316.36
7.3.290.0020.00516.30
7.3.280.0050.00316.28
7.3.270.0040.00416.29
7.3.260.0040.00416.31
7.3.250.0020.00516.34
7.3.240.0030.00516.27
7.3.230.0050.00316.25
7.3.220.0020.00516.19
7.3.210.0020.00516.16
7.3.200.0040.00316.09
7.3.190.0010.00716.18
7.3.180.0030.00416.10
7.3.170.0040.00316.14
7.3.160.0030.00516.17
7.3.150.0050.00216.18
7.3.140.0010.00616.18
7.3.130.0030.00416.20
7.3.120.0020.00516.19
7.3.110.0030.00416.20
7.3.100.0030.00416.16
7.3.90.0040.00316.49
7.3.80.0030.00416.14
7.3.70.0030.00416.31
7.3.60.0020.00516.34
7.3.50.0060.00116.39
7.3.40.0040.00316.25
7.3.30.0030.00416.30
7.3.20.0040.00416.29
7.3.10.0030.00516.32
7.3.00.0030.00416.29

preferences:
30.89 ms | 401 KiB | 5 Q