3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ 'Blah blah blah. THIS SENTENCE SHOULD BE SELECTED [bbcode] text', 'THIS SENTENCE SHOULD BE SELECTED [bbcode] text', 'A trick sentence. And another. THIS SENTENCE SHOULD BE SELECTED [bbcode]] text' ]; foreach ($tests as $test) { var_export(preg_match('/ *\K[^.]+?(?=\s+\[bbcode])/i', $test, $m) ? $m[0] : 'no match'); echo "\n---\n"; }

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.20.0080.00919.46
8.5.10.0080.01020.05
8.5.00.0120.01120.04
8.4.170.0130.00823.89
8.4.160.0120.01123.91
8.4.150.0020.00014.05
8.4.140.0120.00917.71
8.4.130.0120.00918.14
8.4.120.0130.00724.12
8.4.110.0130.00720.20
8.4.100.0130.00719.01
8.4.90.0130.00818.83
8.4.80.0030.00518.93
8.4.70.0130.00818.23
8.4.60.0080.01217.76
8.4.50.0070.00417.96
8.4.40.0000.01118.06
8.4.30.0080.01218.56
8.4.20.0130.00722.33
8.4.10.0030.00623.68
8.3.300.0120.00820.82
8.3.290.0110.01218.33
8.3.280.0100.01218.54
8.3.270.0080.01316.42
8.3.260.0140.00516.88
8.3.250.0120.00719.09
8.3.240.0140.00416.95
8.3.230.0080.00916.85
8.3.220.0120.00619.01
8.3.210.0130.00816.66
8.3.200.0080.01216.60
8.3.190.0060.00216.60
8.3.180.0110.00716.86
8.3.170.0140.00417.12
8.3.160.0040.00416.79
8.3.150.0100.01019.00
8.3.140.0040.00418.65
8.3.130.0000.00818.55
8.3.120.0070.00720.66
8.3.110.0130.00320.94
8.3.100.0060.00318.57
8.3.90.0090.00926.77
8.3.80.0100.00017.00
8.3.70.0070.00716.58
8.3.60.0140.00716.75
8.3.50.0040.01120.38
8.3.40.0140.00020.29
8.3.30.0070.00718.84
8.3.20.0030.00624.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.300.0110.00918.23
8.2.290.0090.00920.28
8.2.280.0110.00818.66
8.2.270.0140.00317.06
8.2.260.0110.00717.07
8.2.250.0050.00316.92
8.2.240.0080.00817.39
8.2.230.0000.00822.58
8.2.220.0060.00324.06
8.2.210.0110.00026.77
8.2.200.0030.00618.79
8.2.190.0120.00316.75
8.2.180.0140.00725.92
8.2.170.0100.01019.26
8.2.160.0070.01022.96
8.2.150.0050.00225.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00820.97
8.2.110.0060.00322.33
8.2.100.0090.00317.97
8.2.90.0080.00017.75
8.2.80.0050.00318.98
8.2.70.0040.00417.88
8.2.60.0060.00317.93
8.2.50.0080.00018.05
8.2.40.0000.00718.16
8.2.30.0000.00818.08
8.2.20.0000.00719.38
8.2.10.0040.00418.16
8.2.00.0070.00019.20
8.1.340.0100.01019.56
8.1.330.0120.00721.99
8.1.320.0140.00716.09
8.1.310.0040.01216.84
8.1.300.0000.00816.39
8.1.290.0090.00330.84
8.1.280.0090.00925.92
8.1.270.0080.00022.08
8.1.260.0090.00626.35
8.1.250.0040.00428.09
8.1.240.0060.00322.21
8.1.230.0070.00317.89
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0060.00317.48
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0030.00517.62
8.1.160.0040.00419.04
8.1.150.0040.00418.81
8.1.140.0000.00817.63
8.1.130.0000.00918.99
8.1.120.0030.00517.66
8.1.110.0070.00717.61
8.1.100.0100.00317.58
8.1.90.0070.00417.48
8.1.80.0070.00717.63
8.1.70.0070.00717.48
8.1.60.0080.00417.78
8.1.50.0040.00817.67
8.1.40.0110.00417.67
8.1.30.0080.00817.81
8.1.20.0090.00417.82
8.1.10.0100.00417.58
8.1.00.0070.00917.55
8.0.300.0040.00420.61
8.0.290.0090.00017.00
8.0.280.0040.00418.54
8.0.270.0000.00717.30
8.0.260.0060.00018.48
8.0.250.0000.00717.11
8.0.240.0090.00616.96
8.0.230.0080.00817.15
8.0.220.0180.00016.91
8.0.210.0160.00017.04
8.0.200.0130.00317.14
8.0.190.0110.00417.05
8.0.180.0060.00616.98
8.0.170.0110.00016.99
8.0.160.0050.00516.93
8.0.150.0080.00417.02
8.0.140.0080.00816.88
8.0.130.0070.00716.96
8.0.120.0100.00516.89
8.0.110.0110.00417.01
8.0.100.0120.00316.93
8.0.90.0130.00217.02
8.0.80.0040.01116.94
8.0.70.0160.00016.91
8.0.60.0050.00917.05
8.0.50.0140.00017.05
8.0.30.0050.01016.94
8.0.20.0090.00617.11
8.0.10.0070.00817.17
7.4.330.0020.00215.55
7.4.320.0120.00416.67
7.4.300.0160.00016.73
7.4.290.0120.00416.77
7.4.280.0110.00516.71
7.4.270.0180.00016.82
7.4.260.0080.00816.69
7.4.250.0170.00016.80
7.4.240.0110.00416.55
7.4.230.0080.00816.80
7.4.220.0100.00516.77
7.4.210.0090.00416.73
7.4.200.0110.00016.69
7.4.190.0030.00616.56
7.4.180.0050.00516.63
7.4.160.0050.00416.75
7.4.150.0030.00716.73
7.4.140.0110.00016.37
7.4.130.0040.00716.61
7.4.120.0120.00316.75
7.4.110.0050.00916.65
7.4.100.0120.00316.70
7.4.90.0120.00316.77
7.4.80.0120.00316.65
7.4.70.0080.00816.64
7.4.60.0090.00516.73
7.4.50.0140.00016.60
7.4.40.0080.00416.30
7.4.30.0040.00716.29
7.4.20.0090.00016.34
7.4.10.0040.00416.31
7.4.00.0040.00416.58

preferences:
32.21 ms | 403 KiB | 5 Q