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.70.0130.00716.58
8.3.60.0030.01718.38
8.3.50.0120.00822.05
8.3.40.0110.00718.89
8.3.30.0040.01118.97
8.3.20.0040.00419.02
8.3.10.0030.00521.09
8.3.00.0060.00321.73
8.2.180.0090.00916.88
8.2.170.0090.00622.96
8.2.160.0070.00719.07
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0070.00026.16
8.2.120.0040.00421.17
8.2.110.0030.00722.22
8.2.100.0070.00418.03
8.2.90.0060.00319.13
8.2.80.0000.00818.18
8.2.70.0060.00317.75
8.2.60.0000.00817.93
8.2.50.0040.00418.07
8.2.40.0030.00518.34
8.2.30.0080.00319.47
8.2.20.0040.00417.87
8.2.10.0000.00717.99
8.2.00.0000.00917.78
8.1.280.0080.00825.92
8.1.270.0050.00223.99
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0150.00322.59
8.1.230.0090.00320.89
8.1.220.0050.00318.77
8.1.210.0050.00319.04
8.1.200.0030.00617.38
8.1.190.0030.00617.40
8.1.180.0000.00818.10
8.1.170.0040.00418.76
8.1.160.0000.00718.80
8.1.150.0000.01118.71
8.1.140.0000.00817.54
8.1.130.0030.00317.91
8.1.120.0000.00717.58
8.1.110.0000.00717.50
8.1.100.0040.00417.49
8.1.90.0020.00517.62
8.1.80.0040.00417.58
8.1.70.0030.00317.51
8.1.60.0030.00517.67
8.1.50.0040.00417.68
8.1.40.0040.00417.56
8.1.30.0040.00417.81
8.1.20.0040.00417.88
8.1.10.0040.00417.78
8.1.00.0030.00917.71
8.0.300.0030.00619.89
8.0.290.0040.00417.04
8.0.280.0070.00018.47
8.0.270.0030.00617.22
8.0.260.0030.00316.97
8.0.250.0000.00717.16
8.0.240.0000.01117.19
8.0.230.0030.00317.12
8.0.220.0060.00317.02
8.0.210.0000.00716.95
8.0.200.0040.00716.95
8.0.190.0040.00417.12
8.0.180.0050.00316.95
8.0.170.0040.00416.99
8.0.160.0040.00417.04
8.0.150.0040.00416.95
8.0.140.0070.00017.00
8.0.130.0050.00013.45
8.0.120.0000.00717.05
8.0.110.0040.00417.11
8.0.100.0000.00816.90
8.0.90.0040.00417.00
8.0.80.0100.00717.02
8.0.70.0040.00417.01
8.0.60.0040.00417.05
8.0.50.0000.00716.92
8.0.30.0110.01217.12
8.0.20.0120.00817.47
8.0.10.0000.00717.04
8.0.00.0080.01317.12
7.4.330.0000.00616.86
7.4.320.0000.00616.59
7.4.300.0060.00016.74
7.4.290.0030.00316.70
7.4.280.0030.00316.63
7.4.270.0070.00016.76
7.4.260.0000.00513.61
7.4.250.0040.00416.79
7.4.240.0000.00716.63
7.4.230.0070.00016.73
7.4.220.0090.00916.74
7.4.210.0100.00416.78
7.4.200.0040.00416.80
7.4.190.0080.00016.92
7.4.160.0100.00716.66
7.4.150.0110.00717.40
7.4.140.0120.00617.86
7.4.130.0090.00916.74
7.4.120.0060.01116.75
7.4.110.0170.00016.55
7.4.100.0060.01216.70
7.4.90.0070.01116.78
7.4.80.0070.01419.39
7.4.70.0150.00616.75
7.4.60.0070.01116.59
7.4.50.0030.00616.43
7.4.40.0060.00922.77
7.4.30.0130.00316.66
7.4.00.0070.00715.00
7.3.330.0050.00013.22
7.3.320.0000.00613.21
7.3.310.0000.00716.52
7.3.300.0030.00316.43
7.3.290.0070.00716.57
7.3.280.0090.00816.49
7.3.270.0030.01517.40
7.3.260.0110.01018.24
7.3.250.0080.01216.67
7.3.240.0130.00716.63
7.3.230.0100.00716.79
7.3.210.0030.01316.44
7.3.200.0130.00619.39
7.3.190.0100.00716.72
7.3.180.0060.01216.38
7.3.170.0110.00716.75
7.3.160.0100.01016.42
7.3.120.0090.00615.03
7.3.110.0030.01215.11
7.3.100.0070.00714.86
7.3.90.0030.00915.00
7.3.80.0000.01014.96
7.3.70.0000.01314.95
7.3.60.0030.01315.06
7.3.50.0060.00915.10
7.3.40.0100.00315.14
7.3.30.0030.01015.06
7.3.20.0060.00916.89
7.3.10.0100.00716.86
7.3.00.0070.01016.77
7.2.330.0090.00916.77
7.2.320.0030.01516.75
7.2.310.0040.01816.84
7.2.300.0100.00716.97
7.2.290.0120.00616.91
7.2.240.0050.00515.28
7.2.230.0040.01115.30
7.2.220.0040.01115.32
7.2.210.0080.00815.29
7.2.200.0060.00915.41
7.2.190.0060.00315.20
7.2.180.0000.01715.49
7.2.170.0030.00915.32
7.2.160.0110.00415.36
7.2.150.0000.01117.17
7.2.140.0040.01117.08
7.2.130.0040.01217.15
7.2.120.0100.00717.30
7.2.110.0060.00917.27
7.2.100.0030.00517.06
7.2.90.0090.00617.38
7.2.80.0060.00617.11
7.2.70.0030.00617.12
7.2.60.0080.00517.12
7.2.50.0060.00917.05
7.2.40.0070.00317.24
7.2.30.0040.00717.25
7.2.20.0140.00317.18
7.2.10.0090.00617.10
7.2.00.0030.00917.30
7.1.330.0080.00616.27
7.1.320.0060.00916.17
7.1.310.0060.00616.16
7.1.300.0030.01016.14
7.1.290.0030.00915.91
7.1.280.0040.01215.94
7.1.270.0000.01116.16
7.1.260.0030.00616.04
7.1.250.0040.01115.81
7.1.200.0000.01016.11
7.1.100.0080.00418.45
7.1.70.0100.00017.07
7.1.60.0130.01319.17
7.1.50.0170.00716.91
7.1.00.0000.03722.32
7.0.200.0030.00616.97
7.0.140.0030.07322.09
7.0.110.0030.05019.90
7.0.100.0000.04020.06
7.0.90.0070.06319.94
7.0.80.0070.08319.93
7.0.70.0070.08319.99
7.0.60.0130.08019.91
7.0.50.0130.03720.06
7.0.40.0100.08319.82
7.0.30.0100.04019.84
7.0.20.0170.06719.86
7.0.10.0100.04719.65
7.0.00.0270.06019.82
5.6.280.0030.07321.09
5.6.260.0000.05020.66
5.6.250.0000.06320.68
5.6.240.0170.05020.68
5.6.230.0100.03720.62
5.6.220.0070.08320.69
5.6.210.0070.07320.63
5.6.200.0100.04320.70
5.6.190.0030.08720.65
5.6.180.0130.07720.66
5.6.170.0130.07320.56
5.6.160.0100.08020.56
5.6.150.0170.06720.59
5.6.140.0000.07320.62
5.6.130.0130.07020.61
5.6.120.0130.07720.46
5.6.110.0130.06320.57
5.6.100.0170.06720.45
5.6.90.0100.08320.63
5.6.80.0170.06720.23
5.6.70.0070.08020.00
5.6.60.0070.08320.01
5.6.50.0070.08020.01
5.6.40.0000.08319.96
5.6.30.0000.08720.00
5.6.20.0070.07020.01
5.6.10.0030.07719.94
5.6.00.0100.08020.00
5.5.380.0030.04020.41
5.5.370.0100.07320.52
5.5.360.0200.07020.36
5.5.350.0070.08320.45
5.5.340.0070.08321.01
5.5.330.0270.06320.89
5.5.320.0100.05320.86
5.5.310.0100.08320.89
5.5.300.0030.07720.90
5.5.290.0100.07720.86
5.5.280.0100.07320.86
5.5.270.0070.08320.95
5.5.260.0070.08320.80
5.5.250.0100.08320.70
5.5.240.0030.08320.35
5.5.230.0170.07320.16
5.5.220.0070.07320.07
5.5.210.0030.08020.41
5.5.200.0070.07720.22
5.5.190.0030.06020.25
5.5.180.0100.07020.05
5.5.160.0070.07720.18
5.5.150.0100.07020.35
5.5.140.0170.03720.36
5.5.130.0070.08720.36
5.5.120.0130.06320.33
5.5.110.0070.06720.22
5.5.100.0200.06319.99
5.5.90.0100.05320.04
5.5.80.0100.04020.16
5.5.70.0100.07320.04
5.5.60.0200.04020.24
5.5.50.0170.05720.08
5.5.40.0030.07319.96
5.5.30.0130.07019.99
5.5.20.0130.07320.05
5.5.10.0030.08020.00
5.5.00.0130.07319.94
5.4.450.0130.08319.28
5.4.440.0070.08019.35
5.4.430.0000.08319.27
5.4.420.0070.08019.59
5.4.410.0070.08019.10
5.4.400.0170.06719.03
5.4.390.0100.07319.27
5.4.380.0000.07718.95
5.4.370.0070.07718.95
5.4.360.0030.05019.10
5.4.350.0100.06019.18
5.4.340.0030.08019.18
5.4.320.0070.07019.27
5.4.310.0070.08019.25
5.4.300.0130.07018.95
5.4.290.0030.07719.11
5.4.280.0030.07319.03
5.4.270.0100.04719.05
5.4.260.0070.04319.25
5.4.250.0070.04318.92
5.4.240.0100.07019.07
5.4.230.0130.06718.95
5.4.220.0100.07018.97
5.4.210.0030.07719.02
5.4.200.0070.07019.07
5.4.190.0200.06019.17
5.4.180.0170.06319.23
5.4.170.0070.07719.15
5.4.160.0070.07719.18
5.4.150.0100.04319.09
5.4.140.0000.04016.37
5.4.130.0100.03316.51
5.4.120.0070.07016.36
5.4.110.0100.07016.51
5.4.100.0100.07016.38
5.4.90.0070.07016.40
5.4.80.0030.08016.36
5.4.70.0070.07316.27
5.4.60.0130.06316.40
5.4.50.0100.07016.34
5.4.40.0070.07016.52
5.4.30.0030.06716.34
5.4.20.0170.03316.46
5.4.10.0070.07016.50
5.4.00.0030.07315.80
5.3.290.0100.07314.49
5.3.280.0070.07014.54
5.3.270.0030.08014.41
5.3.260.0030.07714.54
5.3.250.0100.07714.66
5.3.240.0070.07314.55
5.3.230.0100.07314.48
5.3.220.0070.07314.36
5.3.210.0130.05714.45
5.3.200.0170.05714.51
5.3.190.0030.07714.47
5.3.180.0030.07714.57
5.3.170.0100.07314.50
5.3.160.0100.06714.50
5.3.150.0100.07014.66
5.3.140.0170.06714.57
5.3.130.0130.03714.55
5.3.120.0200.06314.50
5.3.110.0100.08014.39
5.3.100.0030.08013.91
5.3.90.0000.08014.12
5.3.80.0100.07014.08
5.3.70.0270.04014.02
5.3.60.0100.06314.10
5.3.50.0070.07313.82
5.3.40.0100.06013.89
5.3.30.0100.06714.00
5.3.20.0100.03313.53
5.3.10.0100.06313.55
5.3.00.0100.05013.73
5.2.170.0030.06012.01
5.2.160.0100.04312.01
5.2.150.0070.04012.01
5.2.140.0000.04712.01
5.2.130.0030.03012.01
5.2.120.0100.06012.01
5.2.110.0030.06312.01
5.2.100.0030.06312.01
5.2.90.0000.06012.01
5.2.80.0070.06012.01
5.2.70.0070.06012.01
5.2.60.0070.06312.01
5.2.50.0000.05312.01
5.2.40.0000.04712.01
5.2.30.0070.05012.01
5.2.20.0030.06012.01
5.2.10.0000.06312.01
5.2.00.0070.05712.01
5.1.60.0070.05012.01
5.1.50.0100.05012.01
5.1.40.0030.05712.01
5.1.30.0100.05312.01
5.1.20.0070.05312.01
5.1.10.0070.05312.01
5.1.00.0030.05712.01
5.0.50.0030.04712.01
5.0.40.0030.04012.01
5.0.30.0030.06712.01
5.0.20.0070.03712.01
5.0.10.0000.02712.01
5.0.00.0030.06012.01
4.4.90.0030.03712.01
4.4.80.0030.03012.01
4.4.70.0030.03312.01
4.4.60.0030.03712.01
4.4.50.0070.03012.01
4.4.40.0030.05312.01
4.4.30.0030.03312.01
4.4.20.0070.03312.01
4.4.10.0070.03312.01
4.4.00.0070.05312.01
4.3.110.0030.03312.01
4.3.100.0030.02312.01
4.3.90.0030.03312.01
4.3.80.0000.05312.01
4.3.70.0030.03312.01
4.3.60.0070.03012.01
4.3.50.0030.03312.01
4.3.40.0030.05012.01
4.3.30.0000.03312.01
4.3.20.0000.03712.01
4.3.10.0000.03012.01
4.3.00.0030.02712.01

preferences:
53.91 ms | 401 KiB | 5 Q