3v4l.org

run code in 300+ PHP versions simultaneously
<?php function NukesSpam($input) { $blacklist = array('domain.com','visual.merriam-webster.com','example.com'); $output=$input; foreach ($blacklist as $a_blacklisted) { $output = preg_replace('/<img(.*?)src=.http(.*?)'.str_replace('.','\.',$a_blacklisted).'(.*?)>/', '<img src="http://standardsurvival.com/faces/64/drusz.png">', $input); } return $output; } echo NukesSpam('<img src="http://www.domain.com/test1.jpg">');

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.3.60.0170.00318.23
8.3.50.0130.00722.18
8.3.40.0070.00718.92
8.3.30.0170.00319.02
8.3.20.0040.00420.34
8.3.10.0040.00422.00
8.3.00.0070.00022.52
8.2.180.0110.00716.38
8.2.170.0070.00722.96
8.2.160.0070.00720.52
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0120.00017.75
8.2.110.0090.00020.32
8.2.100.0040.00818.00
8.2.90.0030.00519.13
8.2.80.0080.00017.97
8.2.70.0030.00617.88
8.2.60.0090.00417.68
8.2.50.0000.00918.07
8.2.40.0050.00318.16
8.2.30.0000.00718.17
8.2.20.0040.00417.93
8.2.10.0070.00017.87
8.2.00.0030.00617.82
8.1.280.0140.00725.92
8.1.270.0050.00322.19
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00321.12
8.1.230.0080.00817.58
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0090.00017.48
8.1.190.0000.00817.53
8.1.180.0000.00818.59
8.1.170.0090.00018.70
8.1.160.0000.01021.96
8.1.150.0050.00218.87
8.1.140.0050.00317.59
8.1.130.0030.00317.82
8.1.120.0040.00417.62
8.1.110.0000.00917.61
8.1.100.0000.00817.52
8.1.90.0000.00717.55
8.1.80.0050.00317.66
8.1.70.0030.00317.52
8.1.60.0040.00417.75
8.1.50.0030.00517.65
8.1.40.0060.00317.62
8.1.30.0040.00417.63
8.1.20.0030.00517.64
8.1.10.0000.00817.64
8.1.00.0040.00417.59
8.0.300.0000.00718.77
8.0.290.0040.00416.75
8.0.280.0000.00818.48
8.0.270.0070.00017.30
8.0.260.0030.00516.86
8.0.250.0100.00017.05
8.0.240.0040.00417.12
8.0.230.0030.00317.18
8.0.220.0000.00716.99
8.0.210.0000.00717.04
8.0.200.0040.00417.14
8.0.190.0050.00217.05
8.0.180.0000.00717.08
8.0.170.0050.00317.05
8.0.160.0000.00816.96
8.0.150.0000.00717.01
8.0.140.0000.00717.01
8.0.130.0000.00613.46
8.0.120.0000.00817.00
8.0.110.0030.00617.03
8.0.100.0080.00016.93
8.0.90.0000.00717.10
8.0.80.0130.00316.98
8.0.70.0070.00017.06
8.0.60.0040.00416.91
8.0.50.0040.00416.92
8.0.30.0110.00917.27
8.0.20.0120.00717.40
8.0.10.0050.00317.12
8.0.00.0110.00917.02
7.4.330.0000.00515.00
7.4.320.0030.00316.72
7.4.300.0060.00016.66
7.4.290.0030.00316.63
7.4.280.0030.00316.73
7.4.270.0050.00216.81
7.4.260.0030.00416.61
7.4.250.0040.00416.81
7.4.240.0040.00416.79
7.4.230.0000.00716.91
7.4.220.0040.01616.77
7.4.210.0060.01116.83
7.4.200.0040.00416.71
7.4.190.0000.00716.74
7.4.160.0130.01016.67
7.4.150.0060.01317.40
7.4.140.0110.01017.86
7.4.130.0080.00916.71
7.4.120.0150.00216.72
7.4.110.0130.00616.70
7.4.100.0130.00616.77
7.4.90.0110.00716.68
7.4.80.0120.00919.39
7.4.70.0030.01416.79
7.4.60.0040.01416.57
7.4.50.0050.00316.62
7.4.40.0080.00922.77
7.4.30.0060.01016.79
7.4.00.0030.01415.32
7.3.330.0000.00713.54
7.3.320.0000.00513.50
7.3.310.0040.00416.34
7.3.300.0030.00316.46
7.3.290.0070.00716.52
7.3.280.0060.01216.55
7.3.270.0030.01417.40
7.3.260.0120.00616.79
7.3.250.0130.00416.63
7.3.240.0150.00616.67
7.3.230.0090.01316.56
7.3.210.0070.01016.54
7.3.200.0070.01419.39
7.3.190.0140.00316.52
7.3.180.0100.00716.74
7.3.170.0130.00916.85
7.3.160.0060.00916.64
7.3.120.0110.00715.07
7.3.10.0060.00616.69
7.3.00.0040.01116.86
7.2.330.0060.01316.80
7.2.320.0140.00316.91
7.2.310.0110.00816.62
7.2.300.0060.01216.80
7.2.290.0120.00916.86
7.2.130.0130.00317.06
7.2.120.0090.00617.17
7.2.110.0070.00717.13
7.2.100.0130.00017.10
7.2.90.0090.00616.93
7.2.80.0060.00317.00
7.2.70.0100.00716.91
7.2.60.0100.00317.07
7.2.50.0040.00817.26
7.2.40.0110.00717.18
7.2.30.0060.00617.25
7.2.20.0110.00017.03
7.2.10.0040.01117.16
7.2.00.0070.00818.38
7.1.250.0000.01516.06
7.1.200.0090.00315.79
7.1.100.0100.00018.51
7.1.70.0030.00617.33
7.1.60.0140.01119.82
7.1.50.0000.01217.15
7.1.00.0000.09022.53
7.0.200.0040.00416.95
7.0.140.0130.06722.16
7.0.60.0070.08319.94
7.0.50.0070.07317.91
7.0.40.0030.09020.13
7.0.30.0300.04020.17
7.0.20.0400.06320.08
7.0.10.0130.06320.26
7.0.00.0170.06320.10
5.6.280.0100.06721.02
5.6.210.0000.04320.51
5.6.200.0030.04018.22
5.6.190.0170.08020.61
5.6.180.3300.03320.48
5.6.170.0300.08020.54
5.6.160.0030.05320.50
5.6.150.0100.04718.19
5.6.140.0070.08318.28
5.6.130.0030.09018.15
5.6.120.0030.05721.04
5.6.110.0070.07021.04
5.6.100.0130.05721.02
5.6.90.0100.07320.96
5.6.80.0170.03020.49
5.6.70.0300.07320.51
5.5.350.0030.08020.43
5.5.340.0100.07018.03
5.5.330.0100.08320.29
5.5.320.0200.06020.30
5.5.310.0270.07720.30
5.5.300.0030.08317.95
5.5.290.0130.06318.07
5.5.280.0170.04020.85
5.5.270.0030.09020.97
5.5.260.0000.08020.97
5.5.250.0070.07020.77
5.5.240.0070.04020.24
5.4.450.0130.05019.62
5.4.440.0770.05719.61
5.4.430.0670.05319.70
5.4.420.0630.05319.47
5.4.410.0600.06319.18
5.4.400.0870.00018.79
5.4.390.0670.00018.47
5.4.380.0270.05718.50
5.4.370.0070.05718.74
5.4.360.0170.04718.47
5.4.350.0070.05718.62
5.4.340.0170.04318.57
5.4.320.0100.03512.51
5.4.310.0050.03812.50
5.4.300.0070.03512.50
5.4.290.0090.03612.50
5.4.280.0090.03312.40
5.4.270.0080.03612.40
5.4.260.0100.05018.74
5.4.250.0000.06018.71
5.4.240.0030.06019.01
5.4.230.0030.05318.89
5.4.220.0070.05719.09
5.4.210.0100.05318.89
5.4.200.0100.04718.93
5.4.190.0100.05018.94
5.4.180.0100.05018.74
5.4.170.0130.04718.73
5.4.160.0070.05318.92
5.4.150.0200.04318.73
5.4.140.0100.04716.64
5.4.130.0030.05016.59
5.4.120.0030.05716.34
5.4.110.0030.06316.52
5.4.100.0130.04316.50
5.4.90.0070.06716.47
5.4.80.0070.04716.38
5.4.70.0030.05016.54
5.4.60.0070.04716.51
5.4.50.0130.04316.41
5.4.40.0130.04716.44
5.4.30.0070.05316.31
5.4.20.0100.05316.48
5.4.10.0200.05716.45
5.4.00.0100.04715.96
5.3.290.0060.05012.80
5.3.280.0070.05014.60
5.3.270.0030.06014.66
5.3.260.0100.05014.70
5.3.250.0130.04314.71
5.3.240.0070.05014.52
5.3.230.0070.05314.61
5.3.220.0070.05314.65
5.3.210.0170.06714.63
5.3.200.0030.05314.63
5.3.190.0100.04714.65
5.3.180.0070.05014.78
5.3.170.0200.05314.54
5.3.160.0030.05014.64
5.3.150.0100.04714.79
5.3.140.0100.06014.38
5.3.130.0130.05014.45
5.3.120.0170.04714.68
5.3.110.0030.05714.63
5.3.100.0100.04713.94
5.3.90.0100.04314.00
5.3.80.0030.05014.09
5.3.70.0070.05314.00
5.3.60.0070.05014.06
5.3.50.0130.04714.04
5.3.40.0100.05314.01
5.3.30.0030.07313.99
5.3.20.0170.04013.70
5.3.10.0070.04713.73
5.3.00.0070.05013.73
5.2.170.0100.03711.22
5.2.160.0070.04711.23
5.2.150.0130.03311.23
5.2.140.0070.04011.36
5.2.130.0030.05011.18
5.2.120.0030.04011.18
5.2.110.0130.05011.05
5.2.100.0030.04010.92
5.2.90.0130.03311.17
5.2.80.0070.04010.93
5.2.70.0030.04310.92
5.2.60.0070.03711.14
5.2.50.0070.04011.01
5.2.40.0030.04311.07
5.2.30.0000.04710.95
5.2.20.0100.03311.03
5.2.10.0070.05311.02
5.2.00.0070.04310.81
5.1.60.0100.04310.04
5.1.50.0030.03310.09
5.1.40.0100.02710.04
5.1.30.0030.03710.40
5.1.20.0130.02710.34
5.1.10.0070.0339.90
5.1.00.0070.0339.98
5.0.50.0070.0378.69
5.0.40.0070.0338.48
5.0.30.0030.0438.14
5.0.20.0030.0278.40
5.0.10.0130.0178.00
5.0.00.0070.0408.20
4.4.90.0000.0236.90
4.4.80.0030.0206.90
4.4.70.0000.0336.90
4.4.60.0000.0236.90
4.4.50.0000.0336.90
4.4.40.0070.0376.90
4.4.30.0030.0206.90
4.4.20.0030.0306.90
4.4.10.0030.0206.90
4.4.00.0030.0336.90
4.3.110.0070.0206.90
4.3.100.0030.0206.90
4.3.90.0070.0176.90
4.3.80.0030.0436.90
4.3.70.0030.0306.90
4.3.60.0030.0206.90
4.3.50.0030.0206.90
4.3.40.0030.0336.90
4.3.30.0000.0276.90
4.3.20.0000.0236.90
4.3.10.0000.0236.90
4.3.00.0070.0239.30

preferences:
46.89 ms | 401 KiB | 5 Q