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">', $output); } 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.0140.00718.33
8.3.50.0100.00922.17
8.3.40.0040.01118.83
8.3.30.0160.00319.10
8.3.20.0000.00820.13
8.3.10.0040.00422.11
8.3.00.0070.00022.59
8.2.180.0100.00716.63
8.2.170.0180.00322.96
8.2.160.0030.01720.57
8.2.150.0080.00024.18
8.2.140.0070.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00517.50
8.2.110.0060.00322.15
8.2.100.0060.00617.97
8.2.90.0080.00018.03
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0000.01117.68
8.2.50.0040.00418.07
8.2.40.0000.00818.09
8.2.30.0000.00818.02
8.2.20.0040.00417.88
8.2.10.0040.00417.82
8.2.00.0080.00017.83
8.1.280.0030.01525.92
8.1.270.0040.00422.04
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00622.55
8.1.230.0080.00320.84
8.1.220.0050.00317.74
8.1.210.0000.00818.97
8.1.200.0000.01117.35
8.1.190.0080.00017.51
8.1.180.0040.00418.69
8.1.170.0040.00418.66
8.1.160.0000.00822.05
8.1.150.0040.00418.80
8.1.140.0040.00417.64
8.1.130.0030.00317.74
8.1.120.0000.00817.67
8.1.110.0000.00817.63
8.1.100.0000.00717.60
8.1.90.0070.00017.50
8.1.80.0000.00717.59
8.1.70.0000.00717.57
8.1.60.0050.00317.78
8.1.50.0040.00417.74
8.1.40.0040.00417.68
8.1.30.0040.00417.73
8.1.20.0040.00417.75
8.1.10.0000.00717.72
8.1.00.0020.00517.64
8.0.300.0080.00020.03
8.0.290.0000.00717.30
8.0.280.0000.00718.51
8.0.270.0050.00317.29
8.0.260.0050.00317.01
8.0.250.0030.00717.11
8.0.240.0020.00517.10
8.0.230.0040.00417.13
8.0.220.0000.00717.11
8.0.210.0030.00317.11
8.0.200.0060.00317.05
8.0.190.0000.00716.95
8.0.180.0000.00717.13
8.0.170.0000.00816.99
8.0.160.0050.00217.16
8.0.150.0000.00717.10
8.0.140.0030.00317.04
8.0.130.0030.00313.42
8.0.120.0040.00416.92
8.0.110.0050.00317.02
8.0.100.0000.00716.97
8.0.90.0040.00416.93
8.0.80.0090.01217.11
8.0.70.0040.00417.11
8.0.60.0040.00417.03
8.0.50.0040.00417.16
8.0.30.0130.00617.19
8.0.20.0120.00817.40
8.0.10.0040.00417.24
8.0.00.0150.02717.00
7.4.330.0020.00215.00
7.4.320.0070.00016.62
7.4.300.0030.00316.65
7.4.290.0040.00416.63
7.4.280.0000.00816.82
7.4.270.0030.00316.68
7.4.260.0040.00416.66
7.4.250.0000.00716.55
7.4.240.0030.00416.80
7.4.230.0030.00316.63
7.4.220.0070.01116.86
7.4.210.0060.00916.85
7.4.200.0040.00416.71
7.4.190.0070.00016.54
7.4.160.0100.01016.76
7.4.150.0120.00617.40
7.4.140.0100.01017.86
7.4.130.0100.01016.88
7.4.120.0090.00816.74
7.4.110.0030.01316.80
7.4.100.0100.00716.62
7.4.90.0070.01316.77
7.4.80.0100.01319.39
7.4.70.0140.00416.54
7.4.60.0060.01516.79
7.4.50.0060.00316.75
7.4.40.0090.00222.77
7.4.30.0130.00316.69
7.4.00.0020.01715.31
7.3.330.0080.00013.49
7.3.320.0050.00013.52
7.3.310.0070.00016.52
7.3.300.0030.00316.33
7.3.290.0120.00416.55
7.3.280.0080.00816.48
7.3.270.0100.00717.40
7.3.260.0130.01216.52
7.3.250.0090.01316.59
7.3.240.0070.01116.67
7.3.230.0100.00716.66
7.3.210.0040.01416.53
7.3.200.0120.01219.39
7.3.190.0090.00916.77
7.3.180.0070.01416.64
7.3.170.0080.00816.70
7.3.160.0130.01016.60
7.3.120.0020.01515.22
7.3.110.0040.01114.96
7.3.100.0070.01014.62
7.3.90.0030.01014.87
7.3.80.0000.01614.73
7.3.70.0040.01115.13
7.3.60.0060.00615.07
7.3.50.0080.00315.16
7.3.40.0060.00614.97
7.3.30.0130.00014.76
7.3.20.0060.00316.81
7.3.10.0120.00416.85
7.3.00.0070.00416.85
7.2.330.0150.00616.78
7.2.320.0110.00716.74
7.2.310.0110.00716.98
7.2.300.0070.01016.85
7.2.290.0030.01316.93
7.2.250.0070.01115.38
7.2.240.0030.01715.25
7.2.230.0030.01515.17
7.2.220.0030.01014.96
7.2.210.0060.00915.18
7.2.200.0000.01015.33
7.2.190.0070.00715.11
7.2.180.0070.01115.34
7.2.170.0030.00615.34
7.2.00.0080.00819.36
7.1.330.0060.00816.09
7.1.320.0130.00015.66
7.1.310.0030.01216.27
7.1.300.0120.00316.15
7.1.290.0000.01415.93
7.1.280.0060.00616.08
7.1.270.0030.00616.04
7.1.260.0040.01115.89
7.1.200.0040.01115.85
7.1.100.0000.00918.12
7.1.70.0070.00317.16
7.1.60.0090.01619.82
7.1.50.0040.01217.05
7.1.00.0030.08722.33
7.0.200.0060.00316.92
7.0.140.0000.08022.08
7.0.60.0100.08320.02
7.0.50.0070.08017.89
7.0.40.0030.09020.05
7.0.30.0130.04320.22
7.0.20.0330.07720.17
7.0.10.0330.07020.17
7.0.00.0070.08320.13
5.6.280.0000.07721.09
5.6.210.0100.08020.47
5.6.200.0100.07018.20
5.6.190.0100.03720.61
5.6.180.0230.03720.77
5.6.170.0330.06720.57
5.6.160.0070.08020.45
5.6.150.0070.05718.25
5.6.140.0030.08318.15
5.6.130.0070.08718.14
5.6.120.0170.07321.05
5.6.110.0170.04721.14
5.6.100.0130.07721.08
5.6.90.0130.04721.11
5.6.80.0070.08020.54
5.6.70.3130.03020.37
5.5.350.0130.08320.43
5.5.340.0030.04317.99
5.5.330.0070.03720.40
5.5.320.0370.06720.28
5.5.310.0300.05720.28
5.5.300.0070.05017.95
5.5.290.0100.07317.98
5.5.280.0070.04020.89
5.5.270.0030.04320.77
5.5.260.0100.07720.83
5.5.250.0070.07320.66
5.5.240.4270.04020.27
5.4.450.0700.04719.17
5.4.440.0900.03319.42
5.4.430.0970.03719.54
5.4.420.0200.04719.54
5.4.410.0500.04019.42
5.4.400.0630.03019.16
5.4.390.0630.03319.14
5.4.380.0530.05718.73
5.4.370.0430.05018.46
5.4.360.0230.06318.80
5.4.350.0370.05318.73
5.4.340.0370.06018.59
5.4.320.0050.03712.50
5.4.310.0060.03812.50
5.4.300.0050.04512.50
5.4.290.0080.03912.50
5.4.280.0080.03512.40
5.4.270.0070.04812.40
5.4.260.0130.04718.65
5.4.250.0170.04718.74
5.4.240.0130.05318.98
5.4.230.0100.07018.81
5.4.220.0100.06319.07
5.4.210.0130.04318.75
5.4.200.0100.04718.92
5.4.190.0130.04718.89
5.4.180.0070.05018.88
5.4.170.0130.05018.90
5.4.160.0030.08718.86
5.4.150.0130.06319.00
5.4.140.0100.04716.55
5.4.130.0030.05016.30
5.4.120.0070.04716.42
5.4.110.0070.05016.44
5.4.100.0100.04716.61
5.4.90.0100.04316.39
5.4.80.0130.05016.32
5.4.70.0070.04716.52
5.4.60.0030.05016.48
5.4.50.0100.04716.36
5.4.40.0070.05016.38
5.4.30.0030.05016.46
5.4.20.0030.05316.43
5.4.10.0130.04716.23
5.4.00.0100.05715.74
5.3.290.0070.03812.80
5.3.280.0030.06314.58
5.3.270.0030.06714.52
5.3.260.0100.06014.60
5.3.250.0100.07314.68
5.3.240.0070.06714.59
5.3.230.0100.04714.58
5.3.220.0100.04314.39
5.3.210.0070.05314.65
5.3.200.0100.05314.64
5.3.190.0100.05014.78
5.3.180.0070.07714.56
5.3.170.0070.05014.64
5.3.160.0100.05014.55
5.3.150.0030.05714.62
5.3.140.0100.04714.69
5.3.130.0100.04714.38
5.3.120.0030.05714.70
5.3.110.0070.06014.63
5.3.100.0100.04713.86
5.3.90.0070.07014.03
5.3.80.0070.07314.00
5.3.70.0230.03314.02
5.3.60.0100.04714.07
5.3.50.0070.05014.04
5.3.40.0130.04313.80
5.3.30.0170.04713.88
5.3.20.0170.05013.78
5.3.10.0130.04313.71
5.3.00.0100.07713.54
5.2.170.0100.03711.04
5.2.160.0100.05311.11
5.2.150.0070.04311.18
5.2.140.0070.06011.04
5.2.130.0070.04011.18
5.2.120.0100.03711.16
5.2.110.0070.05311.22
5.2.100.0030.04011.00
5.2.90.0030.04311.16
5.2.80.0100.05711.16
5.2.70.0070.04011.07
5.2.60.0070.03711.08
5.2.50.0030.04011.11
5.2.40.0100.05011.18
5.2.30.0070.05711.05
5.2.20.0000.05310.96
5.2.10.0100.03311.08
5.2.00.0070.03710.94
5.1.60.0030.03310.23
5.1.50.0100.02710.08
5.1.40.0030.03710.21
5.1.30.0100.03010.32
5.1.20.0070.03310.44
5.1.10.0000.0379.90
5.1.00.0030.03310.06
5.0.50.0030.0278.51
5.0.40.0070.0378.36
5.0.30.0070.0378.19
5.0.20.0070.0238.18
5.0.10.0100.0308.14
5.0.00.0100.0338.13
4.4.90.0070.0176.90
4.4.80.0000.0236.89
4.4.70.0070.0176.89
4.4.60.0000.0236.89
4.4.50.0000.0276.89
4.4.40.0100.0306.89
4.4.30.0000.0236.89
4.4.20.0000.0236.89
4.4.10.0030.0206.89
4.4.00.0000.0336.89
4.3.110.0100.0236.89
4.3.100.0000.0236.89
4.3.90.0070.0176.89
4.3.80.0000.0336.89
4.3.70.0000.0206.89
4.3.60.0000.0276.89
4.3.50.0070.0176.89
4.3.40.0030.0406.89
4.3.30.0030.0206.89
4.3.20.0030.0236.89
4.3.10.0030.0276.89
4.3.00.0130.01314.49

preferences:
47.33 ms | 401 KiB | 5 Q