3v4l.org

run code in 300+ PHP versions simultaneously
<?php function filterwords(string $text, array $bannedWords) { return preg_replace( '/(?=\b(?:' . implode('|', $bannedWords) . ')\b)\w|\G(?!^)\w/i', '*', $text ); } echo filterwords("I am a dummy, but I'm not dumb", ['dummy']);

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.10.0100.00816.72
8.5.00.0100.01319.75
8.4.160.0090.01323.77
8.4.150.0020.00014.05
8.4.140.0120.00917.81
8.4.130.0040.00517.90
8.4.120.0040.00420.55
8.4.110.0110.00922.50
8.4.100.0110.00917.84
8.4.90.0050.00718.05
8.4.80.0100.01017.75
8.4.70.0090.00618.34
8.4.60.0050.00518.92
8.4.50.0120.00918.87
8.4.40.0120.00618.09
8.4.30.0000.00818.51
8.4.20.0130.00718.04
8.4.10.0110.00419.57
8.3.280.0070.00218.51
8.3.270.0180.00716.70
8.3.260.0120.00716.52
8.3.250.0080.00919.10
8.3.240.0130.00616.70
8.3.230.0130.00616.54
8.3.220.0090.00817.01
8.3.210.0120.00718.66
8.3.200.0040.00416.55
8.3.190.0090.00618.84
8.3.180.0040.00716.85
8.3.170.0150.00320.74
8.3.160.0030.01618.48
8.3.150.0150.00418.69
8.3.140.0000.00919.15
8.3.130.0080.00018.67
8.3.120.0090.00020.61
8.3.110.0030.00620.94
8.3.100.0060.00324.06
8.3.90.0040.00426.77
8.3.80.0030.00617.97
8.3.70.0150.00416.63
8.3.60.0160.00618.56
8.3.50.0070.00716.60
8.3.40.0160.00320.07
8.3.30.0130.00320.33
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0100.01028.09
8.2.290.0060.00420.46
8.2.280.0110.01218.36
8.2.270.0120.00419.20
8.2.260.0130.00618.39
8.2.250.0090.00918.30
8.2.240.0070.01118.86
8.2.230.0070.00322.58
8.2.220.0130.00337.54
8.2.210.0090.00626.77
8.2.200.0030.00716.75
8.2.190.0120.00918.41
8.2.180.0120.00316.75
8.2.170.0090.00619.04
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0160.00328.09
8.2.120.0070.01028.09
8.2.110.0000.01528.09
8.2.100.0130.00628.09
8.2.90.0120.00628.09
8.2.80.0070.01128.09
8.2.70.0220.00028.09
8.2.60.0090.00628.09
8.2.50.0110.00428.09
8.2.40.0070.00728.09
8.2.30.0030.00528.09
8.2.20.0130.00328.09
8.2.10.0040.00428.09
8.2.00.0080.00028.09
8.1.330.0110.00716.67
8.1.320.0070.01316.07
8.1.310.0140.00018.50
8.1.300.0130.00017.62
8.1.290.0090.00030.84
8.1.280.0130.01025.92
8.1.270.0050.00322.07
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0120.00328.09
8.1.230.0060.00928.09
8.1.220.0080.00028.09
8.1.210.0040.00428.09
8.1.200.0080.00028.09
8.1.190.0040.01128.09
8.1.180.0040.00428.09
8.1.170.0000.00828.09
8.1.160.0040.00428.09
8.1.150.0000.00828.09
8.1.140.0040.00428.09
8.1.130.0000.00828.09
8.1.120.0060.00928.09
8.1.110.0090.00028.09
8.1.100.0000.00828.09
8.1.90.0080.00028.09
8.1.80.0040.00428.09
8.1.70.0080.00028.09
8.1.60.0000.00828.09
8.1.50.0070.00728.09
8.1.40.0070.00728.09
8.1.30.0070.00728.09
8.1.20.0030.00628.09
8.1.10.0150.00028.09
8.1.00.0040.01128.09

preferences:
36.23 ms | 403 KiB | 5 Q