3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stopwords = "bed|badword|bud"; $lines = [ 'Good morning everyone', 'Make your bed and brush your hair', 'Finish your breakfast', 'Do not say badwords', 'Will you be my buddy?', ]; var_export(preg_grep("#$stopwords#", $lines));

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.120.0170.00717.87
8.4.110.0100.00317.70
8.4.100.0090.00317.85
8.4.90.0080.00617.82
8.4.80.0110.00318.18
8.4.70.0110.00317.61
8.4.60.0040.00717.86
8.4.50.0080.00518.02
8.4.40.0100.00418.00
8.4.30.0100.00317.87
8.4.20.0080.00717.66
8.4.10.0080.00417.88
8.3.250.0100.00216.63
8.3.240.0080.00516.82
8.3.230.0070.00416.80
8.3.220.0070.00416.48
8.3.210.0090.00316.68
8.3.200.0080.00416.53
8.3.190.0090.00416.52
8.3.180.0070.00416.54
8.3.170.0070.00516.68
8.3.160.0090.00216.45
8.3.150.0080.00416.52
8.3.140.0040.00516.82
8.3.130.0070.00616.38
8.3.120.0090.00416.60
8.3.110.0100.00216.41
8.3.100.0080.00316.40
8.3.90.0110.00216.50
8.3.80.0080.00316.84
8.3.70.0070.00416.64
8.3.60.0070.00316.48
8.3.50.0100.00116.64
8.3.40.0080.00317.76
8.3.30.0070.00417.76
8.3.20.0060.00417.68
8.3.10.0070.00417.66
8.3.00.0060.00617.64
8.2.290.0090.00316.64
8.2.280.0040.00516.98
8.2.270.0060.00416.88
8.2.260.0050.00616.78
8.2.250.0050.00616.95
8.2.240.0060.00416.56
8.2.230.0050.00416.72
8.2.220.0060.00416.70
8.2.210.0100.00316.36
8.2.200.0090.00516.37
8.2.190.0130.00316.44
8.2.180.0070.00716.48
8.2.170.0170.00117.72
8.2.160.0110.00217.43
8.2.150.0100.00617.37
8.2.140.0100.00617.56
8.2.130.0120.00417.77
8.2.120.0120.00617.37
8.2.110.0140.00317.00
8.2.100.0140.00417.32
8.2.90.0130.00317.40
8.2.80.0130.00317.31
8.2.70.0110.00517.42
8.2.60.0150.00117.37
8.2.50.0130.00317.03
8.2.40.0150.00517.05
8.2.30.0150.00817.33
8.2.20.0150.00216.79
8.2.10.0160.00416.89
8.2.00.0140.00317.45

preferences:
30.89 ms | 403 KiB | 5 Q