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"; 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.0180.00017.00
8.3.50.0090.00916.67
8.3.40.0070.00718.88
8.3.30.0110.00418.96
8.3.20.0030.00618.90
8.3.10.0030.00619.20
8.3.00.0110.00019.50
8.2.180.0120.00916.63
8.2.170.0070.00722.96
8.2.160.0060.01018.81
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00421.07
8.2.110.0030.00621.18
8.2.100.0000.01118.22
8.2.90.0070.00419.21
8.2.80.0060.00317.97
8.2.70.0060.00317.88
8.2.60.0080.00017.93
8.2.50.0000.00818.05
8.2.40.0040.00419.73
8.2.30.0060.00317.92
8.2.20.0060.00317.77
8.2.10.0090.00017.96
8.2.00.0000.00717.82
8.1.280.0110.00425.92
8.1.270.0000.00823.99
8.1.260.0030.00626.35
8.1.250.0080.00028.09
8.1.240.0060.00321.16
8.1.230.0080.00317.79
8.1.220.0000.00817.74
8.1.210.0050.00518.77
8.1.200.0030.00617.36
8.1.190.0080.00317.36
8.1.180.0000.00818.10
8.1.170.0030.00517.62
8.1.160.0040.00418.96
8.1.150.0080.00018.84
8.1.140.0040.00417.71
8.1.130.0000.00717.47
8.1.120.0070.00017.50
8.1.110.0040.00417.64
8.1.100.0070.00017.67
8.1.90.0030.00617.60
8.1.80.0000.00717.55
8.1.70.0040.00417.60
8.1.60.0060.00317.66
8.1.50.0040.00417.52
8.1.40.0040.00417.58
8.1.30.0060.00317.63
8.1.20.0070.00017.80
8.1.10.0070.00017.70
8.1.00.0030.00617.71
8.0.300.0000.00818.84
8.0.290.0040.00416.88
8.0.280.0040.00218.59
8.0.270.0000.00717.32
8.0.260.0040.00416.93
8.0.250.0050.00217.16
8.0.240.0000.00717.20
8.0.230.0090.00017.25
8.0.220.0000.00717.16
8.0.210.0000.00817.11
8.0.200.0030.00317.04
8.0.190.0040.00417.18
8.0.180.0120.00017.04
8.0.170.0050.00317.16
8.0.160.0050.00217.10
8.0.150.0040.00417.14
8.0.140.0000.00917.03
8.0.130.0030.00313.57
8.0.120.0070.00317.03
8.0.110.0050.00317.04
8.0.100.0030.00617.07
8.0.90.0040.00417.21
8.0.80.0090.00617.04
8.0.70.0000.00817.00
8.0.60.0080.00017.09
8.0.50.0030.00616.89
8.0.30.0100.01017.17
8.0.20.0060.01617.40
8.0.10.0040.00417.03
8.0.00.0100.01316.90
7.4.330.0020.00213.14
7.4.320.0030.00316.70
7.4.300.0000.00616.68
7.4.290.0030.00616.84
7.4.280.0080.00016.72
7.4.270.0040.00416.63
7.4.260.0000.00613.48
7.4.250.0040.00416.85
7.4.240.0000.00716.83
7.4.230.0050.00216.55
7.4.220.0100.01016.57
7.4.210.0110.00416.71
7.4.200.0030.00316.70
7.4.190.0060.00316.81
7.4.160.0080.00816.90
7.4.150.0160.00416.75
7.4.140.0230.00017.86
7.4.130.0160.00816.84
7.4.120.0120.01016.71
7.4.110.0110.00716.77
7.4.100.0030.02016.66
7.4.90.0090.01716.70
7.4.80.0070.01119.39
7.4.70.0080.00816.66
7.4.60.0060.00916.85
7.4.50.0030.00616.41
7.4.40.0000.01816.62
7.4.30.0060.01016.72
7.4.00.0060.00914.92
7.3.330.0000.00713.46
7.3.320.0050.00013.25
7.3.310.0040.00416.52
7.3.300.0060.00016.53
7.3.290.0090.00416.45
7.3.280.0040.01216.52
7.3.270.0100.00716.43
7.3.260.0140.01016.45
7.3.240.0100.00616.57
7.3.230.0100.00716.44
7.3.210.0100.00716.57
7.3.200.0060.01216.75
7.3.190.0130.00316.43
7.3.180.0100.00616.53
7.3.170.0030.01416.57
7.3.160.0100.01416.60
7.3.120.0060.00615.02
7.3.10.0150.00416.51
7.3.00.0100.00516.67
7.2.330.0100.00716.73
7.2.320.0130.00516.79
7.2.310.0100.01416.69
7.2.300.0180.00616.99
7.2.290.0120.00916.94
7.2.130.0050.01116.91
7.2.120.0110.00217.11
7.2.110.0050.00817.11
7.2.100.0030.01216.82
7.2.90.0070.00517.21
7.2.80.0070.00817.20
7.2.70.0050.00917.09
7.2.60.0070.01117.07
7.2.50.0090.00717.16
7.2.40.0080.00716.92
7.2.30.0110.00516.95
7.2.20.0080.00717.10
7.2.10.0060.01017.02
7.2.00.0070.00717.97
7.1.250.0000.01315.90
7.1.240.0060.00615.99
7.1.230.0100.00015.98
7.1.220.0030.00815.69
7.1.210.0100.00016.04
7.1.200.0120.00015.88
7.1.190.0070.00316.18
7.1.180.0080.00316.05
7.1.170.0090.00615.95
7.1.160.0040.01215.89
7.1.150.0040.00715.64
7.1.140.0120.00615.65
7.1.130.0090.00415.64
7.1.120.0110.00816.05
7.1.110.0160.01016.02
7.1.100.0260.00817.28
7.1.90.0000.01016.04
7.1.80.0120.00615.97
7.1.70.0020.00816.70
7.1.60.0020.01717.53
7.1.50.0100.00716.65
7.1.40.0090.01115.73
7.1.30.0000.01216.11
7.1.20.0060.00915.91
7.1.10.0100.00315.74
7.1.00.0100.03519.05
7.0.330.0000.00915.64
7.0.320.0030.00715.54
7.0.310.0100.00615.75
7.0.300.0070.00315.69
7.0.290.0090.00615.40
7.0.280.0040.00915.67
7.0.270.0120.00415.46
7.0.260.0120.00615.48
7.0.250.0060.01015.70
7.0.240.0150.00015.41
7.0.230.0060.00615.53
7.0.220.0060.00815.57
7.0.210.0000.01215.52
7.0.200.0050.00816.33
7.0.190.0040.00715.71
7.0.180.0000.00915.50
7.0.170.0120.00315.44
7.0.160.0060.00615.58
7.0.150.0070.01315.25
7.0.140.0080.03718.66
7.0.130.0130.00315.25
7.0.120.0090.01618.91
7.0.110.0060.00615.52
7.0.100.0000.01415.25
7.0.90.0100.00315.67
7.0.80.0080.00415.34
7.0.70.0040.00715.63
7.0.60.0070.02318.65
7.0.50.0020.02516.53
7.0.40.0030.05116.81
7.0.30.0250.03716.81
7.0.20.0130.04216.71
7.0.10.0030.05116.88
7.0.00.0080.03016.93
5.6.380.0000.01214.51
5.6.370.0070.00414.39
5.6.360.0060.00614.33
5.6.350.0040.00814.29
5.6.340.0100.00014.74
5.6.330.0040.00714.51
5.6.320.0000.01214.56
5.6.310.0060.00614.62
5.6.300.0040.01014.05
5.6.290.0040.00714.71
5.6.280.0030.04117.57
5.6.270.0070.00714.80
5.6.260.0070.00714.45
5.6.250.0000.01214.39
5.6.240.0090.00614.07
5.6.230.0070.00714.27
5.6.220.0080.00514.37
5.6.210.0070.04217.43
5.6.200.0040.04616.29
5.6.190.0030.03317.38
5.6.180.0110.02317.67
5.6.170.0210.03617.39
5.6.160.0070.04817.63
5.6.150.0030.03416.35
5.6.140.0070.04516.36
5.6.130.0030.02316.18
5.6.120.0080.02217.81
5.6.110.0080.04317.63
5.6.100.0040.02617.78
5.6.90.0050.04517.60
5.6.80.0080.04317.32
5.6.70.0000.01614.66
5.6.60.0030.00914.09
5.6.50.0000.01214.15
5.6.40.0100.00314.54
5.6.30.0060.00614.39
5.6.20.0030.00914.44
5.6.10.0070.00714.41
5.6.00.0030.00714.18
5.5.380.0000.01111.18
5.5.370.0090.00011.02
5.5.360.0050.00211.20
5.5.350.0030.01715.84
5.5.340.0060.02614.61
5.5.330.0150.01915.76
5.5.320.0170.03015.81
5.5.310.0180.03815.65
5.5.300.0030.02314.59
5.5.290.0020.04714.63
5.5.280.0050.03015.94
5.5.270.0100.04216.16
5.5.260.0050.04416.04
5.5.250.0090.04115.85
5.5.240.0090.03815.57
5.5.230.0000.01211.11
5.5.220.0040.00410.89
5.5.210.0000.00810.92
5.5.200.0030.00810.92
5.5.190.0060.00611.05
5.5.180.0110.00011.27
5.5.170.0090.00311.13
5.5.160.0040.00711.20
5.5.150.0070.00010.92
5.5.140.0060.00310.90
5.5.130.0050.00211.24
5.5.120.0000.00810.70
5.5.110.0030.00510.75
5.5.100.0040.00811.04
5.5.90.0070.00710.93
5.5.80.0040.00411.32
5.5.70.0040.00411.07
5.5.60.0000.00710.87
5.5.50.0060.00311.12
5.5.40.0090.00311.08
5.5.30.0040.00411.07
5.5.20.0080.00411.20
5.5.10.0000.00811.10
5.5.00.0060.00611.19
5.4.450.0050.04315.16
5.4.440.0100.02515.04
5.4.430.0050.03215.12
5.4.420.0040.03115.11
5.4.410.0050.04015.17
5.4.400.0050.04015.03
5.4.390.0050.02714.89
5.4.380.0070.02714.84
5.4.370.0060.03815.12
5.4.360.0040.03215.01
5.4.350.0060.02015.09
5.4.340.0060.02115.18
5.4.330.0060.00310.71
5.4.320.0040.02015.07
5.4.310.0110.02015.15
5.4.300.0050.03515.04
5.4.290.0020.04414.99
5.4.280.0070.03715.01
5.4.270.0020.02415.19
5.4.260.0100.03814.81
5.4.250.0030.03915.12
5.4.240.0050.03015.05
5.4.230.0070.03514.81
5.4.220.0070.03614.89
5.4.210.0080.02815.07
5.4.200.0050.02014.92
5.4.190.0020.02514.98
5.4.180.0080.03615.02
5.4.170.0050.02814.94
5.4.160.0050.02115.07
5.4.150.0050.02615.18
5.4.140.0060.03513.57
5.4.130.0050.02513.74
5.4.120.0050.03713.67
5.4.110.0050.02813.80
5.4.100.0070.03913.69
5.4.90.0060.04113.65
5.4.80.0080.02313.57
5.4.70.0050.03713.73
5.4.60.0030.04613.78
5.4.50.0030.04113.85
5.4.40.0030.02513.56
5.4.30.0000.02313.71
5.4.20.0050.04013.44
5.4.10.0060.03313.49
5.4.00.0040.04013.34
5.3.290.0020.02712.50
5.3.280.0070.03612.50
5.3.270.0050.02312.47
5.3.260.0040.03112.56
5.3.250.0030.02412.46
5.3.240.0080.02212.46
5.3.230.0080.03712.39
5.3.220.0070.03712.55
5.3.210.0060.02712.53
5.3.200.0080.02312.50
5.3.190.0060.04012.55
5.3.180.0030.03612.57
5.3.170.0030.02712.54
5.3.160.0000.03612.52
5.3.150.0050.03812.59
5.3.140.0090.02912.57
5.3.130.0030.04012.43
5.3.120.0080.03712.58
5.3.110.0030.04312.53
5.3.100.0050.04312.14
5.3.90.0040.04112.21
5.3.80.0020.02812.16
5.3.70.0020.03912.17
5.3.60.0050.02312.17
5.3.50.0050.03812.16
5.3.40.0070.03112.22
5.3.30.0080.03712.13
5.3.20.0070.03912.02
5.3.10.0070.03511.86
5.3.00.0070.01611.80
5.2.170.0000.02510.53
5.2.160.0080.02810.50
5.2.150.0020.03510.51
5.2.140.0060.03010.51
5.2.130.0020.03210.61
5.2.120.0050.01810.48
5.2.110.0070.02710.52
5.2.100.0030.03810.51
5.2.90.0060.03210.51
5.2.80.0100.01810.49
5.2.70.0020.03510.53
5.2.60.0030.03110.47
5.2.50.0050.02010.47
5.2.40.0070.03210.47
5.2.30.0070.02710.46
5.2.20.0030.02610.43
5.2.10.0030.03110.40
5.2.00.0020.01810.33
5.1.60.0020.0219.97
5.1.50.0010.0309.97
5.1.40.0030.0279.96
5.1.30.0080.01710.15
5.1.20.0040.01710.08
5.1.10.0000.01810.04
5.1.00.0020.03010.01
5.0.50.0070.0179.18
5.0.40.0000.0229.11
5.0.30.0070.0329.04
5.0.20.0020.0169.15
5.0.10.0020.0149.14
5.0.00.0030.0179.06
4.4.90.0000.0238.80
4.4.80.0020.0208.80
4.4.70.0030.0188.80
4.4.60.0000.0128.80
4.4.50.0010.0198.80
4.4.40.0010.0268.80
4.4.30.0050.0178.80
4.4.20.0000.0108.80
4.4.10.0030.0098.80
4.4.00.0020.0198.80
4.3.110.0030.0108.80
4.3.100.0010.0138.80
4.3.90.0020.0108.80
4.3.80.0030.0158.80
4.3.70.0030.0128.80
4.3.60.0030.0138.80
4.3.50.0020.0208.80
4.3.40.0050.0238.80
4.3.30.0020.0208.80
4.3.20.0020.0208.80
4.3.10.0010.0168.80
4.3.00.0010.0158.80

preferences:
53.13 ms | 401 KiB | 5 Q