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.40.0070.01118.96
8.3.30.0120.00319.22
8.3.20.0050.00320.29
8.3.10.0040.01122.00
8.3.00.0040.00422.29
8.2.170.0150.00022.96
8.2.160.0070.00721.06
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0050.00226.16
8.2.120.0040.00817.75
8.2.110.0030.00622.19
8.2.100.0060.00620.01
8.2.90.0040.00419.17
8.2.80.0000.00818.04
8.2.70.0040.00417.74
8.2.60.0070.00318.16
8.2.50.0030.00618.07
8.2.40.0040.00418.16
8.2.30.0080.00018.04
8.2.20.0000.00817.76
8.2.10.0000.00817.91
8.2.00.0040.00417.96
8.1.270.0040.00422.14
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00323.92
8.1.230.0110.00019.00
8.1.220.0030.00517.79
8.1.210.0000.00818.77
8.1.200.0090.00017.38
8.1.190.0050.00317.53
8.1.180.0080.00018.62
8.1.170.0000.00818.69
8.1.160.0000.00722.07
8.1.150.0070.00018.79
8.1.140.0040.00417.66
8.1.130.0030.00317.70
8.1.120.0050.00317.60
8.1.110.0040.00417.52
8.1.100.0020.00517.68
8.1.90.0000.00817.64
8.1.80.0000.00817.61
8.1.70.0070.00017.52
8.1.60.0030.00617.58
8.1.50.0030.00517.70
8.1.40.0000.00817.66
8.1.30.0000.00817.86
8.1.20.0000.00817.78
8.1.10.0030.00617.75
8.1.00.0040.00417.64
8.0.300.0040.00418.77
8.0.290.0040.00417.15
8.0.280.0000.00718.49
8.0.270.0030.00617.30
8.0.260.0030.00316.99
8.0.250.0050.00317.00
8.0.240.0040.00417.11
8.0.230.0030.00317.13
8.0.220.0080.00017.08
8.0.210.0030.00317.08
8.0.200.0050.00217.00
8.0.190.0000.00717.14
8.0.180.0000.00717.12
8.0.170.0070.00017.03
8.0.160.0070.00017.14
8.0.150.0040.00417.01
8.0.140.0040.00417.02
8.0.130.0000.00613.42
8.0.120.0000.00817.01
8.0.110.0000.00717.00
8.0.100.0040.00417.01
8.0.90.0040.00417.11
8.0.80.0130.00417.05
8.0.70.0000.00816.93
8.0.60.0030.00517.11
8.0.50.0030.00616.93
8.0.30.0080.01717.27
8.0.20.0110.00917.40
8.0.10.0040.00417.05
8.0.00.0160.00516.84
7.4.330.0000.00515.00
7.4.320.0030.00316.84
7.4.300.0070.00016.75
7.4.290.0050.00216.83
7.4.280.0030.00316.81
7.4.270.0000.00716.66
7.4.260.0040.00416.78
7.4.250.0040.00416.76
7.4.240.0010.00616.71
7.4.230.0030.00316.72
7.4.220.0070.01016.74
7.4.210.0080.01116.76
7.4.200.0030.00316.76
7.4.190.0000.00816.72
7.4.160.0090.00616.86
7.4.150.0150.00317.40
7.4.140.0180.00217.86
7.4.130.0090.00816.80
7.4.120.0110.00716.72
7.4.110.0040.01216.60
7.4.100.0110.00716.50
7.4.90.0060.01216.63
7.4.80.0120.00619.39
7.4.70.0150.00016.68
7.4.60.0060.01016.64
7.4.50.0030.00616.46
7.4.40.0040.01122.77
7.4.30.0080.00816.83
7.4.00.0000.01715.25
7.3.330.0070.00013.23
7.3.320.0000.00513.37
7.3.310.0050.00316.43
7.3.300.0030.00316.51
7.3.290.0000.01416.53
7.3.280.0100.00516.48
7.3.270.0100.00617.40
7.3.260.0100.00716.60
7.3.250.0050.01516.61
7.3.240.0030.01416.80
7.3.230.0070.01016.57
7.3.210.0130.00316.46
7.3.200.0040.01916.62
7.3.190.0030.01716.54
7.3.180.0080.00816.71
7.3.170.0060.01116.66
7.3.160.0100.00716.68
7.3.120.0030.01015.28
7.3.10.0070.00716.88
7.3.00.0060.01016.89
7.2.330.0130.00616.80
7.2.320.0100.00716.86
7.2.310.0110.00617.01
7.2.300.0140.00316.87
7.2.290.0060.01216.75
7.2.130.0090.00616.92
7.2.120.0080.00317.26
7.2.110.0070.00717.25
7.2.100.0090.00617.15
7.2.90.0000.01617.18
7.2.80.0140.00317.00
7.2.70.0080.00417.07
7.2.60.0050.01017.05
7.2.50.0030.01016.95
7.2.40.0030.01417.12
7.2.30.0000.01017.36
7.2.20.0130.00017.18
7.2.10.0120.00317.23
7.2.00.0060.00618.60
7.1.250.0030.00915.86
7.1.240.0090.00615.93
7.1.230.0070.00315.75
7.1.220.0070.00716.07
7.1.210.0070.00316.01
7.1.200.0160.00515.99
7.1.190.0060.00616.18
7.1.180.0040.00815.98
7.1.170.0030.00615.94
7.1.160.0030.01016.07
7.1.150.0090.00915.97
7.1.140.0070.00716.07
7.1.130.0070.00716.19
7.1.120.0000.01415.81
7.1.110.0100.00315.77
7.1.100.0050.00517.31
7.1.90.0070.00315.98
7.1.80.0070.01015.68
7.1.70.0040.00816.73
7.1.60.0040.01117.87
7.1.50.0070.00516.65
7.1.40.0110.00715.76
7.1.30.0040.01115.83
7.1.20.0140.00016.12
7.1.10.0030.00716.04
7.1.00.0060.03819.11
7.0.330.0060.00615.50
7.0.320.0110.00415.54
7.0.310.0120.00315.42
7.0.300.0000.01415.66
7.0.290.0090.00015.67
7.0.280.0060.00615.70
7.0.270.0000.00915.79
7.0.260.0070.00715.68
7.0.250.0040.01115.40
7.0.240.0090.00915.70
7.0.230.0040.00815.23
7.0.220.0140.00015.66
7.0.210.0030.00915.59
7.0.200.0040.00716.25
7.0.190.0060.00615.68
7.0.180.0070.00715.59
7.0.170.0090.00615.71
7.0.160.0000.00915.66
7.0.150.0060.00315.59
7.0.140.0020.04418.79
7.0.130.0070.00315.43
7.0.120.0040.01115.73
7.0.110.0070.00715.67
7.0.100.0070.04417.78
7.0.90.0060.03017.86
7.0.80.0050.04717.72
7.0.70.0140.03617.98
7.0.60.0120.03717.86
7.0.50.0100.04118.03
7.0.40.0110.04216.79
7.0.30.0080.04517.04
7.0.20.0070.05016.84
7.0.10.0050.04516.75
7.0.00.0070.04617.03
5.6.380.0140.00314.82
5.6.370.0060.00614.57
5.6.360.0080.00414.32
5.6.350.0110.00414.39
5.6.340.0000.01314.54
5.6.330.0070.01014.53
5.6.320.0060.00914.36
5.6.310.0070.00414.45
5.6.300.0000.01414.64
5.6.290.0040.01114.52
5.6.280.0000.01214.33
5.6.270.0100.00614.52
5.6.260.0030.01214.32
5.6.250.0070.04117.51
5.6.240.0110.04217.51
5.6.230.0100.04017.58
5.6.220.0120.03517.56
5.6.210.0090.04017.68
5.6.200.0090.04717.70
5.6.190.0120.02217.85
5.6.180.0060.04717.65
5.6.170.0050.04517.62
5.6.160.0160.03617.71
5.6.150.0040.04417.70
5.6.140.0110.04317.81
5.6.130.0080.04317.69
5.6.120.0110.03817.58
5.6.110.0080.04717.73
5.6.100.0100.04217.59
5.6.90.0090.03717.65
5.6.80.0110.03817.42
5.6.70.0050.04217.31
5.6.60.0100.04317.45
5.6.50.0030.04317.30
5.6.40.0050.04517.42
5.6.30.0090.03917.41
5.6.20.0070.03717.26
5.6.10.0040.04417.38
5.6.00.0050.04717.23
5.5.380.0100.02515.73
5.5.370.0110.03715.76
5.5.360.0070.04315.69
5.5.350.0180.02515.63
5.5.340.0090.04715.72
5.5.330.0070.04315.99
5.5.320.0110.04116.09
5.5.310.0050.04716.06
5.5.300.0050.02915.97
5.5.290.0110.03915.89
5.5.280.0030.04716.06
5.5.270.0030.04416.06
5.5.260.0080.03815.91
5.5.250.0020.03015.79
5.5.240.0020.05015.61
5.5.230.0050.04415.63
5.5.220.0130.03515.57
5.5.210.0110.04015.42
5.5.200.0050.04815.64
5.5.190.0070.04215.45
5.5.180.0120.04015.64
5.5.170.0100.00010.96
5.5.160.0040.04615.51
5.5.150.0080.03715.72
5.5.140.0070.03415.77
5.5.130.0080.03415.48
5.5.120.0060.04415.58
5.5.110.0030.04215.52
5.5.100.0030.03815.64
5.5.90.0050.04315.62
5.5.80.0080.03515.61
5.5.70.0110.03715.54
5.5.60.0100.03815.48
5.5.50.0050.04115.68
5.5.40.0000.03115.67
5.5.30.0070.03015.44
5.5.20.0090.01815.61
5.5.10.0060.02015.55
5.5.00.0050.02315.50
5.4.450.0070.04015.39
5.4.440.0050.04215.17
5.4.430.0050.02815.34
5.4.420.0050.04615.28
5.4.410.0090.03614.99
5.4.400.0050.04215.00
5.4.390.0070.04215.09
5.4.380.0080.03815.00
5.4.370.0080.04014.91
5.4.360.0020.04415.12
5.4.350.0100.03014.97
5.4.340.0060.04115.07
5.4.330.0080.00311.03
5.4.320.0110.03215.12
5.4.310.0080.03115.01
5.4.300.0050.04315.09
5.4.290.0020.02714.93
5.4.280.0060.03914.97
5.4.270.0060.04015.02
5.4.260.0050.04115.05
5.4.250.0090.03914.88
5.4.240.0070.04015.11
5.4.230.0090.03915.17
5.4.220.0030.04314.93
5.4.210.0060.03814.88
5.4.200.0050.02115.11
5.4.190.0070.03815.04
5.4.180.0060.03114.88
5.4.170.0050.02514.78
5.4.160.0080.01814.96
5.4.150.0020.02615.05
5.4.140.0060.01713.67
5.4.130.0020.03213.62
5.4.120.0000.02113.66
5.4.110.0030.02513.70
5.4.100.0110.02713.66
5.4.90.0050.02813.68
5.4.80.0050.02113.74
5.4.70.0110.01313.73
5.4.60.0030.02113.59
5.4.50.0100.02513.65
5.4.40.0050.02313.82
5.4.30.0030.03213.71
5.4.20.0020.02413.60
5.4.10.0060.02213.63
5.4.00.0090.01713.44
5.3.290.0070.04412.55
5.3.280.0050.03912.52
5.3.270.0030.02112.53
5.3.260.0030.02312.61
5.3.250.0060.01912.53
5.3.240.0040.03012.58
5.3.230.0000.02512.44
5.3.220.0020.02312.37
5.3.210.0020.02912.52
5.3.200.0040.02912.53
5.3.190.0060.02912.47
5.3.180.0040.02112.56
5.3.170.0040.02412.63
5.3.160.0110.02812.49
5.3.150.0050.03412.53
5.3.140.0070.02712.47
5.3.130.0060.02312.45
5.3.120.0020.02412.47
5.3.110.0060.02012.43
5.3.100.0030.02512.17
5.3.90.0060.03512.22
5.3.80.0070.03012.15
5.3.70.0030.02212.11
5.3.60.0050.02212.21
5.3.50.0030.02312.14
5.3.40.0030.02312.14
5.3.30.0020.02212.26
5.3.20.0070.02211.98
5.3.10.0040.03411.88
5.3.00.0080.01711.83
5.2.170.0040.01510.64
5.2.160.0080.01510.65
5.2.150.0020.01910.68
5.2.140.0020.02310.60
5.2.130.0030.02810.63
5.2.120.0050.01710.59
5.2.110.0050.03310.56
5.2.100.0030.02310.56
5.2.90.0110.01010.64
5.2.80.0040.01710.56
5.2.70.0070.01510.63
5.2.60.0070.01510.59
5.2.50.0070.01410.56
5.2.40.0000.03410.56
5.2.30.0070.01310.56
5.2.20.0030.01610.56
5.2.10.0080.01310.56
5.2.00.0050.01810.56
5.1.60.0020.01410.56
5.1.50.0060.01410.56
5.1.40.0040.01410.56
5.1.30.0030.01510.56
5.1.20.0020.01610.56
5.1.10.0050.01210.56
5.1.00.0000.02110.56
5.0.50.0000.01910.56
5.0.40.0040.02410.56
5.0.30.0030.02310.56
5.0.20.0000.01710.56
5.0.10.0030.02610.56
5.0.00.0050.03110.56
4.4.90.0030.01310.56
4.4.80.0020.01010.56
4.4.70.0010.01410.56
4.4.60.0030.01010.56
4.4.50.0000.01210.56
4.4.40.0000.01610.56
4.4.30.0000.01510.56
4.4.20.0020.01010.56
4.4.10.0030.01310.56
4.4.00.0020.01510.56
4.3.110.0060.01210.56
4.3.100.0020.01010.56
4.3.90.0030.01810.56
4.3.80.0030.03010.56
4.3.70.0050.01710.56
4.3.60.0020.01810.56
4.3.50.0030.01810.56
4.3.40.0020.02810.56
4.3.30.0000.02210.56
4.3.20.0030.01810.56
4.3.10.0020.02110.56
4.3.00.0020.01910.56

preferences:
43.59 ms | 400 KiB | 5 Q