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">\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');

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.56
8.3.50.0090.00618.30
8.3.40.0070.01118.92
8.3.30.0070.01119.10
8.3.20.0040.00420.30
8.3.10.0050.00321.90
8.3.00.0040.00422.25
8.2.180.0090.00616.88
8.2.170.0060.00922.96
8.2.160.0050.00921.00
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0110.00017.75
8.2.110.0090.00022.14
8.2.100.0120.00019.76
8.2.90.0040.00418.96
8.2.80.0080.00017.97
8.2.70.0060.00317.75
8.2.60.0060.00618.04
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0030.00618.04
8.2.20.0080.00017.70
8.2.10.0040.00417.84
8.2.00.0000.00717.89
8.1.280.0090.01225.92
8.1.270.0000.00723.99
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0070.00323.64
8.1.230.0040.00719.02
8.1.220.0000.00817.79
8.1.210.0080.00018.77
8.1.200.0030.00617.35
8.1.190.0040.00417.41
8.1.180.0080.00018.57
8.1.170.0050.00318.76
8.1.160.0040.00422.00
8.1.150.0070.00018.79
8.1.140.0000.00717.52
8.1.130.0000.00817.73
8.1.120.0000.00717.61
8.1.110.0030.00517.63
8.1.100.0040.00417.61
8.1.90.0000.00717.63
8.1.80.0040.00417.65
8.1.70.0070.00017.59
8.1.60.0030.00617.73
8.1.50.0050.00317.69
8.1.40.0000.00717.65
8.1.30.0000.00817.80
8.1.20.0000.00817.71
8.1.10.0020.00517.55
8.1.00.0050.00317.59
8.0.300.0000.00718.77
8.0.290.0040.00417.30
8.0.280.0070.00018.52
8.0.270.0040.00417.35
8.0.260.0040.00416.98
8.0.250.0080.00317.14
8.0.240.0000.00917.01
8.0.230.0030.00517.16
8.0.220.0030.00517.06
8.0.210.0000.00717.09
8.0.200.0000.00617.00
8.0.190.0000.00717.06
8.0.180.0040.00417.09
8.0.170.0080.00017.03
8.0.160.0060.00317.04
8.0.150.0000.00716.95
8.0.140.0000.00716.94
8.0.130.0050.00013.52
8.0.120.0040.00416.87
8.0.110.0040.00416.94
8.0.100.0000.00716.94
8.0.90.0070.00016.93
8.0.80.0090.00617.03
8.0.70.0030.00617.02
8.0.60.0040.00417.02
8.0.50.0040.00416.93
8.0.30.0140.00917.14
8.0.20.0090.01417.46
8.0.10.0030.00617.05
8.0.00.0150.00517.00
7.4.330.0050.00015.00
7.4.320.0000.00616.87
7.4.300.0060.00016.81
7.4.290.0070.00016.72
7.4.280.0050.00216.82
7.4.270.0000.00716.76
7.4.260.0070.00016.66
7.4.250.0050.00216.74
7.4.240.0040.00416.78
7.4.230.0040.00416.89
7.4.220.0120.00616.93
7.4.210.0070.00816.79
7.4.200.0000.00716.73
7.4.190.0040.00416.80
7.4.160.0090.01216.71
7.4.150.0090.00917.40
7.4.140.0150.00817.86
7.4.130.0130.00416.63
7.4.120.0090.01016.87
7.4.110.0060.01216.70
7.4.100.0140.00716.45
7.4.90.0030.01517.05
7.4.80.0090.00919.39
7.4.70.0070.01016.64
7.4.60.0120.00316.46
7.4.50.0000.00716.83
7.4.40.0030.01322.77
7.4.30.0090.00616.91
7.4.00.0120.00315.22
7.3.330.0040.00413.47
7.3.320.0030.00313.36
7.3.310.0050.00216.56
7.3.300.0000.00616.46
7.3.290.0140.00616.54
7.3.280.0050.01316.44
7.3.270.0100.01017.40
7.3.260.0130.01016.48
7.3.250.0080.01016.54
7.3.240.0120.00616.82
7.3.230.0060.01216.41
7.3.210.0110.00616.44
7.3.200.0030.02019.39
7.3.190.0070.01016.45
7.3.180.0060.00916.59
7.3.170.0100.00616.68
7.3.160.0100.00616.75
7.3.120.0060.00914.76
7.3.10.0060.01116.74
7.3.00.0070.00616.88
7.2.330.0060.01216.84
7.2.320.0070.01116.94
7.2.310.0110.00616.92
7.2.300.0090.00916.90
7.2.290.0070.01016.89
7.2.130.0030.01116.95
7.2.120.0080.01116.86
7.2.110.0240.00616.99
7.2.100.0080.01116.89
7.2.90.0040.01116.98
7.2.80.0080.00816.97
7.2.70.0220.00417.07
7.2.60.0110.00617.09
7.2.50.0150.00717.04
7.2.40.0190.00417.10
7.2.30.0170.00417.09
7.2.20.0140.00616.94
7.2.10.0120.01117.05
7.2.00.0110.00717.04
7.1.250.0060.00616.08
7.1.240.0030.00915.79
7.1.230.0110.00715.86
7.1.220.0140.00615.75
7.1.210.0080.01115.82
7.1.200.0110.00715.67
7.1.190.0120.01115.90
7.1.180.0100.00715.99
7.1.170.0150.00515.81
7.1.160.0040.01115.90
7.1.150.0140.00715.95
7.1.140.0120.00715.84
7.1.130.0120.00715.76
7.1.120.0110.00915.81
7.1.110.0120.00915.92
7.1.100.0100.00716.68
7.1.90.0160.00915.84
7.1.80.0120.00815.83
7.1.70.0110.00716.37
7.1.60.0120.00916.88
7.1.50.0060.01216.23
7.1.40.0180.00615.91
7.1.30.0140.00915.97
7.1.20.0130.00715.97
7.1.10.0170.00715.85
7.1.00.0150.02917.51
7.0.330.0040.01115.41
7.0.320.0050.01015.41
7.0.310.0170.00715.44
7.0.300.0090.00815.50
7.0.290.0150.00515.59
7.0.280.0080.01415.40
7.0.270.0150.00615.35
7.0.260.0090.01115.54
7.0.250.0100.01015.42
7.0.240.0170.00715.55
7.0.230.0250.00615.62
7.0.220.0090.01215.60
7.0.210.0140.00515.41
7.0.200.0080.01015.77
7.0.190.0200.00515.52
7.0.180.0120.01015.52
7.0.170.0160.00715.54
7.0.160.0210.00515.50
7.0.150.0150.00815.59
7.0.140.0130.02317.15
7.0.130.0120.00815.57
7.0.120.0160.00915.55
7.0.110.0130.00415.42
7.0.100.0150.00515.49
7.0.90.0120.00715.61
7.0.80.0120.00515.51
7.0.70.0160.00415.66
7.0.60.0150.01316.67
7.0.50.0150.02416.08
7.0.40.0120.02315.26
7.0.30.0190.01615.08
7.0.20.0120.02615.12
7.0.10.0080.01515.21
7.0.00.0070.02715.24
5.6.380.0120.00614.25
5.6.370.0110.00514.24
5.6.360.0120.00614.28
5.6.350.0130.00714.30
5.6.340.0100.00814.27
5.6.330.0060.00914.23
5.6.320.0120.00614.37
5.6.310.0090.00714.27
5.6.300.0070.00814.34
5.6.290.0070.00814.36
5.6.280.0060.02215.92
5.6.270.0090.00714.57
5.6.260.0090.00714.31
5.6.250.0100.00414.17
5.6.240.0090.00514.42
5.6.230.0060.00914.37
5.6.220.0050.00914.39
5.6.210.0040.01715.86
5.6.200.0080.01715.39
5.6.190.0090.02715.96
5.6.180.0140.02215.89
5.6.170.0160.02415.82
5.6.160.0080.02815.87
5.6.150.0140.02215.29
5.6.140.0060.02015.29
5.6.130.0090.02215.35
5.6.120.0080.01316.13
5.6.110.0070.02315.90
5.6.100.0080.02515.91
5.6.90.0100.01916.10
5.6.80.0090.02015.68
5.6.70.0110.01215.76
5.6.60.0090.00414.20
5.6.50.0100.00614.27
5.6.40.0090.00314.13
5.6.30.0090.00614.33
5.6.20.0060.00814.21
5.6.10.0060.00814.32
5.6.00.0040.00714.31
5.5.380.0080.00711.58
5.5.370.0060.00811.78
5.5.360.0070.00411.72
5.5.350.0150.02013.81
5.5.340.0080.02213.34
5.5.330.0050.01513.79
5.5.320.0120.01213.86
5.5.310.0130.02313.76
5.5.300.0050.02613.27
5.5.290.0080.02113.27
5.5.280.0080.02013.99
5.5.270.0050.01513.94
5.5.260.0070.02013.86
5.5.250.0070.02513.86
5.5.240.0060.02613.86
5.5.230.0050.00611.58
5.5.220.0070.00411.62
5.5.210.0080.00411.57
5.5.200.0040.00711.67
5.5.190.0070.00411.66
5.5.180.0060.00511.69
5.5.170.0040.01012.14
5.5.160.0060.00611.68
5.5.150.0030.00911.71
5.5.140.0090.00411.71
5.5.130.0080.00611.59
5.5.120.0070.00611.70
5.5.110.0070.00411.51
5.5.100.0050.00611.60
5.5.90.0060.00511.55
5.5.80.0080.00311.73
5.5.70.0060.00611.71
5.5.60.0090.00411.42
5.5.50.0020.00911.56
5.5.40.0090.00611.64
5.5.30.0080.00511.50
5.5.20.0050.00911.69
5.5.10.0060.00511.68
5.5.00.0070.00411.70
5.4.450.0260.01913.69
5.4.440.0160.01513.60
5.4.430.0130.01513.61
5.4.420.0120.02313.67
5.4.410.0080.01713.49
5.4.400.0470.00413.44
5.4.390.0450.00413.39
5.4.380.0100.01713.37
5.4.370.0120.01613.36
5.4.360.0110.01813.42
5.4.350.0150.01613.36
5.4.340.0080.01913.38
5.4.330.0070.00511.64
5.4.320.0070.01311.88
5.4.310.0080.01311.82
5.4.300.0080.01111.84
5.4.290.0050.01411.86
5.4.280.0060.01411.93
5.4.270.0050.01511.85
5.4.260.0090.02313.44
5.4.250.0070.01813.46
5.4.240.0090.02113.39
5.4.230.0060.01913.46
5.4.220.0100.02013.43
5.4.210.0100.01613.43
5.4.200.0090.01613.45
5.4.190.0090.02113.33
5.4.180.0040.01713.37
5.4.170.0060.02413.37
5.4.160.0050.02113.37
5.4.150.0070.01613.40
5.4.140.0060.02212.94
5.4.130.0060.01712.80
5.4.120.0100.01412.83
5.4.110.0070.01612.88
5.4.100.0050.01612.85
5.4.90.0060.01812.79
5.4.80.0070.01812.75
5.4.70.0090.02112.89
5.4.60.0090.01312.79
5.4.50.0060.01612.70
5.4.40.0050.01812.85
5.4.30.0070.01412.75
5.4.20.0040.01812.81
5.4.10.0070.01612.81
5.4.00.0080.01712.65
5.3.290.0070.01311.66
5.3.280.0080.02112.13
5.3.270.0060.02112.12
5.3.260.0080.01712.10
5.3.250.0090.01312.10
5.3.240.0050.02012.13
5.3.230.0070.01612.15
5.3.220.0060.01612.07
5.3.210.0060.01811.98
5.3.200.0090.01612.00
5.3.190.0040.02012.16
5.3.180.0080.01912.21
5.3.170.0110.01512.21
5.3.160.0090.01312.13
5.3.150.0070.01612.09
5.3.140.0090.01512.18
5.3.130.0050.01712.18
5.3.120.0080.01512.15
5.3.110.0040.01912.16
5.3.100.0070.01811.94
5.3.90.0080.01512.02
5.3.80.0070.01411.88
5.3.70.0050.01811.93
5.3.60.0040.01712.09
5.3.50.0050.01711.92
5.3.40.0030.01711.88
5.3.30.0070.01611.91
5.3.20.0060.01711.97
5.3.10.0040.01711.78
5.3.00.0080.01511.82
5.2.170.0050.01510.85
5.2.160.0040.01310.85
5.2.150.0050.01410.88
5.2.140.0060.01210.76
5.2.130.0040.01410.86
5.2.120.0050.01510.82
5.2.110.0060.01210.85
5.2.100.0050.01610.74
5.2.90.0040.01510.76
5.2.80.0080.01610.82
5.2.70.0040.01410.81
5.2.60.0020.01810.79
5.2.50.0070.01210.85
5.2.40.0060.01310.78
5.2.30.0080.01110.76
5.2.20.0050.01410.71
5.2.10.0050.01510.70
5.2.00.0080.01610.63
5.1.60.0060.01210.22
5.1.50.0030.01310.26
5.1.40.0060.01210.33
5.1.30.0060.01010.47
5.1.20.0060.01110.40
5.1.10.0050.01010.35
5.1.00.0060.01010.26
5.0.50.0020.0119.69
5.0.40.0030.0099.66
5.0.30.0070.0109.67
5.0.20.0050.0089.64
5.0.10.0030.0099.60
5.0.00.0040.0119.65
4.4.90.0030.0089.27
4.4.80.0020.0099.27
4.4.70.0050.0099.27
4.4.60.0050.0119.27
4.4.50.0040.0079.27
4.4.40.0030.0109.27
4.4.30.0050.0069.27
4.4.20.0010.0099.27
4.4.10.0020.0089.27
4.4.00.0000.0129.27
4.3.110.0020.0089.27
4.3.100.0030.0079.27
4.3.90.0020.0079.27
4.3.80.0030.0169.27
4.3.70.0060.0069.27
4.3.60.0050.0069.27
4.3.50.0020.0099.27
4.3.40.0010.0129.27
4.3.30.0030.0069.27
4.3.20.0010.0099.27
4.3.10.0030.0069.27
4.3.00.0070.0079.29

preferences:
50.95 ms | 400 KiB | 5 Q