3v4l.org

run code in 300+ PHP versions simultaneously
<?php function OhYea2GunNukesSpamUsingDruszAvatarAndLotsOfHardcodedCrapYOLOSWAGHeyKarlSupMan($input) { $blacklist = array('a-xxx-site-with-spam.com','visual.merriam-webster.com','yet-another-enlarge-your-whatever-spam.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 OhYea2GunNukesSpamUsingDruszAvatarAndLotsOfHardcodedCrapYOLOSWAGHeyKarlSupMan("a spammy one: <img src='http://www.a-xxx-site-with-spam.com/test1.jpg'>\n"); echo OhYea2GunNukesSpamUsingDruszAvatarAndLotsOfHardcodedCrapYOLOSWAGHeyKarlSupMan("a legit one: <img src='http://www.google.com/test1.jpg'>\n"); echo OhYea2GunNukesSpamUsingDruszAvatarAndLotsOfHardcodedCrapYOLOSWAGHeyKarlSupMan("another legit: <img src='http://www.domain.com/test1.jpg'>\n"); echo OhYea2GunNukesSpamUsingDruszAvatarAndLotsOfHardcodedCrapYOLOSWAGHeyKarlSupMan("a spammy: <img src='http://visual.merriam-webster.com/test1.jpg'>\n"); echo OhYea2GunNukesSpamUsingDruszAvatarAndLotsOfHardcodedCrapYOLOSWAGHeyKarlSupMan("a legit: <img src='http://www.example.com/test1.jpg'>\n"); echo OhYea2GunNukesSpamUsingDruszAvatarAndLotsOfHardcodedCrapYOLOSWAGHeyKarlSupMan("and a spammy with http(s): <img src='https://yet-another-enlarge-your-whatever-spam.com/test1.jpg'>\n");

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.0100.01018.39
8.3.50.0150.00722.05
8.3.40.0030.01418.92
8.3.30.0110.00719.05
8.3.20.0030.00620.21
8.3.10.0030.00621.96
8.3.00.0030.00620.51
8.2.180.0210.00016.75
8.2.170.0110.01122.96
8.2.160.0090.00621.06
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0050.00326.16
8.2.120.0040.00817.75
8.2.110.0070.00319.45
8.2.100.0060.00619.89
8.2.90.0060.00319.22
8.2.80.0040.00417.97
8.2.70.0060.00317.88
8.2.60.0040.00718.04
8.2.50.0040.00418.07
8.2.40.0040.00418.22
8.2.30.0000.00818.18
8.2.20.0000.00717.89
8.2.10.0040.00418.04
8.2.00.0080.00017.99
8.1.280.0110.00725.92
8.1.270.0080.00022.25
8.1.260.0000.00726.35
8.1.250.0070.00028.09
8.1.240.0090.00019.40
8.1.230.0060.00619.04
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0070.00317.50
8.1.190.0000.00817.52
8.1.180.0040.00418.65
8.1.170.0030.00518.62
8.1.160.0000.00721.98
8.1.150.0000.00718.81
8.1.140.0000.00817.73
8.1.130.0070.00017.83
8.1.120.0000.00717.71
8.1.110.0040.00417.52
8.1.100.0050.00317.69
8.1.90.0050.00217.54
8.1.80.0070.00017.67
8.1.70.0000.00717.66
8.1.60.0000.01017.69
8.1.50.0000.00817.54
8.1.40.0040.00417.71
8.1.30.0050.00317.85
8.1.20.0040.00417.86
8.1.10.0030.00617.58
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0000.00717.30
8.0.280.0080.00018.40
8.0.270.0040.00417.16
8.0.260.0000.00716.90
8.0.250.0040.00417.02
8.0.240.0040.00417.09
8.0.230.0040.00417.15
8.0.220.0000.00817.05
8.0.210.0040.00417.05
8.0.200.0060.00317.06
8.0.190.0030.00317.14
8.0.180.0070.00017.16
8.0.170.0040.00417.01
8.0.160.0000.00716.94
8.0.150.0050.00316.94
8.0.140.0000.00717.02
8.0.130.0030.00313.48
8.0.120.0080.00016.96
8.0.110.0040.00417.01
8.0.100.0080.00016.97
8.0.90.0000.00817.07
8.0.80.0150.00017.04
8.0.70.0000.00717.14
8.0.60.0030.00517.06
8.0.50.0000.00816.96
8.0.30.0110.00917.46
8.0.20.0090.01217.40
8.0.10.0000.00816.99
8.0.00.0100.01116.87
7.4.330.0050.00015.12
7.4.320.0020.00516.77
7.4.300.0060.00016.88
7.4.290.0000.00816.75
7.4.280.0030.00316.72
7.4.270.0030.00316.73
7.4.260.0000.00716.86
7.4.250.0000.00716.68
7.4.240.0020.00616.79
7.4.230.0040.00416.56
7.4.220.0140.01516.88
7.4.210.0060.00916.85
7.4.200.0000.00716.91
7.4.190.0000.00816.98
7.4.160.0090.00616.82
7.4.150.0090.01017.40
7.4.140.0140.00517.86
7.4.130.0080.01216.97
7.4.120.0080.00916.73
7.4.110.0100.00716.65
7.4.100.0000.01916.66
7.4.90.0100.00816.86
7.4.80.0100.01619.39
7.4.70.0100.00716.69
7.4.60.0130.00816.81
7.4.50.0040.00416.86
7.4.40.0020.01022.77
7.4.30.0180.00316.75
7.4.00.0100.00615.26
7.3.330.0000.00613.48
7.3.320.0030.00313.47
7.3.310.0000.00816.52
7.3.300.0030.00416.46
7.3.290.0090.00516.50
7.3.280.0090.00816.49
7.3.270.0160.01017.40
7.3.260.0150.01016.94
7.3.250.0040.01316.69
7.3.240.0090.01516.61
7.3.230.0040.01316.47
7.3.210.0030.01316.54
7.3.200.0050.01119.39
7.3.190.0120.00916.52
7.3.180.0110.00616.70
7.3.170.0060.01116.84
7.3.160.0080.00816.68
7.3.120.0070.01114.84
7.3.110.0080.00615.16
7.3.100.0070.00715.38
7.3.90.0060.00315.14
7.3.80.0120.00614.87
7.3.70.0040.00814.94
7.3.60.0040.00915.14
7.3.50.0090.00915.12
7.3.40.0070.00714.84
7.3.30.0030.01014.83
7.3.20.0000.01616.82
7.3.10.0050.00516.83
7.3.00.0080.00416.80
7.2.330.0140.00317.01
7.2.320.0120.01516.71
7.2.310.0090.00916.79
7.2.300.0140.00716.91
7.2.290.0030.01416.87
7.2.250.0070.01315.42
7.2.240.0100.01015.43
7.2.230.0070.01015.43
7.2.220.0030.00615.39
7.2.210.0060.01215.23
7.2.200.0100.00315.30
7.2.190.0060.00915.34
7.2.180.0030.00715.10
7.2.170.0040.00815.09
7.2.60.0030.01117.07
7.1.330.0000.01515.69
7.1.320.0060.00316.19
7.1.310.0040.00816.04
7.1.300.0080.00816.13
7.1.290.0030.01315.91
7.1.280.0060.00916.12
7.1.270.0070.00715.77
7.1.260.0040.00716.12
7.1.200.0080.00415.91
7.1.70.0100.00517.22
7.1.60.0030.02219.82
7.1.50.0090.00917.13
7.1.00.0070.07322.38
7.0.200.0170.00717.02
7.0.140.0100.06721.93
7.0.60.0030.09319.93
7.0.50.0070.08017.90
7.0.40.0070.05020.34
7.0.30.0270.07720.25
7.0.20.0200.03720.20
7.0.10.0070.05020.24
7.0.00.0100.04020.27
5.6.280.0070.07020.83
5.6.210.0070.08020.51
5.6.200.0130.03018.22
5.6.190.0100.07020.47
5.6.180.0270.07320.50
5.6.170.0330.07020.45
5.6.160.0100.07720.71
5.6.150.0130.07318.25
5.6.140.0100.05318.26
5.6.130.0030.08718.18
5.6.120.0100.03721.11
5.6.110.0070.07721.02
5.6.100.0100.05320.98
5.6.90.0100.04721.02
5.6.80.0130.08020.35
5.6.70.3270.03020.52
5.5.350.0030.08020.45
5.5.340.0070.07717.95
5.5.330.0030.05020.25
5.5.320.0200.05020.27
5.5.310.0200.09020.34
5.5.300.0070.03717.95
5.5.290.0100.08017.98
5.5.280.0100.07320.87
5.5.270.0070.06320.65
5.5.260.0130.07720.80
5.5.250.0130.07320.69
5.5.240.0070.07720.24
5.4.450.0600.04719.59
5.4.440.0730.05719.41
5.4.430.0570.06319.63
5.4.420.0700.05319.33
5.4.410.0230.05719.45
5.4.400.0830.00018.67
5.4.390.0830.00018.61
5.4.380.0270.05018.78
5.4.370.0200.05718.84
5.4.360.0300.05318.47
5.4.350.0330.05718.61
5.4.340.0330.05318.61
5.4.320.0070.04112.51
5.4.310.0070.03612.50
5.4.300.0050.03812.51
5.4.290.0050.04112.50
5.4.280.0070.03512.40
5.4.270.0050.03712.41
5.4.260.0170.04718.81
5.4.250.0070.05318.98
5.4.240.0030.06018.95
5.4.230.0030.06018.96
5.4.220.0100.05318.99
5.4.210.0100.07018.96
5.4.200.0130.05019.11
5.4.190.0170.06318.96
5.4.180.0230.04718.98
5.4.170.0030.05718.84
5.4.160.0170.06318.75
5.4.150.0070.05718.64
5.4.140.0130.04316.43
5.4.130.0200.04016.57
5.4.120.0100.05016.63
5.4.110.0070.05016.46
5.4.100.0100.04716.68
5.4.90.0170.06016.57
5.4.80.0100.04316.59
5.4.70.0000.05716.37
5.4.60.0100.07316.45
5.4.50.0100.04316.63
5.4.40.0130.06016.50
5.4.30.0100.05016.59
5.4.20.0030.05016.63
5.4.10.0070.06016.47
5.4.00.0070.04715.85
5.3.290.0060.04112.80
5.3.280.0030.06014.58
5.3.270.0100.07714.63
5.3.260.0030.06314.57
5.3.250.0170.06314.43
5.3.240.0130.04014.59
5.3.230.0030.05314.68
5.3.220.0130.05014.39
5.3.210.0000.06314.59
5.3.200.0000.08314.55
5.3.190.0100.04714.57
5.3.180.0070.05714.55
5.3.170.0070.05014.63
5.3.160.0130.04314.70
5.3.150.0130.07314.57
5.3.140.0100.06314.62
5.3.130.0100.06714.63
5.3.120.0200.04714.54
5.3.110.0070.05314.61
5.3.100.0030.06314.00
5.3.90.0000.05714.10
5.3.80.0070.04714.01
5.3.70.0000.05314.10
5.3.60.0130.04014.16
5.3.50.0070.05013.78
5.3.40.0130.04314.04
5.3.30.0100.04313.98
5.3.20.0070.04713.67
5.3.10.0130.06713.63
5.3.00.0030.05013.80
5.2.170.0070.04311.05
5.2.160.0070.05711.31
5.2.150.0070.03711.21
5.2.140.0130.03311.16
5.2.130.0130.03311.10
5.2.120.0100.03311.32
5.2.110.0070.03711.00
5.2.100.0030.04011.15
5.2.90.0070.03710.95
5.2.80.0070.03711.16
5.2.70.0030.04311.16
5.2.60.0070.04011.04
5.2.50.0100.05311.20
5.2.40.0030.05311.23
5.2.30.0030.04310.98
5.2.20.0070.04010.92
5.2.10.0070.03710.92
5.2.00.0100.03310.63
5.1.60.0100.0439.99
5.1.50.0000.0409.84
5.1.40.0070.03010.04
5.1.30.0100.03710.42
5.1.20.0170.02710.41
5.1.10.0130.02710.07
5.1.00.0130.03710.05
5.0.50.0100.0238.63
5.0.40.0030.0378.61
5.0.30.0070.0438.06
5.0.20.0030.0408.23
5.0.10.0030.0338.18
5.0.00.0100.0508.15
4.4.90.0000.0236.90
4.4.80.0000.0236.90
4.4.70.0030.0236.90
4.4.60.0000.0276.90
4.4.50.0100.0136.90
4.4.40.0070.0436.90
4.4.30.0000.0276.90
4.4.20.0070.0176.90
4.4.10.0030.0206.90
4.4.00.0070.0406.90
4.3.110.0030.0336.90
4.3.100.0000.0236.90
4.3.90.0030.0276.90
4.3.80.0100.0276.90
4.3.70.0000.0206.90
4.3.60.0030.0206.90
4.3.50.0030.0236.90
4.3.40.0030.0336.90
4.3.30.0030.0276.90
4.3.20.0000.0236.90
4.3.10.0030.0276.90
4.3.00.0100.0239.30

preferences:
38.66 ms | 401 KiB | 5 Q