3v4l.org

run code in 300+ PHP versions simultaneously
<?php function NukesSpam($input) { $blacklist = array('don.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.0120.00318.56
8.3.50.0180.00321.99
8.3.40.0000.01518.79
8.3.30.0150.00419.04
8.3.20.0080.00020.33
8.3.10.0060.00322.09
8.3.00.0070.00022.50
8.2.180.0060.01116.63
8.2.170.0110.00422.96
8.2.160.0100.00720.35
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0110.00017.75
8.2.110.0100.00022.25
8.2.100.0120.00017.84
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0040.00417.75
8.2.60.0030.00617.80
8.2.50.0000.00818.07
8.2.40.0040.00418.34
8.2.30.0040.00418.02
8.2.20.0050.00317.84
8.2.10.0060.00317.91
8.2.00.0000.00817.91
8.1.280.0130.00325.92
8.1.270.0060.00322.07
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0040.00423.97
8.1.230.0040.00719.17
8.1.220.0040.00417.78
8.1.210.0030.00518.77
8.1.200.0030.00617.60
8.1.190.0050.00317.30
8.1.180.0040.00418.58
8.1.170.0080.00018.76
8.1.160.0040.00422.05
8.1.150.0000.00718.77
8.1.140.0040.00417.68
8.1.130.0000.00717.88
8.1.120.0040.00417.52
8.1.110.0000.00817.57
8.1.100.0000.00717.70
8.1.90.0070.00017.55
8.1.80.0050.00317.64
8.1.70.0050.00317.51
8.1.60.0030.00617.65
8.1.50.0000.00817.58
8.1.40.0050.00217.67
8.1.30.0030.00617.73
8.1.20.0030.00617.87
8.1.10.0040.00417.67
8.1.00.0040.00417.66
8.0.300.0000.00718.77
8.0.290.0000.00717.05
8.0.280.0030.00318.36
8.0.270.0040.00417.20
8.0.260.0000.00618.55
8.0.250.0040.00417.14
8.0.240.0000.00816.98
8.0.230.0030.00317.16
8.0.220.0000.00717.06
8.0.210.0030.00317.01
8.0.200.0050.00517.04
8.0.190.0070.00017.08
8.0.180.0000.00817.06
8.0.170.0050.00516.99
8.0.160.0040.00417.13
8.0.150.0040.00417.04
8.0.140.0000.00817.05
8.0.130.0000.00513.47
8.0.120.0000.00817.04
8.0.110.0050.00316.92
8.0.100.0070.00017.01
8.0.90.0020.00516.89
8.0.80.0030.01217.11
8.0.70.0050.00216.93
8.0.60.0000.00816.91
8.0.50.0040.00417.16
8.0.30.0040.01717.21
8.0.20.0130.00717.40
8.0.10.0030.00617.17
8.0.00.0110.00817.06
7.4.330.0050.00015.00
7.4.320.0000.00616.81
7.4.300.0040.00416.63
7.4.290.0050.00316.82
7.4.280.0040.00416.72
7.4.270.0000.00716.87
7.4.260.0080.00016.78
7.4.250.0000.00716.80
7.4.240.0040.00416.79
7.4.230.0050.00216.89
7.4.220.0140.00416.75
7.4.210.0060.00816.78
7.4.200.0070.00016.75
7.4.190.0050.00216.73
7.4.160.0080.00816.74
7.4.150.0130.01017.40
7.4.140.0120.00817.86
7.4.130.0050.01216.74
7.4.120.0100.00716.59
7.4.110.0100.00716.66
7.4.100.0080.01016.66
7.4.90.0130.00316.58
7.4.80.0120.01019.39
7.4.70.0080.00816.75
7.4.60.0120.00616.88
7.4.50.0030.00516.55
7.4.40.0110.00722.77
7.4.30.0060.01116.73
7.4.00.0120.00315.39
7.3.330.0070.00013.44
7.3.320.0050.00013.38
7.3.310.0040.00416.56
7.3.300.0070.00016.43
7.3.290.0050.01216.49
7.3.280.0110.00716.54
7.3.270.0190.00317.40
7.3.260.0070.01716.56
7.3.250.0110.01116.57
7.3.240.0140.00616.78
7.3.230.0120.00616.54
7.3.210.0070.01016.57
7.3.200.0100.01019.39
7.3.190.0170.00016.61
7.3.180.0060.01116.75
7.3.170.0060.01216.78
7.3.160.0100.01316.58
7.3.120.0030.01214.99
7.2.330.0120.00616.89
7.2.320.0090.01216.80
7.2.310.0090.01216.85
7.2.300.0160.00716.80
7.2.290.0100.00616.74
7.2.60.0030.01016.96
7.1.200.0080.00615.53
7.1.70.0000.00917.08
7.1.60.0150.00619.82
7.1.50.0130.00917.22
7.1.00.0070.08722.34
7.0.200.0000.00816.88
7.0.140.0100.06022.04
7.0.110.0030.04319.98
7.0.100.0270.04320.11
7.0.90.0270.04319.86
7.0.80.0100.05019.94
7.0.70.0170.03719.90
7.0.60.0100.05020.02
7.0.50.0370.07719.93
7.0.40.0070.05319.74
7.0.30.0070.07019.67
7.0.20.0100.07019.67
7.0.10.0000.05319.77
7.0.00.0070.05319.74
5.6.280.0070.07020.86
5.6.260.0100.04720.68
5.6.250.0070.06020.66
5.6.240.0130.07320.72
5.6.230.0030.04020.55
5.6.220.0100.03720.68
5.6.210.0130.04720.71
5.6.200.0070.05720.70
5.6.190.0030.09320.56
5.6.180.0000.04720.66
5.6.170.0100.07720.64
5.6.160.0100.06720.57
5.6.150.0100.03720.59
5.6.140.0070.05720.70
5.6.130.0100.06320.66
5.6.120.0030.04320.46
5.6.110.0030.04320.61
5.6.100.0000.04720.64
5.6.90.0070.03720.67
5.6.80.0030.04020.04
5.6.70.0030.03720.23
5.6.60.0030.06020.02
5.6.50.0000.04320.00
5.6.40.0030.04020.07
5.6.30.0030.04019.92
5.6.20.0100.03319.94
5.6.10.0000.04019.82
5.6.00.0000.04319.97
5.5.380.0000.04317.54
5.5.370.0100.04017.56
5.5.360.0000.04317.68
5.5.350.0170.05017.65
5.5.340.0100.04718.13
5.5.330.0100.06718.10
5.5.320.0070.04318.20
5.5.310.0100.03718.12
5.5.300.0100.07318.13
5.5.290.0070.07718.25
5.5.280.0030.06318.09
5.5.270.0070.05018.09
5.5.260.0000.04318.22
5.5.250.0030.04017.91
5.5.240.0000.04017.32
5.5.230.0000.03717.52
5.5.220.0000.04017.28
5.5.210.0030.03317.30
5.5.200.0070.03017.27
5.5.190.0100.03317.60
5.5.180.0000.04317.44
5.5.160.0030.03717.58
5.5.150.0030.04017.45
5.5.140.0000.04317.28
5.5.130.0070.03017.47
5.5.120.0070.06317.58
5.5.110.0000.04017.60
5.5.100.0070.04017.33
5.5.90.0030.03717.34
5.5.80.0000.04017.30
5.5.70.0000.04717.38
5.5.60.0130.07017.46
5.5.50.0070.05317.18
5.5.40.0070.03317.34
5.5.30.0100.06317.07
5.5.20.0200.06317.36
5.5.10.0000.04017.16
5.5.00.0070.06717.16
5.4.450.0100.05019.66
5.4.440.0070.03719.66
5.4.430.0000.04319.33
5.4.420.0030.03719.63
5.4.410.0030.04019.17
5.4.400.0070.04319.34
5.4.390.0170.03319.16
5.4.380.0030.05018.97
5.4.370.0000.04319.00
5.4.360.0100.03018.98
5.4.350.0000.04019.02
5.4.340.0100.03318.92
5.4.320.0000.04019.15
5.4.310.0100.03718.97
5.4.300.0030.04019.32
5.4.290.0000.04319.15
5.4.280.0000.05018.94
5.4.270.0070.04319.14
5.4.260.0030.06019.32
5.4.250.0070.07719.17
5.4.240.0070.08019.21
5.4.230.0070.07319.21
5.4.220.0000.06719.32
5.4.210.0130.06718.98
5.4.200.0130.07319.32
5.4.190.0030.08318.95
5.4.180.0070.07719.17
5.4.170.0070.07319.01
5.4.160.0030.06719.29
5.4.150.0070.05318.94
5.4.140.0000.04316.54
5.4.130.0000.04316.34
5.4.120.0070.03716.30
5.4.110.0100.07016.31
5.4.100.0130.06716.51
5.4.90.0070.07016.62
5.4.80.0070.04016.66
5.4.70.0030.03316.58
5.4.60.0100.05316.44
5.4.50.0100.05016.43
5.4.40.0130.06316.55
5.4.30.0100.06016.34
5.4.20.0100.08016.49
5.4.10.0030.05316.38
5.4.00.0070.07315.77
5.3.290.0070.05014.75
5.3.280.0000.06314.60
5.3.270.0100.07014.75
5.3.260.0070.04014.59
5.3.250.0030.03714.59
5.3.240.0130.03014.62
5.3.230.0030.04314.57
5.3.220.0000.06314.79
5.3.210.0130.06714.70
5.3.200.0000.04014.52
5.3.190.0030.07314.70
5.3.180.0030.05014.57
5.3.170.0100.02714.59
5.3.160.0070.04314.79
5.3.150.0130.06014.64
5.3.140.0070.06314.56
5.3.130.0070.07314.50
5.3.120.0100.08014.69
5.3.110.0170.07014.53
5.3.100.0070.06713.89
5.3.90.0100.07014.03
5.3.80.0130.06714.09
5.3.70.0100.06314.06
5.3.60.0070.07714.03
5.3.50.0070.07314.05
5.3.40.0200.05714.07
5.3.30.0000.04713.88
5.3.20.0070.04013.64
5.3.10.0030.07313.67
5.3.00.0000.06013.73
5.2.170.0070.03011.13
5.2.160.0070.04311.16
5.2.150.0030.05011.14
5.2.140.0070.06011.16
5.2.130.0030.04711.17
5.2.120.0030.05711.16
5.2.110.0030.05011.09
5.2.100.0070.03011.19
5.2.90.0030.03711.16
5.2.80.0070.06011.06
5.2.70.0030.07311.17
5.2.60.0030.05711.14
5.2.50.0070.02311.01
5.2.40.0070.06011.23
5.2.30.0070.04710.95
5.2.20.0030.05710.82
5.2.10.0030.04310.87
5.2.00.0030.03710.79
5.1.60.0000.0279.96
5.1.50.0000.04010.24
5.1.40.0030.0409.94
5.1.30.0030.02310.30
5.1.20.0000.02710.57
5.1.10.0000.03010.23
5.1.00.0070.0579.89
5.0.50.0000.0279.24
5.0.40.0030.0409.24
5.0.30.0000.0509.24
5.0.20.0000.0209.24
5.0.10.0000.0239.24
5.0.00.0000.0339.24
4.4.90.0000.0179.24
4.4.80.0030.0239.24
4.4.70.0000.0179.24
4.4.60.0000.0339.24
4.4.50.0000.0279.24
4.4.40.0000.0279.24
4.4.30.0000.0179.24
4.4.20.0030.0309.24
4.4.10.0070.0309.24
4.4.00.0000.0379.24
4.3.110.0000.0339.24
4.3.100.0000.0239.24
4.3.90.0030.0109.24
4.3.80.0000.0409.24
4.3.70.0000.0209.24
4.3.60.0030.0139.24
4.3.50.0030.0339.24
4.3.40.0000.0479.24
4.3.30.0000.0209.24
4.3.20.0000.0139.24
4.3.10.0000.0179.24
4.3.00.0000.0309.24

preferences:
46.27 ms | 401 KiB | 5 Q