3v4l.org

run code in 500+ 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.5.90.0060.00216.87
8.5.80.0030.00516.71
8.5.70.0090.00816.76
8.5.60.0110.00616.55
8.5.50.0080.01116.63
8.5.30.0080.00919.40
8.5.20.0120.00719.29
8.5.10.0080.01018.18
8.5.00.0120.01021.73
8.4.240.0070.01519.59
8.4.230.0100.01219.55
8.4.220.0120.00919.54
8.4.210.0050.00419.48
8.4.180.0170.00619.55
8.4.170.0110.01321.88
8.4.160.0100.01120.67
8.4.150.0080.00516.90
8.4.140.0110.01017.81
8.4.130.0150.00619.20
8.4.120.0120.00722.41
8.4.110.0120.00919.04
8.4.100.0130.00717.40
8.4.90.0090.01120.54
8.4.80.0040.00618.91
8.4.70.0050.00418.83
8.4.60.0080.01120.85
8.4.50.0140.00618.57
8.4.40.0130.00319.18
8.4.30.0150.00418.51
8.4.20.0100.00720.80
8.4.10.0030.00618.70
8.3.330.0140.00718.27
8.3.320.0150.00218.25
8.3.310.0130.00718.35
8.3.300.0120.00820.70
8.3.290.0130.00720.82
8.3.280.0140.00620.03
8.3.270.0100.01016.41
8.3.260.0100.01016.56
8.3.250.0110.00716.70
8.3.240.0110.00916.59
8.3.230.0110.00716.50
8.3.220.0110.00618.97
8.3.210.0090.00918.11
8.3.200.0060.00316.62
8.3.190.0130.00417.21
8.3.180.0050.00318.85
8.3.170.0070.01118.66
8.3.160.0000.00818.16
8.3.150.0110.00718.68
8.3.140.0000.00820.63
8.3.130.0040.00418.58
8.3.120.0030.01318.92
8.3.110.0080.00020.94
8.3.100.0000.00824.06
8.3.90.0000.00826.77
8.3.80.0040.00416.38
8.3.70.0070.00716.75
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.320.0140.00818.12
8.2.310.0120.00618.23
8.2.300.0120.01020.37
8.2.290.0090.01019.09
8.2.280.0100.00920.55
8.2.270.0100.00716.74
8.2.260.0140.00318.68
8.2.250.0070.01118.23
8.2.240.0080.01118.76
8.2.230.0040.00422.58
8.2.220.0090.00637.54
8.2.210.0040.01126.77
8.2.200.0040.00416.50
8.2.190.0070.01416.88
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.340.0110.00820.02
8.1.330.0050.00415.86
8.1.320.0090.00917.82
8.1.310.0110.00416.48
8.1.300.0000.01118.00
8.1.290.0060.00318.88
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:
114.5 ms | 1449 KiB | 5 Q