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.43
8.3.50.0120.00822.05
8.3.40.0140.00719.00
8.3.30.0040.01119.02
8.3.20.0040.00420.19
8.3.10.0050.00321.73
8.3.00.0040.00422.40
8.2.180.0160.00618.79
8.2.170.0040.01222.96
8.2.160.0070.00722.36
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0000.00817.75
8.2.110.0000.00922.28
8.2.100.0080.00517.88
8.2.90.0000.00819.22
8.2.80.0000.00817.97
8.2.70.0000.00817.63
8.2.60.0000.00818.05
8.2.50.0000.00818.07
8.2.40.0000.00918.22
8.2.30.0000.00718.21
8.2.20.0050.00217.75
8.2.10.0070.00017.94
8.2.00.0050.00317.80
8.1.280.0090.00625.92
8.1.270.0060.00323.82
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00623.82
8.1.230.0090.00319.16
8.1.220.0030.00617.74
8.1.210.0030.00618.77
8.1.200.0030.00617.35
8.1.190.0040.00417.54
8.1.180.0000.00818.10
8.1.170.0060.00318.67
8.1.160.0050.00222.09
8.1.150.0030.00618.85
8.1.140.0000.00717.50
8.1.130.0030.00317.77
8.1.120.0040.00417.52
8.1.110.0040.00417.50
8.1.100.0000.00917.52
8.1.90.0000.00817.61
8.1.80.0000.00817.63
8.1.70.0000.00717.50
8.1.60.0030.00617.73
8.1.50.0000.00817.57
8.1.40.0080.00017.60
8.1.30.0060.00317.78
8.1.20.0040.00417.71
8.1.10.0040.00417.75
8.1.00.0000.00817.53
8.0.300.0040.00418.77
8.0.290.0040.00417.15
8.0.280.0000.00718.51
8.0.270.0030.00317.31
8.0.260.0040.00417.08
8.0.250.0000.00717.02
8.0.240.0100.00017.04
8.0.230.0030.00317.14
8.0.220.0000.00817.05
8.0.210.0040.00416.96
8.0.200.0000.00617.08
8.0.190.0070.00417.03
8.0.180.0050.00316.96
8.0.170.0040.00416.95
8.0.160.0070.00017.09
8.0.150.0000.00817.02
8.0.140.0000.00716.95
8.0.130.0000.00613.48
8.0.120.0000.00816.86
8.0.110.0040.00417.04
8.0.100.0040.00417.00
8.0.90.0070.00017.11
8.0.80.0130.00317.08
8.0.70.0000.00817.05
8.0.60.0040.00417.07
8.0.50.0070.00016.91
8.0.30.0150.00717.38
8.0.20.0110.00717.47
8.0.10.0040.00417.28
8.0.00.0070.01116.83
7.4.330.0000.00615.16
7.4.320.0070.00016.70
7.4.300.0060.00016.86
7.4.290.0040.00416.79
7.4.280.0050.00216.64
7.4.270.0030.00316.59
7.4.260.0000.00716.79
7.4.250.0000.00716.70
7.4.240.0060.00116.81
7.4.230.0000.00716.73
7.4.220.0090.00916.74
7.4.210.0060.00916.80
7.4.200.0000.00816.90
7.4.190.0080.00016.90
7.4.160.0160.00016.67
7.4.150.0160.00617.40
7.4.140.0090.00817.86
7.4.130.0070.01016.71
7.4.120.0050.01216.66
7.4.110.0120.00616.80
7.4.100.0120.00616.64
7.4.90.0090.00916.63
7.4.80.0060.01216.81
7.4.70.0090.00616.64
7.4.60.0070.01116.38
7.4.50.0050.00316.40
7.4.40.0040.01522.77
7.4.30.0030.01316.77
7.4.00.0060.00915.33
7.3.330.0030.00313.20
7.3.320.0030.00313.26
7.3.310.0000.00916.54
7.3.300.0040.00416.39
7.3.290.0140.00016.40
7.3.280.0080.01016.49
7.3.270.0130.00317.40
7.3.260.0140.00916.71
7.3.250.0060.01316.77
7.3.240.0120.01216.57
7.3.230.0090.00616.63
7.3.210.0090.00916.74
7.3.200.0160.00619.39
7.3.190.0120.00916.54
7.3.180.0080.00816.46
7.3.170.0030.01216.85
7.3.160.0060.01116.71
7.3.120.0060.00614.96
7.3.10.0000.01116.86
7.3.00.0030.00616.88
7.2.330.0060.01016.82
7.2.320.0070.01016.84
7.2.310.0100.00717.05
7.2.300.0100.01316.68
7.2.290.0120.00916.80
7.2.130.0040.01216.89
7.2.120.0040.00717.13
7.2.110.0000.01317.04
7.2.100.0040.00716.80
7.2.90.0060.00616.95
7.2.80.0130.00017.16
7.2.70.0070.00717.00
7.2.60.0050.00817.09
7.2.50.0040.01117.08
7.2.40.0050.00517.19
7.2.30.0090.00317.16
7.2.20.0040.00817.11
7.2.10.0080.00417.26
7.2.00.0060.00618.26
7.1.250.0060.00616.08
7.1.200.0030.00615.89
7.1.100.0070.00718.39
7.1.70.0000.00917.44
7.1.60.0040.02219.24
7.1.50.0090.00917.05
7.1.00.0070.08722.53
7.0.200.0000.00916.90
7.0.140.0070.07022.08
7.0.100.0200.05720.00
7.0.90.0100.04019.95
7.0.80.0200.04319.94
7.0.70.0200.06719.98
7.0.60.0230.07719.97
7.0.50.0230.07320.35
7.0.40.0100.07720.08
7.0.30.0030.05020.10
7.0.20.0130.04720.16
7.0.10.0030.07319.99
7.0.00.0070.06319.98
5.6.280.0070.07021.05
5.6.250.0070.07320.56
5.6.240.0070.06320.54
5.6.230.0070.07720.58
5.6.220.0070.07020.47
5.6.210.0070.03320.65
5.6.200.0100.08721.11
5.6.190.0100.08321.03
5.6.180.0030.09021.00
5.6.170.0070.07021.01
5.6.160.0130.04021.02
5.6.150.0100.08320.95
5.6.140.0070.05321.00
5.6.130.0100.08020.93
5.6.120.0030.07721.16
5.6.110.0030.06321.04
5.6.100.0030.08721.00
5.6.90.0100.04021.05
5.6.80.0130.06720.46
5.6.70.0030.07320.31
5.6.60.0130.04320.46
5.6.50.0100.04020.32
5.6.40.0000.07720.38
5.6.30.0030.03320.46
5.6.20.0100.07020.40
5.6.10.0100.07720.46
5.6.00.0070.07320.42
5.5.380.0070.03320.31
5.5.370.0070.07320.35
5.5.360.0100.07020.52
5.5.350.0170.06320.38
5.5.340.0030.08320.87
5.5.330.0000.04020.83
5.5.320.0030.05320.92
5.5.310.0030.05720.88
5.5.300.0100.03020.87
5.5.290.0000.04320.80
5.5.280.0070.08720.88
5.5.270.0100.07720.72
5.5.260.0100.07020.82
5.5.250.0100.08720.64
5.5.240.0030.04720.22
5.5.230.0100.07320.29
5.5.220.0030.05020.20
5.5.210.0070.08020.11
5.5.200.0030.07720.23
5.5.190.0100.07320.11
5.5.180.0130.07320.18
5.5.160.0070.07320.14
5.5.150.0070.07720.14
5.5.140.0200.06720.23
5.5.130.0100.08320.27
5.5.120.0130.06720.13
5.5.110.0070.03020.10
5.5.100.0070.07319.96
5.5.90.0000.04720.01
5.5.80.0030.03720.13
5.5.70.0070.03319.96
5.5.60.0030.04020.15
5.5.50.0070.03020.08
5.5.40.0000.04320.05
5.5.30.0030.03320.05
5.5.20.0030.03320.11
5.5.10.0030.04020.02
5.5.00.0000.03720.02
5.4.450.0030.06319.29
5.4.440.0000.04319.27
5.4.430.0070.07719.26
5.4.420.0100.05019.35
5.4.410.0100.03019.29
5.4.400.0130.06319.05
5.4.390.0030.04719.04
5.4.380.0100.06719.05
5.4.370.0000.08719.04
5.4.360.0100.04318.79
5.4.350.0130.07018.96
5.4.340.0030.08019.03
5.4.320.0000.06719.12
5.4.310.0070.07318.96
5.4.300.0070.07718.90
5.4.290.0070.03719.11
5.4.280.0030.04319.04
5.4.270.0070.07318.96
5.4.260.0070.03718.91
5.4.250.0100.03318.95
5.4.240.0030.04018.79
5.4.230.0070.03019.02
5.4.220.0070.02718.96
5.4.210.0070.03319.04
5.4.200.0000.03719.02
5.4.190.0070.03319.09
5.4.180.0000.04319.07
5.4.170.0030.03719.03
5.4.160.0070.03019.07
5.4.150.0100.03719.07
5.4.140.0030.03016.13
5.4.130.0130.02716.32
5.4.120.0030.03016.29
5.4.110.0030.03316.50
5.4.100.0000.03316.26
5.4.90.0000.03016.31
5.4.80.0030.03316.21
5.4.70.0000.03316.19
5.4.60.0030.03716.41
5.4.50.0070.02716.30
5.4.40.0070.03016.30
5.4.30.0030.03016.27
5.4.20.0000.03316.19
5.4.10.0000.03716.40
5.4.00.0030.03015.74
5.3.290.0030.04714.61
5.3.280.0000.04014.50
5.3.270.0000.03714.60
5.3.260.0130.03314.56
5.3.250.0070.03014.56
5.3.240.0030.03714.43
5.3.230.0070.03014.58
5.3.220.0070.02714.54
5.3.210.0070.02714.51
5.3.200.0030.03014.57
5.3.190.0070.03014.53
5.3.180.0030.03314.50
5.3.170.0100.02314.42
5.3.160.0000.03314.42
5.3.150.0000.03314.52
5.3.140.0030.03014.41
5.3.130.0030.03014.55
5.3.120.0230.02014.50
5.3.110.0030.03014.50
5.3.100.0070.02713.89
5.3.90.0030.03714.00
5.3.80.0070.03013.98
5.3.70.0030.03013.97
5.3.60.0070.02713.98
5.3.50.0000.03313.80
5.3.40.0070.03013.81
5.3.30.0000.03013.66
5.3.20.0030.03013.46
5.3.10.0000.03713.42
5.3.00.0100.02313.63
5.2.170.0030.02711.60
5.2.160.0000.02711.60
5.2.150.0000.02711.60
5.2.140.0030.02311.60
5.2.130.0030.02311.60
5.2.120.0000.02311.60
5.2.110.0030.02311.60
5.2.100.0030.02711.60
5.2.90.0030.02011.60
5.2.80.0000.02711.60
5.2.70.0000.02711.60
5.2.60.0100.02011.60
5.2.50.0030.02311.60
5.2.40.0070.02011.61
5.2.30.0030.02311.61
5.2.20.0000.03011.62
5.2.10.0030.05011.62
5.2.00.0030.02311.62
5.1.60.0030.02311.62
5.1.50.0030.03011.62
5.1.40.0030.02311.62
5.1.30.0030.02011.62
5.1.20.0070.05011.62
5.1.10.0030.05711.62
5.1.00.0000.03011.62
5.0.50.0030.04711.62
5.0.40.0000.02311.62
5.0.30.0000.03711.62
5.0.20.0030.03711.62
5.0.10.0100.03311.62
5.0.00.0030.07011.62
4.4.90.0000.01311.60
4.4.80.0000.01311.60
4.4.70.0000.02011.62
4.4.60.0000.01711.62
4.4.50.0000.01311.62
4.4.40.0070.04311.62
4.4.30.0000.03711.62
4.4.20.0030.03711.62
4.4.10.0000.04311.62
4.4.00.0000.03711.62
4.3.110.0000.02011.62
4.3.100.0000.03711.62
4.3.90.0000.02011.62
4.3.80.0000.05711.62
4.3.70.0000.02311.62
4.3.60.0070.01711.62
4.3.50.0070.02011.62
4.3.40.0070.04711.62
4.3.30.0000.02311.62
4.3.20.0000.04011.62
4.3.10.0030.03311.62
4.3.00.0030.02011.62

preferences:
53.74 ms | 401 KiB | 5 Q