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.60.0000.01816.75
8.3.50.0160.00322.00
8.3.40.0120.00918.96
8.3.30.0030.01019.22
8.3.20.0040.00420.35
8.3.10.0040.00423.53
8.3.00.0000.00722.39
8.2.180.0140.00718.66
8.2.170.0100.01322.96
8.2.160.0090.00922.29
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0070.00022.37
8.2.110.0100.00022.23
8.2.100.0100.00317.96
8.2.90.0000.00819.34
8.2.80.0080.00018.05
8.2.70.0080.00017.72
8.2.60.0030.00618.04
8.2.50.0000.00918.07
8.2.40.0090.00018.24
8.2.30.0070.00018.10
8.2.20.0000.00717.88
8.2.10.0000.00819.64
8.2.00.0040.00417.79
8.1.280.0100.00325.92
8.1.270.0080.00023.96
8.1.260.0040.00426.35
8.1.250.0030.00628.09
8.1.240.0080.00023.83
8.1.230.0110.00018.98
8.1.220.0080.00017.78
8.1.210.0000.00818.77
8.1.200.0030.00717.48
8.1.190.0040.00417.54
8.1.180.0030.00618.10
8.1.170.0030.00618.71
8.1.160.0000.00822.05
8.1.150.0050.00318.71
8.1.140.0060.00317.53
8.1.130.0070.00017.93
8.1.120.0000.00717.52
8.1.110.0070.00017.52
8.1.100.0040.00417.63
8.1.90.0080.00317.61
8.1.80.0070.00017.68
8.1.70.0050.00217.60
8.1.60.0000.00817.74
8.1.50.0040.00417.60
8.1.40.0040.00417.74
8.1.30.0000.00817.75
8.1.20.0040.00417.69
8.1.10.0020.00517.75
8.1.00.0090.00017.73
8.0.300.0000.00818.77
8.0.290.0040.00417.30
8.0.280.0070.00018.36
8.0.270.0070.00017.30
8.0.260.0000.00816.97
8.0.250.0070.00017.03
8.0.240.0040.00417.13
8.0.230.0050.00317.16
8.0.220.0000.00716.99
8.0.210.0100.00016.95
8.0.200.0000.01017.02
8.0.190.0090.00017.09
8.0.180.0080.00017.12
8.0.170.0000.00817.12
8.0.160.0040.00417.11
8.0.150.0000.00816.91
8.0.140.0040.00417.02
8.0.130.0030.00313.42
8.0.120.0000.00817.04
8.0.110.0050.00217.03
8.0.100.0040.00416.95
8.0.90.0080.00017.02
8.0.80.0030.01517.02
8.0.70.0000.00816.95
8.0.60.0040.00416.86
8.0.50.0000.00716.94
8.0.30.0110.00917.21
8.0.20.0110.00817.61
8.0.10.0080.00017.20
8.0.00.0130.00616.98
7.4.330.0000.00515.12
7.4.320.0030.00316.71
7.4.300.0030.00816.72
7.4.290.0000.00716.64
7.4.280.0070.00016.85
7.4.270.0050.00516.82
7.4.260.0000.00716.64
7.4.250.0000.00716.70
7.4.240.0030.00516.74
7.4.230.0040.00416.64
7.4.220.0120.00616.84
7.4.210.0060.01116.77
7.4.200.0050.00316.84
7.4.190.0040.00416.83
7.4.160.0120.00416.58
7.4.150.0040.01417.40
7.4.140.0100.00817.86
7.4.130.0080.00916.68
7.4.120.0150.00616.78
7.4.110.0060.01016.74
7.4.100.0160.00716.81
7.4.90.0100.00716.66
7.4.80.0070.01019.39
7.4.70.0000.01616.98
7.4.60.0110.00616.62
7.4.50.0060.00316.41
7.4.40.0000.01222.77
7.4.30.0080.00816.69
7.4.00.0000.01215.05
7.3.330.0030.00313.23
7.3.320.0050.00013.19
7.3.310.0030.00316.48
7.3.300.0000.00716.50
7.3.290.0110.00316.48
7.3.280.0070.01216.46
7.3.270.0150.00717.40
7.3.260.0110.00616.60
7.3.250.0120.00616.62
7.3.240.0100.01016.83
7.3.230.0060.01216.71
7.3.210.0060.01216.61
7.3.200.0040.01219.39
7.3.190.0030.01516.50
7.3.180.0120.00816.58
7.3.170.0210.00016.76
7.3.160.0080.00716.60
7.3.120.0000.01415.23
7.2.330.0100.01016.82
7.2.320.0080.00816.87
7.2.310.0090.01316.66
7.2.300.0100.00716.82
7.2.290.0100.00717.01
7.2.00.0060.00319.58
7.1.100.0030.00718.54
7.1.70.0000.01017.35
7.1.60.0090.00919.29
7.1.50.0090.01517.33
7.1.00.0030.07722.59
7.0.200.0030.00716.98
7.0.140.0030.07322.08
7.0.60.0030.07719.82
7.0.50.0130.07317.86
7.0.40.0200.04020.24
7.0.30.0570.06720.19
7.0.20.0370.07320.21
7.0.10.0000.08020.18
7.0.00.0170.06320.02
5.6.280.0030.07320.79
5.6.210.0000.05020.71
5.6.200.0070.09018.12
5.6.190.0100.08720.60
5.6.180.0270.05720.48
5.6.170.0230.05320.49
5.6.160.0070.07720.48
5.6.150.0100.07318.18
5.6.140.0030.08318.18
5.6.130.0130.06718.20
5.6.120.0100.08321.12
5.6.110.0030.06721.01
5.6.100.0100.08020.88
5.6.90.0070.08320.96
5.6.80.0130.07720.52
5.6.70.4230.04020.52
5.5.350.0070.06020.34
5.5.340.0000.05017.99
5.5.330.0070.07720.15
5.5.320.0030.05720.29
5.5.310.0330.07320.17
5.5.300.0070.08017.95
5.5.290.0170.07317.92
5.5.280.0070.08020.95
5.5.270.0070.04320.94
5.5.260.0100.03720.79
5.5.250.0170.06720.61
5.5.240.0170.03020.27
5.4.450.0330.07319.57
5.4.440.0270.05019.48
5.4.430.0200.04719.54
5.4.420.0200.04319.41
5.4.410.0230.04719.45
5.4.400.0370.06019.24
5.4.390.0370.06019.04
5.4.380.0200.06019.06
5.4.370.0170.04719.13
5.4.360.0230.07318.79
5.4.350.0170.03719.06
5.4.340.0200.08019.09
5.4.320.0330.06719.06
5.4.310.0370.06019.08
5.4.300.0230.06318.80
5.4.290.0300.03319.25
5.4.280.0170.05318.92
5.4.270.0400.06019.07
5.4.260.0230.06018.91
5.4.250.0300.07018.88
5.4.240.0270.06018.80
5.4.230.0200.07019.24
5.4.220.0200.03719.10
5.4.210.0170.04018.91
5.4.200.0230.07719.13
5.4.190.0170.05019.09
5.4.180.0270.05718.90
5.4.170.0330.06319.07
5.4.160.0230.07319.06
5.4.150.0330.06319.23
5.4.140.0200.07016.29
5.4.130.0230.06316.45
5.4.120.0270.06716.46
5.4.110.0170.03716.39
5.4.100.0330.06316.30
5.4.90.0300.06016.41
5.4.80.0270.05016.41
5.4.70.0270.06316.44
5.4.60.0300.06016.37
5.4.50.0230.04016.45
5.4.40.0270.05716.27
5.4.30.0270.06716.17
5.4.20.0230.07016.46
5.4.10.0200.05016.48
5.4.00.0230.04015.78
5.3.290.0270.04314.51
5.3.280.0300.03314.68
5.3.270.0300.06014.46
5.3.260.0100.05714.55
5.3.250.0200.04314.42
5.3.240.0270.07014.58
5.3.230.0130.04714.62
5.3.220.0200.06314.42
5.3.210.0170.04314.41
5.3.200.0200.05714.47
5.3.190.0170.05014.41
5.3.180.0230.06714.43
5.3.170.0270.07014.51
5.3.160.0230.07014.40
5.3.150.0230.06314.61
5.3.140.0330.06714.50
5.3.130.0170.05014.53
5.3.120.0270.06314.39
5.3.110.0300.07014.42
5.3.100.0200.07014.13
5.3.90.0270.05013.95
5.3.80.0200.04313.96
5.3.70.0170.04314.06
5.3.60.0270.04013.93
5.3.50.0300.07013.78
5.3.40.0170.05713.92
5.3.30.0230.06713.89
5.3.20.0230.06313.46
5.3.10.0230.07313.50
5.3.00.0300.06713.59
5.2.170.0130.05312.44
5.2.160.0270.03312.44
5.2.150.0170.05712.44
5.2.140.0170.04712.44
5.2.130.0170.05312.44
5.2.120.0130.04012.44
5.2.110.0200.03312.44
5.2.100.0130.04312.44
5.2.90.0170.03312.44
5.2.80.0200.03712.44
5.2.70.0130.04012.44
5.2.60.0230.05312.44
5.2.50.0200.06312.44
5.2.40.0230.04312.44
5.2.30.0100.05012.44
5.2.20.0170.05012.44
5.2.10.0230.05312.44
5.2.00.0270.05312.44
5.1.60.0270.03712.44
5.1.50.0100.03012.44
5.1.40.0130.04712.44
5.1.30.0200.04712.44
5.1.20.0170.05312.44
5.1.10.0230.05012.44
5.1.00.0170.03712.44
5.0.50.0170.04012.44
5.0.40.0100.02712.44
5.0.30.0130.05712.44
5.0.20.0100.03012.44
5.0.10.0100.04312.44
5.0.00.0100.06312.44
4.4.90.0100.02012.44
4.4.80.0030.03712.44
4.4.70.0100.02312.44
4.4.60.0100.02012.44
4.4.50.0130.02712.44
4.4.40.0130.02712.44
4.4.30.0070.02012.44
4.4.20.0070.03312.44
4.4.10.0130.03012.44
4.4.00.0070.05712.44
4.3.110.0170.01712.44
4.3.100.0100.02312.44
4.3.90.0130.02712.44
4.3.80.0030.05712.44
4.3.70.0100.02312.44
4.3.60.0070.01712.44
4.3.50.0130.03012.44
4.3.40.0000.04012.44
4.3.30.0030.02012.44
4.3.20.0030.01712.44
4.3.10.0030.01712.44
4.3.00.0100.01012.44

preferences:
40.69 ms | 401 KiB | 5 Q