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','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 OhYea2GunNukesSpamUsingDruszAvatarAndLotsOfHardcodedCrapYOLOSWAGHeyKarlSupMan('a spammy one: <img src="http://www.a-xxx-site-with-spam.com/test1.jpg">\n'); echo ""; echo OhYea2GunNukesSpamUsingDruszAvatarAndLotsOfHardcodedCrapYOLOSWAGHeyKarlSupMan('a legit one: <img src="http://www.google.com/test1.jpg">'); echo OhYea2GunNukesSpamUsingDruszAvatarAndLotsOfHardcodedCrapYOLOSWAGHeyKarlSupMan('another legit: <img src="http://www.domain.com/test1.jpg">'); echo OhYea2GunNukesSpamUsingDruszAvatarAndLotsOfHardcodedCrapYOLOSWAGHeyKarlSupMan('a spammy: <img src="http://visual.merriam-webster.com/test1.jpg">'); echo OhYea2GunNukesSpamUsingDruszAvatarAndLotsOfHardcodedCrapYOLOSWAGHeyKarlSupMan('a legit: <img src="http://www.example.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.0070.00718.43
8.3.50.0040.01418.27
8.3.40.0110.00718.82
8.3.30.0040.01419.09
8.3.20.0070.00020.39
8.3.10.0110.00721.80
8.3.00.0060.00322.34
8.2.180.0100.00716.88
8.2.170.0100.01022.96
8.2.160.0110.00320.89
8.2.150.0050.00324.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0100.00019.41
8.2.110.0060.00322.35
8.2.100.0080.00419.89
8.2.90.0000.00819.21
8.2.80.0050.00318.04
8.2.70.0000.00817.75
8.2.60.0050.00518.04
8.2.50.0050.00318.07
8.2.40.0040.00418.09
8.2.30.0030.00618.08
8.2.20.0040.00417.89
8.2.10.0000.00817.91
8.2.00.0000.00717.78
8.1.270.0080.00022.18
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0060.00323.88
8.1.230.0080.00419.15
8.1.220.0080.00017.74
8.1.210.0030.00518.77
8.1.200.0070.00317.48
8.1.190.0050.00317.53
8.1.180.0020.00518.56
8.1.170.0030.00518.82
8.1.160.0000.00721.96
8.1.150.0000.00818.74
8.1.140.0040.00417.53
8.1.130.0030.00517.73
8.1.120.0040.00417.59
8.1.110.0040.00417.63
8.1.100.0030.00317.52
8.1.90.0000.00717.67
8.1.80.0050.00217.52
8.1.70.0000.00817.63
8.1.60.0000.00817.77
8.1.50.0000.00817.66
8.1.40.0000.00817.73
8.1.30.0060.00317.74
8.1.20.0040.00417.76
8.1.10.0040.00417.59
8.1.00.0040.00417.50
8.0.300.0080.00018.77
8.0.290.0040.00417.18
8.0.280.0000.00718.36
8.0.270.0040.00417.29
8.0.260.0030.00316.95
8.0.250.0030.00617.15
8.0.240.0050.00217.02
8.0.230.0030.00317.00
8.0.220.0000.00716.88
8.0.210.0000.00717.07
8.0.200.0030.00617.07
8.0.190.0000.00817.07
8.0.180.0000.00717.03
8.0.170.0080.00017.08
8.0.160.0000.00717.04
8.0.150.0030.00516.98
8.0.140.0000.00717.05
8.0.130.0000.00613.54
8.0.120.0040.00417.05
8.0.110.0040.00417.01
8.0.100.0070.00017.04
8.0.90.0040.00416.92
8.0.80.0140.00717.03
8.0.70.0040.00417.08
8.0.60.0040.00417.00
8.0.50.0050.00217.05
8.0.30.0120.01017.16
8.0.20.0130.00717.40
8.0.10.0040.00417.05
8.0.00.0120.00516.92
7.4.330.0000.00515.11
7.4.320.0030.00316.74
7.4.300.0000.00616.71
7.4.290.0070.00016.83
7.4.280.0000.00716.68
7.4.270.0000.00716.84
7.4.260.0070.00316.71
7.4.250.0040.00416.61
7.4.240.0000.00916.81
7.4.230.0000.00716.61
7.4.220.0080.01116.84
7.4.210.0100.00816.79
7.4.200.0070.00016.90
7.4.190.0040.00416.96
7.4.160.0060.00916.53
7.4.150.0100.00717.40
7.4.140.0170.01717.86
7.4.130.0090.00816.76
7.4.120.0070.01016.74
7.4.110.0090.00916.89
7.4.100.0140.00416.65
7.4.90.0090.00916.66
7.4.80.0160.00319.39
7.4.70.0080.01116.91
7.4.60.0140.00416.73
7.4.50.0040.00416.54
7.4.40.0090.00622.77
7.4.30.0090.01216.75
7.4.00.0100.00714.99
7.3.330.0000.00613.52
7.3.320.0000.00513.29
7.3.310.0000.00716.42
7.3.300.0000.00616.58
7.3.290.0100.01016.55
7.3.280.0100.00616.54
7.3.270.0150.00317.40
7.3.260.0080.01116.75
7.3.250.0140.00316.70
7.3.240.0090.00916.61
7.3.230.0070.01016.39
7.3.210.0190.00016.71
7.3.200.0090.01219.39
7.3.190.0090.01216.60
7.3.180.0030.01316.79
7.3.170.0120.00416.62
7.3.160.0060.00916.79
7.3.120.0090.00715.15
7.3.110.0070.01014.88
7.3.100.0030.01015.31
7.3.90.0040.00714.96
7.3.80.0090.00315.01
7.3.70.0120.00315.00
7.3.60.0090.00314.97
7.3.50.0050.00314.70
7.3.40.0100.00315.02
7.3.30.0060.00914.84
7.3.20.0030.01017.01
7.3.10.0130.00316.86
7.3.00.0030.01016.63
7.2.330.0100.00717.10
7.2.320.0120.00616.81
7.2.310.0090.00816.89
7.2.300.0030.01517.04
7.2.290.0140.00416.91
7.2.250.0060.01315.31
7.2.240.0120.00315.43
7.2.230.0120.00315.28
7.2.220.0040.00415.31
7.2.210.0090.00315.20
7.2.200.0070.01015.34
7.2.190.0110.00014.93
7.2.180.0070.01115.40
7.2.170.0030.00915.31
7.2.00.0080.00819.45
7.1.330.0070.00715.90
7.1.320.0050.00516.12
7.1.310.0030.00915.81
7.1.300.0030.01215.89
7.1.290.0080.00016.03
7.1.280.0150.00016.06
7.1.270.0090.00615.66
7.1.260.0300.00316.20
7.1.100.0000.01218.66
7.1.70.0060.00917.39
7.1.60.0040.00717.16
7.1.50.0030.01716.78
7.1.00.0030.07722.30
7.0.200.0000.01517.00
7.0.140.0000.07721.95
7.0.60.0100.08020.05
7.0.50.0070.08017.91
7.0.40.0030.04320.17
7.0.30.0400.04720.28
7.0.20.0300.05320.10
7.0.10.0330.07320.19
7.0.00.0130.04720.11
5.6.280.0100.06721.08
5.6.210.0000.06020.73
5.6.200.0070.03718.29
5.6.190.0030.09020.45
5.6.180.3870.04320.57
5.6.170.0070.05320.51
5.6.160.0100.06320.61
5.6.150.0030.05318.16
5.6.140.0100.04718.13
5.6.130.0070.05018.28
5.6.120.0030.06320.99
5.6.110.0170.05720.99
5.6.100.0070.04021.09
5.6.90.0030.07321.04
5.6.80.0100.07720.43
5.6.70.0300.06020.38
5.5.350.0100.08020.54
5.5.340.0070.07718.00
5.5.330.0100.07720.37
5.5.320.0300.07720.27
5.5.310.0230.06720.34
5.5.300.0030.08317.97
5.5.290.0070.08017.98
5.5.280.0070.04720.77
5.5.270.0200.07320.72
5.5.260.0070.08020.88
5.5.250.0030.04020.71
5.5.240.0200.06320.12
5.4.450.0630.06319.62
5.4.440.0770.07019.41
5.4.430.0170.05019.69
5.4.420.0730.04719.38
5.4.410.0670.05319.06
5.4.400.0930.00018.51
5.4.390.0830.00018.63
5.4.380.0370.05318.57
5.4.370.0330.04718.70
5.4.360.0270.06018.75
5.4.350.0370.04318.75
5.4.340.0300.05318.61
5.4.320.0060.03812.51
5.4.310.0060.03912.50
5.4.300.0070.03712.50
5.4.290.0110.03812.51
5.4.280.0070.04012.40
5.4.270.0070.03412.40
5.4.260.0100.05718.74
5.4.250.0100.05318.64
5.4.240.0100.04718.94
5.4.230.0070.05018.95
5.4.220.0100.05318.74
5.4.210.0070.05318.99
5.4.200.0030.07718.83
5.4.190.0030.05718.98
5.4.180.0130.04318.99
5.4.170.0100.05718.84
5.4.160.0030.05718.96
5.4.150.0100.06318.94
5.4.140.0100.05016.36
5.4.130.0100.04716.38
5.4.120.0070.05016.43
5.4.110.0400.06016.56
5.4.100.0170.04016.38
5.4.90.0030.05016.38
5.4.80.0100.04716.39
5.4.70.0130.04316.36
5.4.60.0100.06016.44
5.4.50.0100.04316.30
5.4.40.0000.05716.48
5.4.30.0170.05716.55
5.4.20.0100.06016.46
5.4.10.0130.05316.58
5.4.00.0000.05315.88
5.3.290.0060.04212.80
5.3.280.0100.04714.77
5.3.270.0030.05714.52
5.3.260.0100.05014.57
5.3.250.0170.06314.59
5.3.240.0170.06714.73
5.3.230.0130.04714.43
5.3.220.0030.05014.63
5.3.210.0130.04714.46
5.3.200.0070.05014.64
5.3.190.0030.07014.65
5.3.180.0030.05314.74
5.3.170.0030.05714.64
5.3.160.0030.07314.54
5.3.150.0070.05014.65
5.3.140.0070.07014.63
5.3.130.0170.04314.56
5.3.120.0230.04314.54
5.3.110.0130.06314.62
5.3.100.0270.04714.11
5.3.90.0170.05314.09
5.3.80.0070.05014.18
5.3.70.0100.06313.92
5.3.60.0130.04714.08
5.3.50.0070.06314.02
5.3.40.0030.05713.93
5.3.30.0100.05013.98
5.3.20.0100.04713.88
5.3.10.0030.05713.87
5.3.00.0130.06013.71
5.2.170.0070.06011.21
5.2.160.0100.03711.12
5.2.150.0030.04310.98
5.2.140.0100.05011.37
5.2.130.0100.04711.27
5.2.120.0130.03711.09
5.2.110.0070.04311.05
5.2.100.0200.03011.32
5.2.90.0100.03711.18
5.2.80.0030.04711.16
5.2.70.0000.04711.16
5.2.60.0070.04011.14
5.2.50.0030.04311.02
5.2.40.0130.03011.09
5.2.30.0100.03311.06
5.2.20.0030.04011.14
5.2.10.0030.04010.94
5.2.00.0030.05310.94
5.1.60.0030.03310.16
5.1.50.0030.03710.05
5.1.40.0000.03710.14
5.1.30.0100.03010.29
5.1.20.0070.03310.39
5.1.10.0100.04310.08
5.1.00.0100.03310.06
5.0.50.0030.0308.54
5.0.40.0030.0278.46
5.0.30.0070.0378.20
5.0.20.0030.0278.28
5.0.10.0100.0208.33
5.0.00.0070.0378.08
4.4.90.0000.0276.90
4.4.80.0030.0206.90
4.4.70.0000.0236.90
4.4.60.0030.0306.90
4.4.50.0070.0206.90
4.4.40.0070.0306.90
4.4.30.0000.0306.90
4.4.20.0000.0306.90
4.4.10.0070.0176.90
4.4.00.0130.0306.90
4.3.110.0000.0236.90
4.3.100.0030.0206.90
4.3.90.0000.0206.90
4.3.80.0000.0336.90
4.3.70.0070.0236.90
4.3.60.0030.0206.90
4.3.50.0000.0236.90
4.3.40.0030.0336.90
4.3.30.0000.0236.90
4.3.20.0000.0236.90
4.3.10.0000.0306.90
4.3.00.0100.0239.30

preferences:
51.95 ms | 400 KiB | 5 Q