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"> spammy'); echo '\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.0150.00018.55
8.3.50.0110.01222.11
8.3.40.0140.00718.97
8.3.30.0000.01619.04
8.3.20.0070.00020.16
8.3.10.0040.00422.07
8.3.00.0080.00022.42
8.2.180.0080.00816.38
8.2.170.0100.00322.96
8.2.160.0110.00321.13
8.2.150.0080.00024.18
8.2.140.0030.00524.66
8.2.130.0000.00726.16
8.2.120.0100.00517.50
8.2.110.0030.00722.23
8.2.100.0080.00419.70
8.2.90.0080.00019.22
8.2.80.0080.00017.97
8.2.70.0090.00017.75
8.2.60.0030.00618.02
8.2.50.0090.00018.07
8.2.40.0060.00318.16
8.2.30.0040.00418.02
8.2.20.0050.00317.73
8.2.10.0000.00818.02
8.2.00.0020.00517.78
8.1.280.0150.00025.92
8.1.270.0080.00022.19
8.1.260.0050.00226.35
8.1.250.0080.00028.09
8.1.240.0040.00423.91
8.1.230.0070.00418.95
8.1.220.0080.00017.76
8.1.210.0000.00818.77
8.1.200.0090.00017.38
8.1.190.0050.00317.53
8.1.180.0080.00018.57
8.1.170.0050.00418.59
8.1.160.0000.00821.96
8.1.150.0040.00418.79
8.1.140.0000.00817.59
8.1.130.0050.00317.87
8.1.120.0030.00417.67
8.1.110.0000.00817.65
8.1.100.0000.00717.62
8.1.90.0040.00417.66
8.1.80.0040.00417.63
8.1.70.0030.00317.58
8.1.60.0040.00417.79
8.1.50.0080.00017.60
8.1.40.0030.00517.57
8.1.30.0040.00417.77
8.1.20.0040.00417.78
8.1.10.0040.00417.71
8.1.00.0030.00517.60
8.0.300.0000.00818.77
8.0.290.0040.00417.18
8.0.280.0000.00818.35
8.0.270.0050.00317.29
8.0.260.0070.00017.02
8.0.250.0060.00316.97
8.0.240.0000.00717.13
8.0.230.0030.00617.19
8.0.220.0030.00317.08
8.0.210.0000.00717.08
8.0.200.0030.00517.19
8.0.190.0040.00417.10
8.0.180.0040.00417.05
8.0.170.0060.00317.10
8.0.160.0040.00417.09
8.0.150.0040.00417.06
8.0.140.0080.00017.02
8.0.130.0030.00313.52
8.0.120.0080.00016.98
8.0.110.0040.00417.05
8.0.100.0080.00016.90
8.0.90.0000.00716.95
8.0.80.0100.00617.05
8.0.70.0040.00416.85
8.0.60.0000.00716.85
8.0.50.0040.00416.93
8.0.30.0150.00717.49
8.0.20.0110.01117.52
8.0.10.0000.00817.01
8.0.00.0080.01217.01
7.4.330.0000.00615.24
7.4.320.0000.00716.70
7.4.300.0000.00616.59
7.4.290.0000.00716.85
7.4.280.0080.00016.58
7.4.270.0070.00016.81
7.4.260.0000.00716.85
7.4.250.0000.00716.77
7.4.240.0030.00516.80
7.4.230.0040.00416.57
7.4.220.0180.00916.69
7.4.210.0060.00916.83
7.4.200.0040.00416.57
7.4.190.0040.00416.96
7.4.160.0090.00616.72
7.4.150.0070.01017.40
7.4.140.0120.00917.86
7.4.130.0080.00916.77
7.4.120.0040.01316.75
7.4.110.0120.00616.63
7.4.100.0150.00916.55
7.4.90.0120.00616.66
7.4.80.0080.01019.39
7.4.70.0080.00816.57
7.4.60.0090.00916.73
7.4.50.0030.00516.48
7.4.40.0110.00322.77
7.4.30.0070.01016.53
7.4.00.0050.00515.11
7.3.330.0000.00813.53
7.3.320.0030.00313.34
7.3.310.0030.00316.57
7.3.300.0000.00616.57
7.3.290.0070.00716.46
7.3.280.0090.00716.53
7.3.270.0070.01117.40
7.3.260.0160.00616.55
7.3.250.0080.00816.61
7.3.240.0070.01616.75
7.3.230.0090.01316.74
7.3.210.0070.01016.52
7.3.200.0040.01219.39
7.3.190.0120.00616.86
7.3.180.0170.00316.57
7.3.170.0110.00516.71
7.3.160.0120.00316.72
7.3.120.0040.01115.27
7.2.330.0150.00316.91
7.2.320.0110.00716.85
7.2.310.0090.00916.78
7.2.300.0070.01016.91
7.2.290.0100.00716.87
7.2.00.0000.01819.61
7.1.100.0030.01018.37
7.1.70.0000.00817.49
7.1.60.0130.01319.82
7.1.50.0040.02117.29
7.1.00.0030.07722.47
7.0.200.0180.00616.96
7.0.140.0030.07722.19
7.0.60.0030.07020.04
7.0.50.0070.08317.82
7.0.40.0070.08020.26
7.0.30.0230.08320.18
7.0.20.0370.07020.18
7.0.10.0300.07720.08
7.0.00.0200.07320.25
5.6.280.0000.07321.15
5.6.210.0100.06020.48
5.6.200.0200.07018.16
5.6.190.0130.08720.68
5.6.180.4070.04720.63
5.6.170.0400.06020.48
5.6.160.0100.07720.48
5.6.150.0030.04018.19
5.6.140.0130.05718.22
5.6.130.0070.08018.11
5.6.120.0070.08321.13
5.6.110.0130.08321.00
5.6.100.0030.04020.98
5.6.90.0030.08320.98
5.6.80.0030.08320.37
5.5.350.0030.08020.47
5.5.340.0030.04017.95
5.5.330.0130.04720.13
5.5.320.0300.07320.14
5.5.310.0270.09020.28
5.5.300.0100.03317.96
5.5.290.0030.05718.03
5.5.280.0130.05720.99
5.5.270.0070.07020.80
5.5.260.0030.08720.78
5.5.250.0000.04320.59
5.5.240.0100.07720.15
5.4.450.0670.05319.45
5.4.440.0430.05719.38
5.4.430.0200.04719.46
5.4.420.0170.05019.47
5.4.410.0330.06019.32
5.4.400.0800.00018.81
5.4.390.0770.00018.80
5.4.380.0300.04718.79
5.4.370.0500.05318.75
5.4.360.0400.04318.61
5.4.350.0370.05018.79
5.4.340.0370.05018.54
5.4.320.0050.04212.50
5.4.310.0050.05212.51
5.4.300.0050.03812.51
5.4.290.0100.03312.50
5.4.280.0080.03212.40
5.4.270.0050.03612.41
5.4.260.0030.08018.81
5.4.250.0130.05019.04
5.4.240.0170.07018.80
5.4.230.0130.04719.10
5.4.220.0200.04319.10
5.4.210.0070.06018.84
5.4.200.0170.04318.95
5.4.190.0130.06019.00
5.4.180.0030.06019.09
5.4.170.0170.04319.02
5.4.160.0270.04019.08
5.4.150.0070.06018.79
5.4.140.0200.04316.43
5.4.130.0100.05316.39
5.4.120.0130.05016.55
5.4.110.0070.07016.44
5.4.100.0070.05316.42
5.4.90.0170.04016.39
5.4.80.0100.04716.69
5.4.70.0100.05316.37
5.4.60.0100.06016.39
5.4.50.0100.04716.46
5.4.40.0130.04316.50
5.4.30.0100.06016.35
5.4.20.0130.05716.39
5.4.10.0230.06016.62
5.4.00.0130.06715.84
5.3.290.0040.04112.80
5.3.280.0170.04314.75
5.3.270.0130.07014.62
5.3.260.0130.04714.74
5.3.250.0070.06714.59
5.3.240.0070.05314.62
5.3.230.0130.07014.68
5.3.220.0100.05314.47
5.3.210.0070.05314.65
5.3.200.0070.06314.74
5.3.190.0200.04014.64
5.3.180.0070.05014.69
5.3.170.0070.05014.70
5.3.160.0130.07014.65
5.3.150.0170.06714.39
5.3.140.0070.05014.71
5.3.130.0030.05714.46
5.3.120.0030.05714.63
5.3.110.0070.05714.54
5.3.100.0070.06013.87
5.3.90.0130.05714.18
5.3.80.0100.06714.00
5.3.70.0100.06314.02
5.3.60.0130.05313.99
5.3.50.0230.05714.04
5.3.40.0070.05014.11
5.3.30.0100.04713.73
5.3.20.0100.04313.77
5.3.10.0100.06013.83
5.3.00.0100.05013.71
5.2.170.0100.05311.28
5.2.160.0100.03711.37
5.2.150.0100.04011.22
5.2.140.0100.05011.37
5.2.130.0100.03311.19
5.2.120.0130.03311.27
5.2.110.0130.05011.19
5.2.100.0030.04011.32
5.2.90.0100.03711.18
5.2.80.0100.03711.17
5.2.70.0070.04011.25
5.2.60.0100.03711.14
5.2.50.0100.03711.10
5.2.40.0070.04310.99
5.2.30.0070.06011.07
5.2.20.0030.04010.91
5.2.10.0030.04010.94
5.2.00.0030.04010.80
5.1.60.0070.0379.98
5.1.50.0070.03310.04
5.1.40.0070.03310.13
5.1.30.0130.02710.41
5.1.20.0000.04310.32
5.1.10.0030.0379.99
5.1.00.0070.03310.13
5.0.50.0030.0308.54
5.0.40.0000.0308.48
5.0.30.0030.0438.20
5.0.20.0030.0308.27
5.0.10.0030.0278.27
5.0.00.0030.0438.25
4.4.90.0070.0177.17
4.4.80.0030.0277.17
4.4.70.0070.0177.17
4.4.60.0030.0207.17
4.4.50.0070.0177.17
4.4.40.0030.0307.17
4.4.30.0000.0237.17
4.4.20.0000.0237.17
4.4.10.0000.0237.17
4.4.00.0030.0307.17
4.3.110.0070.0277.17
4.3.100.0000.0237.17
4.3.90.0070.0277.17
4.3.80.0030.0307.17
4.3.70.0000.0277.17
4.3.60.0070.0237.17
4.3.50.0100.0137.17
4.3.40.0070.0307.17
4.3.30.0000.0237.17
4.3.20.0000.0237.17
4.3.10.0070.0237.17
4.3.00.0030.0239.31

preferences:
49.48 ms | 400 KiB | 5 Q