3v4l.org

run code in 300+ PHP versions simultaneously
<?php $imageTag = '<description><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>castle</title> </head> <body> <br> <br> <img src="http://nycxplorer.com/wp-content/uploads/2012/02/bagel1-1.jpg"> <br><br>a;lkj>poique <br> A Castle! </body> </html>]]></description>'; //grab the src portion of the image tag $srcPattern = "/src\s*?=\s*?\S+>/s"; preg_match($srcPattern, $imageTag, $srcParts); $srcPart = $srcParts[0]; print_r($srcPart. "\n"); //remove all whitespace from within and around the src portion $srcPart = trim(preg_replace('/[\s]+/','', $srcPart)); print_r($srcPart . "\n"); //grab the src URL $oldUrl = substr($srcPart, 4); //if there are quotes at the beginning of the url, cut them off if($oldUrl[0] == '"' || $oldUrl[0] == "'") { $oldUrl = substr($oldUrl, 1, strlen($oldUrl)-2); } print_r($oldUrl. "\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.0100.00616.72
8.3.50.0050.01317.29
8.3.40.0120.00319.02
8.3.30.0110.00418.65
8.3.20.0040.00419.08
8.3.10.0080.00019.02
8.3.00.0000.00919.63
8.2.180.0140.00016.75
8.2.170.0070.00722.96
8.2.160.0100.00720.27
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0050.00321.05
8.2.110.0030.00619.30
8.2.100.0030.00917.91
8.2.90.0000.00819.48
8.2.80.0040.00419.39
8.2.70.0040.00417.63
8.2.60.0040.00418.05
8.2.50.0030.00618.07
8.2.40.0000.00818.34
8.2.30.0040.00418.25
8.2.20.0060.00317.68
8.2.10.0040.00417.88
8.2.00.0030.00517.77
8.1.280.0120.00625.92
8.1.270.0070.00024.66
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00620.96
8.1.230.0000.01121.03
8.1.220.0030.00617.74
8.1.210.0000.00818.93
8.1.200.0030.00617.48
8.1.190.0000.00717.53
8.1.180.0060.00318.10
8.1.170.0000.00918.89
8.1.160.0040.00418.84
8.1.150.0040.00418.79
8.1.140.0000.00817.61
8.1.130.0070.00017.89
8.1.120.0000.00717.60
8.1.110.0050.00317.62
8.1.100.0030.00317.62
8.1.90.0040.00417.60
8.1.80.0050.00217.63
8.1.70.0050.00317.61
8.1.60.0000.00917.77
8.1.50.0050.00317.55
8.1.40.0080.00017.68
8.1.30.0040.00417.84
8.1.20.0030.00617.85
8.1.10.0080.00017.69
8.1.00.0040.00417.64
8.0.300.0000.00820.04
8.0.290.0030.00616.86
8.0.280.0040.00418.46
8.0.270.0040.00417.20
8.0.260.0050.00316.91
8.0.250.0080.00017.04
8.0.240.0040.00417.14
8.0.230.0040.00417.05
8.0.220.0030.00316.94
8.0.210.0000.00916.93
8.0.200.0000.00717.07
8.0.190.0030.00517.17
8.0.180.0040.00417.08
8.0.170.0030.00617.00
8.0.160.0000.00717.05
8.0.150.0050.00316.99
8.0.140.0030.00616.98
8.0.130.0000.00613.43
8.0.120.0040.00416.84
8.0.110.0000.00717.11
8.0.100.0040.00416.93
8.0.90.0020.00517.04
8.0.80.0120.00916.98
8.0.70.0000.00717.04
8.0.60.0000.00717.10
8.0.50.0040.00417.11
8.0.30.0060.01217.26
8.0.20.0050.01617.41
8.0.10.0070.00017.11
8.0.00.0130.00616.84
7.4.330.0050.00013.16
7.4.320.0000.00616.67
7.4.300.0060.00016.70
7.4.290.0100.00016.87
7.4.280.0040.00416.64
7.4.270.0000.00816.79
7.4.260.0050.00013.45
7.4.250.0030.00616.70
7.4.240.0040.00416.65
7.4.230.0030.00316.47
7.4.220.0120.00616.86
7.4.210.0110.00516.80
7.4.200.0080.00016.84
7.4.190.0000.00716.96
7.4.160.0070.01116.84
7.4.150.0030.01416.79
7.4.140.0110.00616.69
7.4.130.0050.01216.68
7.4.120.0060.01316.51
7.4.110.0030.01416.91
7.4.100.0090.01216.68
7.4.90.0090.00916.60
7.4.80.0120.00619.39
7.4.70.0170.00016.68
7.4.60.0130.00316.65
7.4.50.0080.00416.46
7.4.40.0060.00616.64
7.4.30.0060.01016.84
7.4.00.0030.01315.22
7.3.330.0000.00713.36
7.3.320.0000.00813.27
7.3.310.0030.00316.61
7.3.300.0030.00316.52
7.3.290.0070.01116.51
7.3.280.0080.01016.46
7.3.270.0030.01416.65
7.3.260.0160.00616.91
7.3.250.0070.01016.79
7.3.240.0100.01316.65
7.3.230.0040.01416.65
7.3.210.0140.00316.77
7.3.200.0070.01716.54
7.3.190.0080.00816.86
7.3.180.0080.01216.74
7.3.170.0060.00916.56
7.3.160.0110.00716.68
7.3.120.0070.01115.19
7.3.10.0080.00416.69
7.3.00.0100.00316.88
7.2.330.0040.01216.72
7.2.320.0060.01916.94
7.2.310.0090.00917.03
7.2.300.0130.00316.93
7.2.290.0060.01116.86
7.2.130.0060.00616.93
7.2.120.0060.00317.18
7.2.110.0090.00617.15
7.2.100.0070.00417.09
7.2.90.0060.00317.08
7.2.80.0070.00717.32
7.2.70.0000.01217.26
7.2.60.0060.00616.99
7.2.50.0060.00616.78
7.2.40.0060.00617.28
7.2.30.0060.00617.26
7.2.20.0060.00917.05
7.2.10.0100.00317.13
7.2.00.0060.01118.22
7.1.250.0070.00715.96
7.1.100.0000.01718.28
7.1.70.0070.01317.07
7.1.60.0070.01719.40
7.1.50.0030.01017.09
7.1.00.0100.07022.45
7.0.200.0320.00614.87
7.0.140.0070.07021.93
7.0.120.0100.06722.15
7.0.60.0030.06719.82
7.0.50.0070.07717.85
7.0.40.0070.09320.14
7.0.30.0300.07720.20
7.0.20.0330.07320.18
7.0.10.0170.08020.18
7.0.00.0070.08320.02
5.6.280.0130.06320.85
5.6.210.0100.06320.47
5.6.200.0100.08018.15
5.6.190.0170.04020.33
5.6.180.0230.04720.45
5.6.170.0270.07720.54
5.6.160.0070.08720.49
5.6.150.0130.07318.22
5.6.140.0100.05318.11
5.6.130.0100.03718.15
5.6.120.0070.03721.03
5.6.110.0030.09021.04
5.6.100.0130.08020.96
5.6.90.0100.04321.03
5.6.80.0100.06320.37
5.5.350.0200.07320.41
5.5.340.0030.06717.98
5.5.330.0070.05320.43
5.5.320.0270.05720.18
5.5.310.0200.07320.30
5.5.300.0130.04017.88
5.5.290.0130.04717.88
5.5.280.0070.08720.88
5.5.270.0170.03020.82
5.5.260.0100.08720.68
5.5.250.0000.07320.69
5.5.240.0100.07020.26
5.4.450.0070.08319.33
5.4.440.0030.04019.44
5.4.430.0100.04719.48
5.4.420.0070.08019.49
5.4.410.0130.06719.37
5.4.400.0130.07019.15
5.4.390.0070.07718.81
5.4.380.0070.04319.18
5.4.370.0070.07719.09
5.4.360.0030.07719.20
5.4.350.0130.03719.17
5.4.340.0100.04719.08
5.4.320.0100.04019.11
5.4.310.0100.03319.11
5.4.300.0100.04319.07
5.4.290.0070.04718.79
5.4.280.0000.04719.12
5.4.270.0070.08018.79
5.4.260.0030.04018.80
5.4.250.0130.05018.87
5.4.240.0070.05718.78
5.4.230.0100.04318.80
5.4.220.0130.07019.17
5.4.210.0100.04318.80
5.4.200.0000.07319.17
5.4.190.0070.05019.13
5.4.180.0000.04018.80
5.4.170.0070.07719.06
5.4.160.0170.06719.08
5.4.150.0100.07319.06
5.4.140.0130.07016.45
5.4.130.0170.05016.27
5.4.120.0100.06716.24
5.4.110.0070.07016.26
5.4.100.0030.05716.28
5.4.90.0070.05016.41
5.4.80.0070.07716.14
5.4.70.0130.06316.26
5.4.60.0170.06316.24
5.4.50.0070.06016.25
5.4.40.0100.06716.58
5.4.30.0130.04016.21
5.4.20.0100.06016.26
5.4.10.0100.07016.38
5.4.00.0070.07015.61
5.3.290.0070.04014.59
5.3.280.0170.03314.57
5.3.270.0000.07714.53
5.3.260.0070.05714.53
5.3.250.0130.03014.39
5.3.240.0100.06014.54
5.3.230.0070.04014.55
5.3.220.0200.03314.48
5.3.210.0130.07314.49
5.3.200.0000.05714.50
5.3.190.0070.04314.49
5.3.180.0030.05714.57
5.3.170.0100.07714.50
5.3.160.0030.05714.50
5.3.150.0030.04314.50
5.3.140.0000.06314.50
5.3.130.0030.06714.50
5.3.120.0030.04714.47
5.3.110.0100.06714.51
5.3.100.0130.06713.96
5.3.90.0070.07714.10
5.3.80.0200.06013.95
5.3.70.0030.06713.96
5.3.60.0030.04713.84
5.3.50.0070.07313.87
5.3.40.0030.07714.04
5.3.30.0100.05713.84
5.3.20.0070.06713.63
5.3.10.0100.07013.58
5.3.00.0030.07013.75
5.2.170.0000.06711.13
5.2.160.0070.05711.14
5.2.150.0030.06311.07
5.2.140.0070.06011.09
5.2.130.0070.06011.03
5.2.120.0030.06710.92
5.2.110.0030.06711.09
5.2.100.0030.06311.18
5.2.90.0070.05011.03
5.2.80.0000.06710.99
5.2.70.0000.07010.95
5.2.60.0100.04711.03
5.2.50.0030.06010.91
5.2.40.0070.04010.88
5.2.30.0070.06310.89
5.2.20.0000.06010.89
5.2.10.0030.03010.71
5.2.00.0000.03310.80
5.1.60.0030.0239.89
5.1.50.0000.0339.99
5.1.40.0070.0239.94
5.1.30.0000.03310.36
5.1.20.0070.02010.34
5.1.10.0000.02710.06
5.1.00.0030.0279.97
5.0.50.0030.0178.55
5.0.40.0030.0178.57
5.0.30.0070.0278.30
5.0.20.0000.0238.30
5.0.10.0000.0208.30
5.0.00.0000.0338.30
4.4.90.0000.0378.30
4.4.80.0070.0308.30
4.4.70.0030.0338.30
4.4.60.0030.0138.30
4.4.50.0000.0178.30
4.4.40.0000.0278.30
4.4.30.0000.0178.30
4.4.20.0000.0178.30
4.4.10.0030.0138.30
4.4.00.0000.0238.30
4.3.110.0000.0178.30
4.3.100.0000.0178.30
4.3.90.0000.0178.30
4.3.80.0030.0238.30
4.3.70.0000.0178.30
4.3.60.0000.0178.30
4.3.50.0000.0178.30
4.3.40.0000.0238.30
4.3.30.0030.0138.30
4.3.20.0000.0138.30
4.3.10.0030.0138.30
4.3.00.0030.0138.30

preferences:
44.67 ms | 401 KiB | 5 Q