3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bad = ['fook', 'shoot']; $pattern = '/(?:\b(?=(?:' . implode('|', $bad) . ')\b)\w\K|\G(?!^))\w/i'; echo preg_replace($pattern, '*', 'Holy fook n shoot, Batman; The Joker\'s shooting The Riddler!');

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.4.140.0160.00517.82
8.4.130.0170.00417.73
8.4.120.0100.01022.31
8.4.110.0130.00922.64
8.4.100.0110.00917.81
8.4.90.0140.00718.52
8.4.80.0050.00317.94
8.4.70.0060.00217.80
8.4.60.0140.00818.61
8.4.50.0120.00920.53
8.4.40.0160.00620.63
8.4.30.0070.01322.02
8.4.20.0070.01017.96
8.4.10.0100.00722.32
8.3.270.0090.01016.73
8.3.260.0070.00316.62
8.3.250.0100.01018.79
8.3.240.0120.00216.77
8.3.230.0100.01116.56
8.3.220.0100.00916.99
8.3.210.0010.00716.64
8.3.200.0070.00216.69
8.3.190.0120.00616.53
8.3.180.0110.00816.61
8.3.170.0150.00420.75
8.3.160.0120.00617.33
8.3.150.0140.00420.70
8.3.140.0120.00616.98
8.3.130.0080.01218.62
8.3.120.0090.00618.71
8.3.110.0100.00720.94
8.3.100.0040.00424.06
8.3.90.0120.00626.77
8.3.80.0030.00619.36
8.3.70.0110.00416.50
8.3.60.0150.00318.43
8.3.50.0070.00716.54
8.3.40.0090.01220.21
8.3.30.0100.00320.76
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0000.00726.16
8.2.290.0130.00720.38
8.2.280.0130.00818.24
8.2.270.0100.00317.31
8.2.260.0080.00017.46
8.2.250.0080.00016.80
8.2.240.0030.00618.76
8.2.230.0080.00022.58
8.2.220.0060.00337.54
8.2.210.0080.00026.77
8.2.200.0040.00418.88
8.2.190.0130.00316.61
8.2.180.0070.01118.41
8.2.170.0090.00618.92
8.2.160.0080.00522.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00419.79
8.2.110.0050.00519.29
8.2.100.0060.00618.04
8.2.90.0000.00817.88
8.2.80.0060.00618.86
8.2.70.0050.00317.75
8.2.60.0070.00317.50
8.2.50.0150.00517.62
8.2.40.0000.01617.63
8.2.30.0080.00817.50
8.2.20.0170.00017.38
8.2.10.0080.00817.62
8.2.00.0130.00317.63
8.1.330.0060.00321.93
8.1.320.0120.00716.34
8.1.310.0130.00318.57
8.1.300.0000.00918.53
8.1.290.0090.00030.84
8.1.280.0140.00725.92
8.1.270.0050.00324.66
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0030.00619.24
8.1.230.0040.00720.89
8.1.220.0080.00018.68
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0110.00517.13
8.1.180.0030.01317.13
8.1.170.0120.00417.38
8.1.160.0050.01017.38
8.1.150.0110.00617.13
8.1.140.0090.00617.25
8.1.130.0130.00417.50
8.1.120.0100.00617.38
8.1.110.0130.00317.50
8.1.100.0120.00417.35
8.1.90.0090.00916.85
8.1.80.0120.00617.48
8.1.70.0170.00017.25
8.1.60.0090.00917.50
8.1.50.0140.00317.59
8.1.40.0170.00017.48
8.1.30.0150.00317.48
8.1.20.0160.00717.50
8.1.10.0120.00617.38
8.1.00.0180.00017.50
8.0.300.0090.00020.02
8.0.290.0040.00416.75
8.0.280.0120.00416.75
8.0.270.0080.00816.88
8.0.260.0100.00616.72
8.0.250.0140.00316.88
8.0.240.0100.00716.86
8.0.230.0140.00416.75
8.0.220.0090.00916.63
8.0.210.0070.00916.75
8.0.200.0080.00816.75
8.0.190.0120.00416.87
8.0.180.0180.00016.75
8.0.170.0110.00516.52
8.0.160.0130.00316.75
8.0.150.0060.01116.52
8.0.140.0190.00316.75
8.0.130.0080.00816.63
8.0.120.0160.00016.61
8.0.110.0120.00316.52
8.0.100.0090.00716.75
8.0.90.0160.00016.74
8.0.80.0170.00016.72
8.0.70.0140.00316.52
8.0.60.0150.00016.60
8.0.50.0130.00416.52
8.0.30.0120.00316.61
8.0.20.0130.00216.75
8.0.10.0100.00516.63

preferences:
29.93 ms | 403 KiB | 5 Q