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">'); 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.0090.00618.31
8.3.50.0040.01418.19
8.3.40.0070.01118.96
8.3.30.0120.00618.92
8.3.20.0060.00320.33
8.3.10.0100.01021.94
8.3.00.0060.00322.39
8.2.180.0170.00016.88
8.2.170.0090.00922.96
8.2.160.0120.00621.06
8.2.150.0040.00424.18
8.2.140.0030.00724.66
8.2.130.0080.00026.16
8.2.120.0080.00419.48
8.2.110.0060.00322.38
8.2.100.0110.00019.70
8.2.90.0050.00319.28
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0110.00017.80
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0000.00717.98
8.2.20.0040.00417.76
8.2.10.0040.00417.79
8.2.00.0040.00417.83
8.1.270.0000.00822.24
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.98
8.1.230.0040.00718.95
8.1.220.0040.00417.91
8.1.210.0060.00318.77
8.1.200.0060.00317.47
8.1.190.0000.00917.40
8.1.180.0020.00518.58
8.1.170.0050.00318.70
8.1.160.0000.00721.96
8.1.150.0000.00718.73
8.1.140.0080.00017.65
8.1.130.0000.00717.76
8.1.120.0040.00417.55
8.1.110.0030.00517.59
8.1.100.0040.00417.61
8.1.90.0050.00317.63
8.1.80.0040.00417.57
8.1.70.0030.00317.54
8.1.60.0000.00717.67
8.1.50.0060.00317.65
8.1.40.0000.00917.68
8.1.30.0080.00017.80
8.1.20.0000.00717.81
8.1.10.0060.00317.70
8.1.00.0080.00017.60
8.0.300.0040.00418.77
8.0.290.0050.00317.05
8.0.280.0030.00318.48
8.0.270.0030.00517.29
8.0.260.0030.00316.89
8.0.250.0030.00616.83
8.0.240.0070.00017.07
8.0.230.0030.00317.02
8.0.220.0040.00416.96
8.0.210.0040.00416.98
8.0.200.0100.00016.98
8.0.190.0030.00316.99
8.0.180.0050.00317.08
8.0.170.0050.00316.94
8.0.160.0040.00417.11
8.0.150.0040.00316.91
8.0.140.0040.00417.00
8.0.130.0060.00013.44
8.0.120.0080.00017.05
8.0.110.0030.00617.06
8.0.100.0050.00317.12
8.0.90.0030.00617.12
8.0.80.0070.01017.05
8.0.70.0030.00517.10
8.0.60.0000.00817.00
8.0.50.0070.00016.90
8.0.30.0130.01017.44
8.0.20.0150.00517.40
8.0.10.0000.00717.24
8.0.00.0100.01116.82
7.4.330.0030.00315.17
7.4.320.0030.00316.72
7.4.300.0000.00716.76
7.4.290.0040.00416.83
7.4.280.0040.00416.80
7.4.270.0080.00016.71
7.4.260.0070.00016.61
7.4.250.0050.00316.81
7.4.240.0060.00216.74
7.4.230.0070.00016.81
7.4.220.0190.00016.85
7.4.210.0060.01016.78
7.4.200.0030.00316.93
7.4.190.0050.00216.87
7.4.160.0060.01516.82
7.4.150.0140.00317.40
7.4.140.0130.00417.86
7.4.130.0100.00816.63
7.4.120.0110.00616.72
7.4.110.0060.01216.74
7.4.100.0170.00716.91
7.4.90.0130.00416.80
7.4.80.0100.00719.39
7.4.70.0120.00616.74
7.4.60.0100.00716.86
7.4.50.0030.00616.79
7.4.40.0030.01322.77
7.4.30.0140.00716.67
7.4.00.0060.00915.04
7.3.330.0030.00513.39
7.3.320.0030.00313.29
7.3.310.0000.00716.38
7.3.300.0060.00016.40
7.3.290.0080.00816.55
7.3.280.0140.00616.52
7.3.270.0070.01117.40
7.3.260.0080.01216.53
7.3.250.0130.00716.73
7.3.240.0090.00916.66
7.3.230.0220.00016.61
7.3.210.0080.00816.50
7.3.200.0070.01019.39
7.3.190.0180.00016.62
7.3.180.0110.00516.80
7.3.170.0110.00616.65
7.3.160.0090.00616.50
7.3.120.0070.01114.80
7.2.330.0060.01216.82
7.2.320.0090.00916.70
7.2.310.0180.00016.84
7.2.300.0070.01316.84
7.2.290.0060.01016.93
7.2.00.0110.00719.77
7.1.100.0030.00718.47
7.1.70.0070.01017.49
7.1.60.0150.00415.66
7.1.50.0040.01817.25
7.1.00.0030.07322.56
7.0.200.0000.01116.93
7.0.140.0030.06721.97
7.0.60.0070.08019.84
7.0.50.0130.07317.76
7.0.40.0100.07320.19
7.0.30.0330.05320.10
7.0.20.0270.05720.18
7.0.10.0100.07020.30
7.0.00.0200.06720.09
5.6.280.0030.07321.12
5.6.210.0030.08020.55
5.6.200.0030.08318.19
5.6.190.0070.08020.52
5.6.180.2700.04020.55
5.6.170.0300.04720.54
5.6.160.0070.08020.52
5.6.150.0000.08718.28
5.6.140.0030.09018.18
5.6.130.0000.05318.18
5.6.120.0070.03720.99
5.6.110.0130.03721.03
5.6.100.0070.05721.01
5.6.90.0100.08020.95
5.6.80.0070.08720.37
5.6.70.4530.04020.53
5.5.350.0100.07020.45
5.5.340.0100.07718.06
5.5.330.0070.08020.19
5.5.320.0230.06320.20
5.5.310.0330.07320.32
5.5.300.0000.04017.91
5.5.290.0070.05317.98
5.5.280.0200.06320.95
5.5.270.0000.04320.96
5.5.260.0100.08020.81
5.5.250.0070.06020.55
5.5.240.0300.06020.26
5.4.450.0070.06019.48
5.4.440.0600.06019.21
5.4.430.0600.07019.46
5.4.420.0500.06019.19
5.4.410.0600.05719.18
5.4.400.1530.00018.81
5.4.390.1900.00018.80
5.4.380.0300.05018.81
5.4.370.0300.05718.72
5.4.360.0430.03718.78
5.4.350.0270.05318.80
5.4.340.0270.05318.76
5.4.320.0050.03812.51
5.4.310.0050.03912.51
5.4.300.0050.03812.50
5.4.290.0060.04112.50
5.4.280.0060.03512.40
5.4.270.0070.03812.40
5.4.260.0100.05318.94
5.4.250.0100.06718.93
5.4.240.0170.05019.09
5.4.230.0170.05718.93
5.4.220.0130.07319.02
5.4.210.0100.06018.79
5.4.200.0130.05318.90
5.4.190.0070.05318.79
5.4.180.0100.05718.98
5.4.170.0100.05319.09
5.4.160.0130.04719.07
5.4.150.0100.05318.77
5.4.140.0170.06016.36
5.4.130.0030.07716.58
5.4.120.0030.06316.41
5.4.110.0100.05016.57
5.4.100.0100.06316.57
5.4.90.0100.04716.54
5.4.80.0100.04316.45
5.4.70.0000.06016.47
5.4.60.0030.05316.31
5.4.50.0100.05016.31
5.4.40.0030.05316.50
5.4.30.0170.04716.54
5.4.20.0100.05016.37
5.4.10.0100.04716.34
5.4.00.0030.05315.77
5.3.290.0050.04412.80
5.3.280.0200.05714.58
5.3.270.0070.06014.59
5.3.260.0070.05314.51
5.3.250.0130.05014.69
5.3.240.0070.07314.78
5.3.230.0200.05714.67
5.3.220.0070.05714.47
5.3.210.0070.05714.63
5.3.200.0100.04714.73
5.3.190.0130.04314.39
5.3.180.0030.05314.56
5.3.170.0130.04314.65
5.3.160.0070.05014.41
5.3.150.0030.05714.65
5.3.140.0130.06014.73
5.3.130.0100.05014.61
5.3.120.0030.05314.52
5.3.110.0100.04714.63
5.3.100.0030.05314.13
5.3.90.0000.06014.10
5.3.80.0000.05714.00
5.3.70.0000.05714.12
5.3.60.0070.05313.90
5.3.50.0070.05013.78
5.3.40.0170.06314.13
5.3.30.0100.05713.88
5.3.20.0030.06313.87
5.3.10.0170.05013.73
5.3.00.0130.06313.54
5.2.170.0030.04710.98
5.2.160.0070.04311.32
5.2.150.0070.04311.21
5.2.140.0070.05711.31
5.2.130.0070.04711.13
5.2.120.0070.05011.06
5.2.110.0130.05010.93
5.2.100.0070.05011.17
5.2.90.0100.03711.07
5.2.80.0100.03711.16
5.2.70.0070.04011.16
5.2.60.0100.03311.01
5.2.50.0030.04011.19
5.2.40.0100.03311.09
5.2.30.0070.05311.05
5.2.20.0030.04011.05
5.2.10.0030.04010.82
5.2.00.0030.05010.80
5.1.60.0130.04710.01
5.1.50.0100.0339.93
5.1.40.0100.0339.96
5.1.30.0070.03710.32
5.1.20.0070.03310.18
5.1.10.0000.04710.14
5.1.00.0130.0279.99
5.0.50.0000.0308.63
5.0.40.0030.0278.51
5.0.30.0030.0438.29
5.0.20.0070.0338.14
5.0.10.0030.0278.13
5.0.00.0000.0438.18
4.4.90.0030.0306.90
4.4.80.0070.0176.90
4.4.70.0030.0206.90
4.4.60.0030.0206.90
4.4.50.0000.0236.90
4.4.40.0030.0306.90
4.4.30.0030.0206.90
4.4.20.0030.0206.90
4.4.10.0000.0236.90
4.4.00.0030.0336.90
4.3.110.0070.0176.90
4.3.100.0000.0276.90
4.3.90.0030.0206.90
4.3.80.0000.0336.90
4.3.70.0000.0306.90
4.3.60.0000.0236.90
4.3.50.0000.0336.90
4.3.40.0030.0476.90
4.3.30.0000.0236.90
4.3.20.0030.0206.90
4.3.10.0030.0206.90
4.3.00.0130.0309.30

preferences:
42.67 ms | 400 KiB | 5 Q