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 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.0120.00318.34
8.3.50.0120.01022.23
8.3.40.0140.00318.92
8.3.30.0110.00718.96
8.3.20.0040.00420.29
8.3.10.0110.00422.09
8.3.00.0030.00722.50
8.2.180.0120.00316.75
8.2.170.0100.01022.96
8.2.160.0090.00621.02
8.2.150.0090.00024.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0030.00619.61
8.2.110.0070.00322.23
8.2.100.0040.00819.82
8.2.90.0090.00019.16
8.2.80.0060.00318.03
8.2.70.0000.00817.75
8.2.60.0030.00717.93
8.2.50.0000.00818.07
8.2.40.0040.00418.34
8.2.30.0060.00318.09
8.2.20.0040.00417.82
8.2.10.0000.00717.85
8.2.00.0040.00417.78
8.1.280.0140.00325.92
8.1.270.0040.00422.20
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.84
8.1.230.0130.00019.03
8.1.220.0060.00317.77
8.1.210.0040.00418.77
8.1.200.0030.00617.38
8.1.190.0040.00417.41
8.1.180.0080.00018.61
8.1.170.0000.00818.82
8.1.160.0040.00422.01
8.1.150.0030.00518.79
8.1.140.0030.00517.49
8.1.130.0030.00317.82
8.1.120.0000.00717.66
8.1.110.0050.00317.63
8.1.100.0000.00717.53
8.1.90.0030.00417.63
8.1.80.0040.00417.59
8.1.70.0030.00317.50
8.1.60.0050.00317.60
8.1.50.0040.00417.58
8.1.40.0030.00517.55
8.1.30.0000.00817.80
8.1.20.0040.00417.75
8.1.10.0000.00817.57
8.1.00.0000.00817.57
8.0.300.0000.00718.77
8.0.290.0070.00017.04
8.0.280.0050.00318.39
8.0.270.0080.00017.16
8.0.260.0070.00016.98
8.0.250.0030.00517.14
8.0.240.0080.00017.01
8.0.230.0030.00316.94
8.0.220.0070.00016.94
8.0.210.0070.00017.09
8.0.200.0000.00817.15
8.0.190.0070.00017.15
8.0.180.0070.00017.07
8.0.170.0040.00417.07
8.0.160.0000.00716.99
8.0.150.0000.01016.99
8.0.140.0000.00916.91
8.0.130.0050.00013.50
8.0.120.0000.00816.91
8.0.110.0040.00416.94
8.0.100.0050.00316.92
8.0.90.0040.00416.91
8.0.80.0070.01017.01
8.0.70.0030.00516.95
8.0.60.0000.00717.09
8.0.50.0050.00317.00
8.0.30.0140.00517.50
8.0.20.0110.00817.43
8.0.10.0040.00417.07
8.0.00.0130.01016.72
7.4.330.0050.00015.00
7.4.320.0000.00616.72
7.4.300.0030.00316.75
7.4.290.0030.00316.63
7.4.280.0070.00016.81
7.4.270.0050.00316.80
7.4.260.0040.00416.71
7.4.250.0000.00716.61
7.4.240.0060.00216.74
7.4.230.0000.00716.94
7.4.220.0130.00716.77
7.4.210.0080.01116.81
7.4.200.0030.00316.68
7.4.190.0000.00716.89
7.4.160.0110.00516.82
7.4.150.0100.01017.40
7.4.140.0120.00817.86
7.4.130.0060.01116.74
7.4.120.0120.00616.80
7.4.110.0110.00516.63
7.4.100.0160.00616.52
7.4.90.0140.00816.63
7.4.80.0140.01019.39
7.4.70.0100.00716.79
7.4.60.0100.00716.83
7.4.50.0000.00616.68
7.4.40.0070.01022.77
7.4.30.0080.00816.93
7.4.00.0070.01115.29
7.3.330.0040.00413.49
7.3.320.0030.00313.45
7.3.310.0030.00616.52
7.3.300.0030.00316.40
7.3.290.0070.01416.48
7.3.280.0090.00816.52
7.3.270.0130.00717.40
7.3.260.0160.00916.57
7.3.250.0130.00816.64
7.3.240.0120.01216.71
7.3.230.0200.00316.47
7.3.210.0030.01616.45
7.3.200.0070.01019.39
7.3.190.0080.00816.46
7.3.180.0100.00616.58
7.3.170.0000.01716.63
7.3.160.0060.00916.52
7.3.120.0080.00414.96
7.3.10.0030.01316.52
7.3.00.0070.00716.80
7.2.330.0070.01116.91
7.2.320.0090.00916.97
7.2.310.0070.01116.83
7.2.300.0100.01016.90
7.2.290.0080.00816.93
7.2.130.0060.01017.13
7.2.120.0000.01417.18
7.2.110.0150.00017.14
7.2.100.0030.01016.94
7.2.90.0000.01316.98
7.2.80.0080.00416.96
7.2.70.0090.00617.17
7.2.60.0050.00517.21
7.2.50.0070.01017.23
7.2.40.0140.00017.16
7.2.30.0120.00317.07
7.2.20.0140.00317.16
7.2.10.0060.00617.17
7.2.00.0070.00718.19
7.1.250.0000.01116.02
7.1.100.0060.01217.96
7.1.70.0090.00017.36
7.1.60.0110.01419.82
7.1.50.0230.01335.00
7.1.00.0130.07322.37
7.0.200.0110.00616.74
7.0.140.0030.07321.95
7.0.60.0130.03319.91
7.0.50.0000.05317.98
7.0.40.0070.04020.23
7.0.30.0270.07320.26
7.0.20.0400.07020.14
7.0.10.0100.08020.20
7.0.00.0070.07320.24
5.6.280.0070.07020.91
5.6.210.0200.06020.71
5.6.200.0100.08318.23
5.6.190.0070.06020.48
5.6.180.0100.05720.46
5.6.170.0200.05020.55
5.6.160.0130.06720.57
5.6.150.0070.08018.15
5.6.140.0100.04318.18
5.6.130.0070.03718.14
5.6.120.0170.07021.00
5.6.110.0030.07721.05
5.6.100.0100.07721.14
5.6.90.0030.09021.01
5.6.80.0100.07320.41
5.5.350.0030.08020.38
5.5.340.0070.05317.98
5.5.330.0070.06720.25
5.5.320.0230.03720.40
5.5.310.0430.05720.30
5.5.300.0030.04318.04
5.5.290.0030.05718.01
5.5.280.0000.05020.69
5.5.270.0070.05720.89
5.5.260.0030.07720.87
5.5.250.0070.04720.78
5.5.240.0170.06720.16
5.4.450.1130.04319.46
5.4.440.0670.04719.50
5.4.430.0800.04019.64
5.4.420.0700.03019.53
5.4.410.1070.03319.34
5.4.400.0430.04719.14
5.4.390.0370.05018.98
5.4.380.0670.05318.73
5.4.370.0630.06718.72
5.4.360.0400.06718.63
5.4.350.0330.05318.75
5.4.340.0230.06018.83
5.4.320.0100.03312.51
5.4.310.0070.03712.51
5.4.300.0080.03412.50
5.4.290.0070.04012.51
5.4.280.0050.03712.40
5.4.270.0030.04012.40
5.4.260.0100.07018.79
5.4.250.0170.07018.79
5.4.240.0000.06018.79
5.4.230.0100.06318.96
5.4.220.0130.07319.00
5.4.210.0170.04318.96
5.4.200.0070.06319.00
5.4.190.0100.05318.94
5.4.180.0200.04718.93
5.4.170.0070.05318.95
5.4.160.0030.08319.00
5.4.150.0030.05718.97
5.4.140.0130.05316.44
5.4.130.0100.06316.59
5.4.120.0070.05716.59
5.4.110.0070.07016.53
5.4.100.0200.04316.56
5.4.90.0100.05316.71
5.4.80.0100.06716.36
5.4.70.0070.05016.39
5.4.60.0200.04016.46
5.4.50.0030.05316.45
5.4.40.0130.06316.50
5.4.30.0070.07016.50
5.4.20.0070.05016.61
5.4.10.0030.05316.61
5.4.00.0100.06015.84
5.3.290.0090.03712.80
5.3.280.0070.07314.42
5.3.270.0070.05314.59
5.3.260.0170.05714.44
5.3.250.0100.06714.75
5.3.240.0070.07314.59
5.3.230.0000.05714.79
5.3.220.0070.06314.80
5.3.210.0130.04714.65
5.3.200.0170.04714.65
5.3.190.0030.06314.65
5.3.180.0130.06714.72
5.3.170.0200.06314.55
5.3.160.0070.07714.74
5.3.150.0030.06014.70
5.3.140.0100.04714.54
5.3.130.0030.07314.63
5.3.120.0070.05014.68
5.3.110.0100.05014.63
5.3.100.0030.07013.93
5.3.90.0100.06714.10
5.3.80.0170.06013.92
5.3.70.0030.05714.04
5.3.60.0030.05313.90
5.3.50.0070.07314.02
5.3.40.0070.05014.04
5.3.30.0030.05013.92
5.3.20.0000.05713.52
5.3.10.0100.05713.72
5.3.00.0100.07013.86
5.2.170.0000.04711.05
5.2.160.0030.04311.23
5.2.150.0130.03311.24
5.2.140.0100.03711.30
5.2.130.0100.03711.21
5.2.120.0130.04711.19
5.2.110.0070.04011.18
5.2.100.0100.03311.07
5.2.90.0070.06011.23
5.2.80.0030.04311.00
5.2.70.0070.05010.92
5.2.60.0100.06011.13
5.2.50.0070.05710.86
5.2.40.0100.04711.09
5.2.30.0130.05311.05
5.2.20.0100.04011.12
5.2.10.0030.04010.81
5.2.00.0030.05010.94
5.1.60.0000.04010.20
5.1.50.0030.04010.07
5.1.40.0070.03010.18
5.1.30.0030.03710.41
5.1.20.0030.04010.34
5.1.10.0030.03710.31
5.1.00.0000.03710.16
5.0.50.0030.0408.63
5.0.40.0000.0278.48
5.0.30.0000.0478.19
5.0.20.0070.0278.28
5.0.10.0070.0238.41
5.0.00.0070.0378.09
4.4.90.0030.0306.90
4.4.80.0100.0276.90
4.4.70.0030.0306.90
4.4.60.0000.0306.90
4.4.50.0070.0276.90
4.4.40.0070.0306.90
4.4.30.0000.0236.90
4.4.20.0030.0206.90
4.4.10.0000.0236.90
4.4.00.0000.0336.90
4.3.110.0130.0136.90
4.3.100.0030.0236.90
4.3.90.0100.0176.90
4.3.80.0100.0276.90
4.3.70.0070.0206.90
4.3.60.0070.0176.90
4.3.50.0030.0206.90
4.3.40.0000.0436.90
4.3.30.0100.0206.90
4.3.20.0070.0176.90
4.3.10.0000.0276.90
4.3.00.0070.01014.49

preferences:
45.54 ms | 401 KiB | 5 Q