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> <br> A Castle! </body> </html>]]></description>'; //grab the src portion of the image tag $srcPattern = "/src\s*?=\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.70.0120.00616.73
8.3.60.0140.00716.75
8.3.50.0110.01017.56
8.3.40.0110.00419.09
8.3.30.0040.01118.86
8.3.20.0000.00818.93
8.3.10.0060.00920.64
8.3.00.0090.00019.38
8.2.180.0140.00716.88
8.2.170.0180.00022.96
8.2.160.0100.00320.38
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.61
8.2.110.0050.00521.08
8.2.100.0090.00318.16
8.2.90.0070.00321.12
8.2.80.0030.00618.16
8.2.70.0030.00517.86
8.2.60.0000.00817.91
8.2.50.0030.00618.07
8.2.40.0040.00418.28
8.2.30.0000.00718.16
8.2.20.0000.00717.94
8.2.10.0030.00517.87
8.2.00.0040.00417.83
8.1.280.0120.00325.92
8.1.270.0040.00424.66
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0090.00020.75
8.1.230.0040.00820.89
8.1.220.0030.00617.79
8.1.210.0050.00318.95
8.1.200.0060.00317.47
8.1.190.0030.00517.51
8.1.180.0060.00318.10
8.1.170.0050.00518.68
8.1.160.0000.00818.83
8.1.150.0080.00018.80
8.1.140.0050.00217.62
8.1.130.0000.00717.86
8.1.120.0000.00717.57
8.1.110.0040.00417.61
8.1.100.0040.00417.51
8.1.90.0030.00617.66
8.1.80.0070.00017.68
8.1.70.0030.00317.54
8.1.60.0000.00817.71
8.1.50.0080.00017.67
8.1.40.0030.00617.59
8.1.30.0000.00717.80
8.1.20.0060.00317.73
8.1.10.0000.00817.62
8.1.00.0000.01217.61
8.0.300.0070.00020.00
8.0.290.0040.00416.88
8.0.280.0000.00718.39
8.0.270.0030.00317.29
8.0.260.0030.00316.98
8.0.250.0050.00317.16
8.0.240.0100.00017.02
8.0.230.0030.00517.15
8.0.220.0000.00716.93
8.0.210.0000.00717.03
8.0.200.0030.00317.14
8.0.190.0040.00417.01
8.0.180.0080.00016.96
8.0.170.0000.01116.94
8.0.160.0000.00717.04
8.0.150.0000.00816.97
8.0.140.0040.00717.02
8.0.130.0050.00013.55
8.0.120.0040.00416.94
8.0.110.0000.00817.09
8.0.100.0040.00416.95
8.0.90.0080.00016.96
8.0.80.0080.00917.03
8.0.70.0040.00417.04
8.0.60.0050.00316.88
8.0.50.0050.00216.92
8.0.30.0080.01317.34
8.0.20.0110.00717.19
8.0.10.0070.00017.21
8.0.00.0050.01417.08
7.4.330.0050.00013.19
7.4.320.0060.00516.74
7.4.300.0030.00516.83
7.4.290.0070.00016.71
7.4.280.0000.00916.80
7.4.270.0040.00416.77
7.4.260.0050.00313.55
7.4.250.0080.00016.80
7.4.240.0050.00216.81
7.4.230.0070.00016.81
7.4.220.0140.01016.58
7.4.210.0100.00616.75
7.4.200.0030.00316.54
7.4.190.0000.00716.84
7.4.160.0130.01016.59
7.4.150.0090.00916.73
7.4.140.0110.00916.86
7.4.130.0090.00816.68
7.4.120.0120.00916.66
7.4.110.0110.00616.61
7.4.100.0090.00916.88
7.4.90.0120.00616.80
7.4.80.0120.00616.63
7.4.70.0120.00916.69
7.4.60.0120.00616.78
7.4.50.0060.00316.46
7.4.40.0070.00716.55
7.4.30.0100.01316.83
7.4.00.0030.01314.99
7.3.330.0000.00613.23
7.3.320.0000.00713.16
7.3.310.0030.00316.55
7.3.300.0020.00516.49
7.3.290.0090.00916.54
7.3.280.0060.00916.49
7.3.270.0070.01016.83
7.3.260.0090.00916.74
7.3.250.0090.00916.75
7.3.240.0090.00816.94
7.3.230.0070.01016.59
7.3.210.0170.00716.72
7.3.200.0080.01419.39
7.3.190.0110.00716.55
7.3.180.0100.00616.67
7.3.170.0100.00716.68
7.3.160.0040.01216.42
7.3.120.0070.01014.74
7.2.330.0030.01416.76
7.2.320.0130.01016.92
7.2.310.0160.00516.75
7.2.300.0130.01016.65
7.2.290.0100.00716.82
7.2.60.0000.01217.00
7.2.00.0120.00319.79
7.1.200.0080.00416.13
7.1.100.0030.01018.38
7.1.70.0040.00417.41
7.1.60.0070.01419.40
7.1.50.0170.01734.39
7.1.00.0100.02722.34
7.0.200.0250.00915.06
7.0.140.0030.07721.96
7.0.120.0030.06722.11
7.0.60.0200.07320.05
7.0.50.0070.08017.94
7.0.40.0200.03020.32
7.0.30.0500.07720.18
7.0.20.0300.05720.11
7.0.10.0130.03720.23
7.0.00.0130.07020.10
5.6.280.0030.07320.95
5.6.210.0130.07320.56
5.6.200.0170.06718.16
5.6.190.0170.08020.63
5.6.180.0430.05720.41
5.6.170.0230.04320.39
5.6.160.0170.07020.49
5.6.150.0070.04318.12
5.6.140.0100.03318.11
5.6.130.0030.04718.21
5.6.120.0070.05721.09
5.6.110.0000.08721.08
5.6.100.0030.05321.00
5.6.90.0170.07320.96
5.6.80.0100.07320.53
5.5.350.0070.08020.38
5.5.340.0130.05317.89
5.5.330.0070.06320.47
5.5.320.3430.04020.34
5.5.310.0230.05320.29
5.5.300.0070.05018.00
5.5.290.0100.05317.95
5.5.280.0170.07720.95
5.5.270.0230.07020.74
5.5.260.0170.07720.97
5.5.250.0200.06020.61
5.5.240.0070.07020.07
5.4.450.2400.03719.44
5.4.440.1900.04019.13
5.4.430.1530.03319.45
5.4.420.1900.03719.21
5.4.410.1870.03719.25
5.4.400.2170.04719.13
5.4.390.2370.03319.07
5.4.380.2170.04019.10
5.4.370.1700.03319.21
5.4.360.2000.03318.80
5.4.350.1930.03319.07
5.4.340.2070.04319.24
5.4.320.1930.03319.13
5.4.310.1930.04019.02
5.4.300.1900.03319.03
5.4.290.1930.03719.12
5.4.280.1870.04018.80
5.4.270.1870.03719.13
5.4.260.1700.04018.77
5.4.250.1800.04019.06
5.4.240.1930.03719.15
5.4.230.2070.03019.20
5.4.220.2130.03718.92
5.4.210.2170.04318.88
5.4.200.2230.03318.94
5.4.190.1770.06019.05
5.4.180.2000.03719.07
5.4.170.2100.04019.09
5.4.160.1900.04319.19
5.4.150.1830.04319.04
5.4.140.1900.04316.26
5.4.130.2070.03316.44
5.4.120.1830.03716.54
5.4.110.1730.04016.27
5.4.100.2000.04016.38
5.4.90.2070.04016.22
5.4.80.2070.03016.48
5.4.70.2000.04316.40
5.4.60.2270.04016.38
5.4.50.2070.04016.30
5.4.40.2170.04316.46
5.4.30.2130.04016.05
5.4.20.0030.06016.35
5.4.10.0070.04016.38
5.4.00.0100.06715.89
5.3.290.1400.04714.50
5.3.280.2170.04014.54
5.3.270.2000.03714.51
5.3.260.1830.03714.55
5.3.250.1870.03314.55
5.3.240.1800.04014.59
5.3.230.2000.04314.54
5.3.220.2070.04714.42
5.3.210.1870.03314.44
5.3.200.2270.04014.51
5.3.190.0200.03714.41
5.3.180.0070.07314.42
5.3.170.0530.03014.44
5.3.160.2000.03714.41
5.3.150.1900.03314.61
5.3.140.1800.04014.64
5.3.130.2030.04014.39
5.3.120.1870.03314.39
5.3.110.1870.04714.40
5.3.100.1800.03313.98
5.3.90.2070.03713.92
5.3.80.2130.03713.97
5.3.70.2130.03313.97
5.3.60.0530.05713.80
5.3.50.0030.05013.79
5.3.40.0200.04313.89
5.3.30.1600.03713.84
5.3.20.2030.04313.79
5.3.10.1830.03713.61
5.3.00.1800.04013.48
5.2.170.1500.03011.23
5.2.160.1500.03311.20
5.2.150.1400.02711.09
5.2.140.1600.03711.08
5.2.130.1500.03011.04
5.2.120.1530.03010.94
5.2.110.1400.03010.96
5.2.100.0830.03710.96
5.2.90.0170.03011.12
5.2.80.0030.02710.93
5.2.70.0000.03011.00
5.2.60.0870.03710.89
5.2.50.1100.03310.86
5.2.40.1100.03311.01
5.2.30.1100.03710.86
5.2.20.1170.02710.97
5.2.10.1370.03310.93
5.2.00.1300.02310.68
5.1.60.0900.0239.98
5.1.50.1200.02310.15
5.1.40.1200.0209.96
5.1.30.1330.02310.23
5.1.20.1100.02710.37
5.1.10.1370.03010.15
5.1.00.1130.02710.15
5.0.50.0670.0238.44
5.0.40.0600.0208.31
5.0.30.0000.0308.35
5.0.20.0030.0178.08
5.0.10.0000.0208.07
5.0.00.0030.0278.15
4.4.90.0030.0137.69
4.4.80.0270.0137.69
4.4.70.0400.0137.69
4.4.60.0330.0177.69
4.4.50.0430.0177.69
4.4.40.0430.0237.69
4.4.30.0570.0177.69
4.4.20.0570.0107.69
4.4.10.0470.0177.69
4.4.00.0530.0207.69
4.3.110.0600.0177.69
4.3.100.0630.0207.69
4.3.90.0330.0137.69
4.3.80.0230.0237.69
4.3.70.0330.0137.69
4.3.60.0530.0137.69
4.3.50.0530.0137.69
4.3.40.0530.0207.69
4.3.30.0270.0207.69
4.3.20.0330.0137.69
4.3.10.0300.0177.69
4.3.00.0370.0177.69

preferences:
50.86 ms | 401 KiB | 5 Q