3v4l.org

run code in 300+ PHP versions simultaneously
<?php function filterwords(string $text, array $bannedWords) { return preg_replace_callback( '/\b(?:' . implode('|', $bannedWords) . ')\b/iu', fn($m) => str_repeat('*', mb_strlen($m[0])), $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.20.0100.00818.20
8.5.10.0120.00716.96
8.5.00.0110.01120.09
8.4.170.0100.01123.91
8.4.160.0150.01023.94
8.4.150.0020.00014.05
8.4.140.0140.00617.89
8.4.130.0140.00817.99
8.4.120.0110.00620.52
8.4.110.0130.00822.33
8.4.100.0090.01118.00
8.4.90.0170.00817.99
8.4.80.0120.00718.26
8.4.70.0050.00418.06
8.4.60.0140.00617.90
8.4.50.0120.00917.67
8.4.40.0100.01017.75
8.4.30.0080.00018.89
8.4.20.0100.01017.99
8.4.10.0090.00019.70
8.3.290.0140.01120.53
8.3.280.0110.00918.63
8.3.270.0180.00116.71
8.3.260.0110.00916.66
8.3.250.0140.00618.70
8.3.240.0130.00716.66
8.3.230.0110.00816.80
8.3.220.0140.00517.17
8.3.210.0100.00917.07
8.3.200.0050.00316.79
8.3.190.0080.00716.73
8.3.180.0120.00816.71
8.3.170.0150.00420.51
8.3.160.0130.00718.37
8.3.150.0090.01218.38
8.3.140.0040.00417.25
8.3.130.0080.00018.54
8.3.120.0070.01418.98
8.3.110.0060.00320.94
8.3.100.0060.00324.06
8.3.90.0120.00626.77
8.3.80.0050.00518.52
8.3.70.0150.00716.88
8.3.60.0050.01018.52
8.3.50.0140.00716.85
8.3.40.0120.00620.32
8.3.30.0100.00720.20
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0170.00328.09
8.2.300.0120.00818.28
8.2.290.0100.00320.24
8.2.280.0090.01018.38
8.2.270.0120.00919.21
8.2.260.0110.00018.83
8.2.250.0030.00618.53
8.2.240.0090.00017.30
8.2.230.0060.00922.58
8.2.220.0110.00037.54
8.2.210.0000.00926.77
8.2.200.0060.00318.54
8.2.190.0110.00717.00
8.2.180.0110.00716.75
8.2.170.0100.01019.07
8.2.160.0100.00722.96
8.2.150.0070.00025.66
8.2.140.0050.00324.66
8.2.130.0070.01128.09
8.2.120.0110.00728.09
8.2.110.0100.01028.09
8.2.100.0070.01128.09
8.2.90.0070.01328.09
8.2.80.0140.00728.09
8.2.70.0130.00328.09
8.2.60.0110.00728.09
8.2.50.0100.00728.09
8.2.40.0130.00328.09
8.2.30.0090.01228.09
8.2.20.0110.01128.09
8.2.10.0060.00928.09
8.2.00.0090.01228.09
8.1.340.0070.01018.02
8.1.330.0080.01016.73
8.1.320.0090.01116.57
8.1.310.0100.00318.12
8.1.300.0100.00017.84
8.1.290.0070.00330.84
8.1.280.0110.01125.92
8.1.270.0090.00023.77
8.1.260.0100.01028.09
8.1.250.0130.00728.09
8.1.240.0130.00728.09
8.1.230.0120.00328.09
8.1.220.0040.00428.09
8.1.210.0060.00328.09
8.1.200.0090.00928.09
8.1.190.0120.00628.09
8.1.180.0080.00828.09
8.1.170.0110.00428.09
8.1.160.0070.00728.09
8.1.150.0070.00728.09
8.1.140.0070.00728.09
8.1.130.0070.00728.09
8.1.120.0050.00328.09
8.1.110.0000.00828.09
8.1.100.0040.00428.09
8.1.90.0040.00428.09
8.1.80.0060.00328.09
8.1.70.0050.00328.09
8.1.60.0030.00528.09
8.1.50.0040.00428.09
8.1.40.0060.00328.09
8.1.30.0060.00328.09
8.1.20.0030.00528.09
8.1.10.0030.00528.09
8.1.00.0060.00328.09

preferences:
69.42 ms | 403 KiB | 5 Q