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|>)/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.0120.00618.66
8.3.50.0150.00322.02
8.3.40.0140.00019.10
8.3.30.0070.00718.92
8.3.20.0000.00818.90
8.3.10.0040.00420.78
8.3.00.0070.00021.78
8.2.180.0070.00716.88
8.2.170.0090.00922.96
8.2.160.0070.00720.43
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0080.00019.61
8.2.110.0060.00319.38
8.2.100.0090.00317.96
8.2.90.0000.00819.35
8.2.80.0050.00317.97
8.2.70.0050.00517.75
8.2.60.0060.00317.93
8.2.50.0040.00418.07
8.2.40.0030.00618.22
8.2.30.0040.00420.00
8.2.20.0000.00717.77
8.2.10.0040.00417.88
8.2.00.0040.00417.80
8.1.280.0110.00425.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0040.00422.67
8.1.230.0070.00420.88
8.1.220.0040.00418.77
8.1.210.0060.00618.97
8.1.200.0030.00617.50
8.1.190.0030.00517.41
8.1.180.0000.00818.10
8.1.170.0090.00018.76
8.1.160.0050.00318.84
8.1.150.0040.00418.76
8.1.140.0030.00517.52
8.1.130.0050.00317.75
8.1.120.0030.00417.59
8.1.110.0040.00417.63
8.1.100.0000.00817.58
8.1.90.0000.00717.50
8.1.80.0030.00617.63
8.1.70.0030.00317.58
8.1.60.0000.00817.60
8.1.50.0040.00417.58
8.1.40.0030.00517.59
8.1.30.0000.00717.72
8.1.20.0000.01017.77
8.1.10.0000.00817.68
8.1.00.0050.00517.54
8.0.300.0050.00320.01
8.0.290.0090.00017.15
8.0.280.0070.00018.41
8.0.270.0070.00017.25
8.0.260.0030.00317.01
8.0.250.0040.00417.08
8.0.240.0110.00017.07
8.0.230.0030.00317.07
8.0.220.0070.00017.00
8.0.210.0030.00316.91
8.0.200.0000.00716.96
8.0.190.0000.00717.05
8.0.180.0040.00417.13
8.0.170.0030.00516.93
8.0.160.0000.00716.96
8.0.150.0040.00417.01
8.0.140.0040.00816.98
8.0.130.0000.00513.48
8.0.120.0040.00416.99
8.0.110.0040.00416.82
8.0.100.0000.00716.95
8.0.90.0040.00416.95
8.0.80.0070.01017.00
8.0.70.0070.00016.93
8.0.60.0030.00516.93
8.0.50.0000.00717.06
8.0.30.0160.00317.37
8.0.20.0090.00917.43
8.0.10.0000.00817.16
8.0.00.0100.00816.85
7.4.330.0000.00514.99
7.4.320.0000.00616.82
7.4.300.0000.00716.71
7.4.290.0070.00016.71
7.4.280.0000.00716.73
7.4.270.0000.00716.62
7.4.260.0000.00813.48
7.4.250.0030.00516.79
7.4.240.0000.00716.66
7.4.230.0000.00716.73
7.4.220.0090.00916.72
7.4.210.0080.00916.80
7.4.200.0000.00716.84
7.4.190.0040.00416.98
7.4.160.0120.00416.93
7.4.150.0070.01317.40
7.4.140.0100.00717.86
7.4.130.0080.01116.79
7.4.120.0070.01116.88
7.4.110.0110.00716.57
7.4.100.0100.00716.72
7.4.90.0030.01416.81
7.4.80.0030.01519.04
7.4.70.0080.00916.80
7.4.60.0130.00316.66
7.4.50.0050.00016.45
7.4.40.0050.00522.27
7.4.30.0100.01316.59
7.4.00.0070.00715.29
7.3.330.0030.00313.23
7.3.320.0050.00013.20
7.3.310.0050.00216.35
7.3.300.0030.00316.47
7.3.290.0030.01216.64
7.3.280.0040.01016.49
7.3.270.0110.00617.40
7.3.260.0100.01018.24
7.3.250.0140.00316.80
7.3.240.0070.01016.75
7.3.230.0140.00316.64
7.3.210.0140.00316.45
7.3.200.0090.01219.39
7.3.190.0130.00316.50
7.3.180.0070.01016.88
7.3.170.0130.00316.65
7.3.160.0120.00316.59
7.3.120.0040.01114.91
7.3.10.0100.00616.91
7.3.00.0070.00416.74
7.2.330.0160.00017.02
7.2.320.0030.01416.88
7.2.310.0090.01316.90
7.2.300.0040.01316.76
7.2.290.0110.00717.05
7.2.130.0040.01117.21
7.2.120.0090.00616.89
7.2.110.0060.00917.09
7.2.100.0120.00317.08
7.2.90.0070.00716.98
7.2.80.0040.01117.13
7.2.70.0070.00317.37
7.2.60.0000.01016.98
7.2.50.0030.01017.03
7.2.40.0030.01317.16
7.2.30.0110.00417.20
7.2.20.0060.00617.20
7.2.10.0050.00816.80
7.2.00.0050.00518.30
7.1.250.0100.00316.20
7.1.100.0040.00718.07
7.1.70.0000.01417.22
7.1.60.0080.01519.40
7.1.50.0070.01417.20
7.1.00.0000.06722.28
7.0.200.0000.00816.88
7.0.140.0030.07322.08
7.0.60.0130.05319.90
7.0.50.0170.07317.96
7.0.40.0130.08017.76
7.0.30.0130.08017.80
7.0.20.0100.07317.81
7.0.10.0070.07317.88
7.0.00.0030.06017.86
5.6.280.0130.06321.06
5.6.210.0030.06320.66
5.6.200.0030.05718.14
5.6.190.0100.05018.22
5.6.180.0170.07718.19
5.6.170.0000.06718.21
5.6.160.0070.08018.18
5.6.150.0070.04318.11
5.6.140.0070.06318.16
5.6.130.0030.07318.17
5.6.120.0030.05318.18
5.6.110.0070.05318.21
5.6.100.0130.07018.10
5.6.90.0100.07718.09
5.6.80.0030.07717.54
5.6.70.0170.05717.51
5.6.60.0130.04317.57
5.6.50.0100.06317.59
5.6.40.0030.08317.58
5.6.30.0100.03017.54
5.6.20.0000.05317.54
5.6.10.0070.05317.46
5.6.00.0100.05717.46
5.5.350.0400.06020.41
5.5.340.0100.04717.91
5.5.330.0000.04717.96
5.5.320.0070.08017.88
5.5.310.0030.08317.89
5.5.300.0170.07018.00
5.5.290.0030.04318.01
5.5.280.0000.04317.87
5.5.270.0070.08017.94
5.5.260.0130.07717.91
5.5.250.0100.03717.73
5.5.240.0070.05317.34
5.5.230.0100.07317.39
5.5.220.0070.06717.26
5.5.210.0070.04317.36
5.5.200.0070.06317.32
5.5.190.0130.02717.23
5.5.180.0070.03717.30
5.5.160.0070.06717.30
5.5.150.0100.05717.26
5.5.140.0000.05317.32
5.5.130.0170.06317.30
5.5.120.0100.06317.23
5.5.110.0100.07017.33
5.5.100.0100.04317.16
5.5.90.0070.06317.26
5.5.80.0100.05017.16
5.5.70.0000.05017.22
5.5.60.0100.07017.26
5.5.50.0070.04017.20
5.5.40.0030.05017.15
5.5.30.0100.08017.15
5.5.20.0030.07717.22
5.5.10.0030.05017.25
5.5.00.0130.03717.15
5.4.450.0130.04019.29
5.4.440.0000.04319.36
5.4.430.0130.06019.14
5.4.420.0130.07319.31
5.4.410.0070.06319.32
5.4.400.0100.07019.07
5.4.390.0100.07719.03
5.4.380.0100.06018.98
5.4.370.0070.08019.21
5.4.360.0200.05718.89
5.4.350.0030.04319.12
5.4.340.0070.04018.95
5.4.320.0070.05718.89
5.4.310.0130.04719.09
5.4.300.0070.05019.11
5.4.290.0170.05318.97
5.4.280.0130.07319.07
5.4.270.0130.07019.11
5.4.260.0170.07019.00
5.4.250.0100.07318.99
5.4.240.0000.04318.96
5.4.230.0100.06718.97
5.4.220.0070.05018.88
5.4.210.0100.06018.97
5.4.200.0030.04318.94
5.4.190.0130.06018.83
5.4.180.0100.03719.00
5.4.170.0030.05319.11
5.4.160.0030.07718.86
5.4.150.0030.08019.22
5.4.140.0100.04316.50
5.4.130.0070.07016.29
5.4.120.0030.04316.35
5.4.110.0100.07316.33
5.4.100.0030.07316.33
5.4.90.0100.06716.22
5.4.80.0030.06016.36
5.4.70.0030.05316.39
5.4.60.0070.07016.23
5.4.50.0130.05316.26
5.4.40.0100.07016.29
5.4.30.0070.03716.25
5.4.20.0170.06016.14
5.4.10.0100.06716.22
5.4.00.0100.05315.57
5.3.290.0070.07714.66
5.3.280.0030.04014.56
5.3.270.0000.06014.56
5.3.260.0100.06014.56
5.3.250.0100.03314.43
5.3.240.0100.07014.55
5.3.230.0070.04314.54
5.3.220.0070.06714.48
5.3.210.0070.07714.48
5.3.200.0100.05714.53
5.3.190.0130.04014.54
5.3.180.0070.07014.50
5.3.170.0030.04014.34
5.3.160.0000.08714.54
5.3.150.0100.07314.42
5.3.140.0070.07314.53
5.3.130.0070.07714.38
5.3.120.0030.08014.33
5.3.110.0100.07014.50
5.3.100.0100.07013.99
5.3.90.0030.04714.00
5.3.80.0070.07313.96
5.3.70.0030.08013.97
5.3.60.0030.03713.85
5.3.50.0130.07313.86
5.3.40.0030.04314.02
5.3.30.0100.06713.90
5.3.20.0030.04313.66
5.3.10.0070.04013.56
5.3.00.0070.03313.58
5.2.170.0130.05010.92
5.2.160.0030.06011.08
5.2.150.0030.05711.13
5.2.140.0000.04310.92
5.2.130.0030.05311.08
5.2.120.0130.04011.00
5.2.110.0070.02311.10
5.2.100.0030.06011.08
5.2.90.0000.03011.11
5.2.80.0070.04710.99
5.2.70.0030.04310.98
5.2.60.0130.02011.02
5.2.50.0100.03711.01
5.2.40.0030.03711.14
5.2.30.0000.03710.89
5.2.20.0030.03310.73
5.2.10.0100.02310.86
5.2.00.0030.03710.75
5.1.60.0100.0509.96
5.1.50.0070.03710.14
5.1.40.0030.03710.12
5.1.30.0070.03710.47
5.1.20.0030.06010.41
5.1.10.0030.04710.14
5.1.00.0000.06010.05
5.0.50.0070.0308.70
5.0.40.0030.0208.66
5.0.30.0070.0608.66
5.0.20.0030.0438.66
5.0.10.0070.0278.66
5.0.00.0000.0638.66
4.4.90.0030.0208.66
4.4.80.0000.0278.66
4.4.70.0030.0338.66
4.4.60.0030.0278.66
4.4.50.0030.0208.66
4.4.40.0070.0438.66
4.4.30.0000.0308.66
4.4.20.0000.0338.66
4.4.10.0000.0278.66
4.4.00.0030.0308.66
4.3.110.0030.0138.66
4.3.100.0000.0338.66
4.3.90.0030.0338.66
4.3.80.0000.0378.66
4.3.70.0000.0378.66
4.3.60.0030.0308.66
4.3.50.0070.0238.66
4.3.40.0000.0438.66
4.3.30.0030.0278.66
4.3.20.0000.0238.66
4.3.10.0000.0378.66
4.3.00.0030.0338.66

preferences:
49.14 ms | 401 KiB | 5 Q