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.40.0000.01418.96
8.3.30.0080.00618.97
8.3.20.0050.00320.11
8.3.10.0090.00022.10
8.3.00.0090.00022.43
8.2.170.0110.00422.96
8.2.160.0150.00021.11
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0060.00319.60
8.2.110.0040.00422.30
8.2.100.0060.00617.97
8.2.90.0000.00819.16
8.2.80.0080.00017.97
8.2.70.0030.00617.75
8.2.60.0040.00418.03
8.2.50.0040.00418.07
8.2.40.0070.00018.22
8.2.30.0040.00418.22
8.2.20.0020.00517.89
8.2.10.0040.00417.96
8.2.00.0030.00617.88
8.1.270.0080.00023.85
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0060.00323.91
8.1.230.0090.00319.06
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0110.00417.48
8.1.190.0000.00817.53
8.1.180.0000.00818.10
8.1.170.0060.00318.70
8.1.160.0040.00421.95
8.1.150.0040.00418.72
8.1.140.0040.00417.61
8.1.130.0030.00517.91
8.1.120.0000.00717.55
8.1.110.0000.00717.59
8.1.100.0040.00417.53
8.1.90.0040.00417.66
8.1.80.0000.00717.57
8.1.70.0040.00417.58
8.1.60.0080.00317.70
8.1.50.0070.00017.64
8.1.40.0000.00817.60
8.1.30.0030.00517.70
8.1.20.0030.00517.80
8.1.10.0000.00717.60
8.1.00.0000.00917.55
8.0.300.0070.00018.77
8.0.290.0050.00217.05
8.0.280.0040.00418.47
8.0.270.0040.00417.33
8.0.260.0070.00016.91
8.0.250.0030.00317.15
8.0.240.0040.00417.10
8.0.230.0000.00717.03
8.0.220.0030.00317.03
8.0.210.0030.00517.11
8.0.200.0030.00316.98
8.0.190.0040.00416.99
8.0.180.0040.00417.02
8.0.170.0080.00016.95
8.0.160.0050.00316.98
8.0.150.0040.00416.89
8.0.140.0030.00516.97
8.0.130.0000.00513.51
8.0.120.0000.00817.00
8.0.110.0040.00417.01
8.0.100.0000.00817.11
8.0.90.0040.00417.03
8.0.80.0140.00717.01
8.0.70.0050.00216.94
8.0.60.0060.00317.07
8.0.50.0000.00717.04
8.0.30.0080.01117.02
8.0.20.0110.00917.52
8.0.10.0040.00417.11
8.0.00.0120.00816.86
7.4.330.0000.00615.04
7.4.320.0000.00616.68
7.4.300.0000.00616.82
7.4.290.0030.00316.71
7.4.280.0000.00716.74
7.4.270.0030.00616.78
7.4.260.0030.00316.69
7.4.250.0070.00016.60
7.4.240.0040.00316.76
7.4.230.0000.00816.62
7.4.220.0120.00316.82
7.4.210.0080.00916.80
7.4.200.0000.00716.53
7.4.190.0070.00016.67
7.4.160.0160.00016.63
7.4.150.0090.00917.40
7.4.140.0110.00517.86
7.4.130.0080.01416.81
7.4.120.0090.00916.81
7.4.110.0030.01516.74
7.4.100.0170.00716.68
7.4.90.0070.01416.62
7.4.80.0090.00919.39
7.4.70.0110.00816.63
7.4.60.0130.01016.72
7.4.50.0030.00616.54
7.4.40.0100.00322.77
7.4.30.0030.01416.59
7.4.10.0090.00615.07
7.4.00.0080.00915.15
7.3.330.0000.00613.27
7.3.320.0050.00013.31
7.3.310.0030.00316.53
7.3.300.0030.00316.38
7.3.290.0060.01316.43
7.3.280.0120.00816.48
7.3.270.0130.00417.40
7.3.260.0070.01116.42
7.3.250.0090.00916.75
7.3.240.0130.00316.55
7.3.230.0070.01016.54
7.3.210.0120.00616.61
7.3.200.0040.01319.39
7.3.190.0120.00616.67
7.3.180.0040.01216.66
7.3.170.0130.00316.58
7.3.160.0070.01416.46
7.3.130.0070.01015.04
7.3.120.0070.01115.04
7.3.110.0100.01014.85
7.3.100.0080.00714.82
7.3.90.0030.00915.09
7.3.80.0040.00815.00
7.3.70.0060.00514.98
7.3.60.0030.01015.05
7.3.50.0040.00715.11
7.3.40.0050.00615.01
7.3.30.0060.00814.99
7.3.20.0060.00716.90
7.3.10.0030.01016.80
7.3.00.0060.01016.98
7.2.330.0090.00917.01
7.2.320.0090.00916.80
7.2.310.0130.00316.76
7.2.300.0160.00616.83
7.2.290.0060.01016.69
7.2.260.0120.00715.27
7.2.250.0080.01015.21
7.2.240.0060.00815.08
7.2.230.0060.00815.16
7.2.220.0100.00215.05
7.2.210.0100.00415.33
7.2.200.0050.01015.34
7.2.190.0040.01215.21
7.2.180.0070.00615.16
7.2.170.0060.00915.16
7.2.160.0050.01015.37
7.2.150.0030.00717.08
7.2.140.0090.00817.05
7.2.130.0100.00417.12
7.2.120.0050.01117.06
7.2.110.0100.00817.02
7.2.100.0060.01017.05
7.2.90.0060.01117.18
7.2.80.0090.00716.95
7.2.70.0080.00417.20
7.2.60.0060.00816.98
7.2.50.0060.00817.20
7.2.40.0070.00817.07
7.2.30.0110.00617.09
7.2.20.0060.01116.84
7.2.10.0050.01117.11
7.2.00.0060.00917.76
7.1.330.0040.01115.93
7.1.320.0040.01015.97
7.1.310.0060.00916.04
7.1.300.0050.00715.84
7.1.290.0030.00916.16
7.1.280.0070.00815.83
7.1.270.0030.01016.00
7.1.260.0040.00916.06
7.1.250.0070.01016.08
7.1.240.0000.01515.99
7.1.230.0070.01116.11
7.1.220.0000.01116.04
7.1.210.0070.00715.96
7.1.200.0070.00715.84
7.1.190.0000.01216.04
7.1.180.0100.00616.11
7.1.170.0000.01016.05
7.1.160.0030.01016.12
7.1.150.0070.00716.15
7.1.140.0050.00516.04
7.1.130.0000.00915.75
7.1.120.0060.01216.20
7.1.110.0060.00616.04
7.1.100.0060.00617.05
7.1.90.0030.00616.00
7.1.80.0060.00615.81
7.1.70.0050.00716.73
7.1.60.0100.00717.95
7.1.50.0000.01716.62
7.1.40.0070.00316.05
7.1.30.0060.00616.03
7.1.20.0070.00616.09
7.1.10.0070.00716.05
7.1.00.0050.04819.18
7.0.330.0120.00015.75
7.0.320.0060.00615.62
7.0.310.0080.00315.64
7.0.300.0030.00915.39
7.0.290.0000.01115.72
7.0.280.0040.01115.59
7.0.270.0030.00715.59
7.0.260.0040.00715.40
7.0.250.0040.00815.54
7.0.240.0000.01315.76
7.0.230.0120.00015.71
7.0.220.0080.00015.60
7.0.210.0030.00615.66
7.0.200.0050.01016.29
7.0.190.0060.00615.80
7.0.180.0030.00715.74
7.0.170.0030.00715.61
7.0.160.0090.00315.66
7.0.150.0030.01015.35
7.0.140.0060.04118.88
7.0.130.0070.00715.61
7.0.120.0030.00915.65
7.0.110.0030.01015.65
7.0.100.0000.00915.38
7.0.90.0070.00715.77
7.0.80.0050.02518.48
7.0.70.0040.04118.78
7.0.60.0020.04618.76
7.0.50.0020.04618.95
7.0.40.0030.03816.96
7.0.30.0030.04316.66
7.0.20.0100.03316.97
7.0.10.0150.03516.91
7.0.00.0010.02916.84
5.6.400.0090.00614.71
5.6.390.0060.00314.52
5.6.380.0000.01214.65
5.6.370.0100.00314.23
5.6.360.0120.00314.16
5.6.350.0000.00814.79
5.6.340.0090.00614.28
5.6.330.0100.00314.16
5.6.320.0090.00014.27
5.6.310.0030.00514.43
5.6.300.0110.00414.37
5.6.290.0090.00314.20
5.6.280.0060.03817.78
5.6.270.0040.01114.76
5.6.260.0040.01114.35
5.6.250.0080.00414.66
5.6.240.0030.00614.64
5.6.230.0020.04217.42
5.6.220.0040.03117.44
5.6.210.0110.03817.42
5.6.200.0100.02217.85
5.6.190.0070.04217.66
5.6.180.0070.04117.80
5.6.170.0020.02717.68
5.6.160.0080.04217.80
5.6.150.0050.04417.76
5.6.140.0020.04117.72
5.6.130.0050.05017.69
5.6.120.0130.03517.80
5.6.110.0080.03517.67
5.6.100.0070.02317.67
5.6.90.0030.03417.71
5.6.80.0080.03817.27
5.6.70.0030.02917.38
5.6.60.0050.04617.26
5.6.50.0070.04217.45
5.6.40.0110.04017.53
5.6.30.0070.03417.38
5.6.20.0100.03717.36
5.6.10.0110.03017.52
5.6.00.0120.02717.40
5.5.380.0030.00614.28
5.5.370.0100.03217.28
5.5.360.0080.02217.50
5.5.350.0070.03017.41
5.5.340.0040.02617.55
5.5.330.0020.04517.45
5.5.320.0070.02417.64
5.5.310.0030.03017.66
5.5.300.0110.04017.59
5.5.290.0100.03617.63
5.5.280.0060.04817.46
5.5.270.0040.04617.67
5.5.260.0110.04117.60
5.5.250.0060.03517.38
5.5.240.0100.04017.03
5.5.230.0070.04017.31
5.5.220.0050.04817.29
5.5.210.0070.04117.01
5.5.200.0080.02817.12
5.5.190.0080.04317.28
5.5.180.0110.03517.19
5.5.170.0050.00914.11
5.5.160.0050.03017.18
5.5.150.0030.03817.14
5.5.140.0030.02817.13
5.5.130.0100.02217.37
5.5.120.0080.03517.24
5.5.110.0100.04017.25
5.5.100.0030.04617.04
5.5.90.0070.03817.06
5.5.80.0050.02517.16
5.5.70.0120.02017.00
5.5.60.0110.02117.19
5.5.50.0110.01917.11
5.5.40.0030.02517.08
5.5.30.0030.02517.19
5.5.20.0040.02617.17
5.5.10.0110.01717.26
5.5.00.0080.03917.20
5.4.450.0080.02215.45
5.4.440.0080.04615.41
5.4.430.0070.02715.43
5.4.420.0020.03815.41
5.4.410.0040.03615.22
5.4.400.0070.02315.22
5.4.390.0100.03015.25
5.4.380.0080.03615.22
5.4.370.0090.04215.26
5.4.360.0030.04715.22
5.4.350.0060.03915.25
5.4.340.0150.03215.22
5.4.330.0060.00911.47
5.4.320.0050.04415.29
5.4.310.0070.02815.13
5.4.300.0060.02515.21
5.4.290.0040.03715.28
5.4.280.0060.03815.14
5.4.270.0070.03415.25
5.4.260.0060.04115.14
5.4.250.0050.03715.30
5.4.240.0000.03015.26
5.4.230.0060.02115.12
5.4.220.0030.02315.18
5.4.210.0050.02015.21
5.4.200.0060.02315.24
5.4.190.0080.01615.29
5.4.180.0040.02115.12
5.4.170.0050.04015.20
5.4.160.0050.02115.27
5.4.150.0080.02015.20
5.4.140.0030.03313.92
5.4.130.0030.03713.87
5.4.120.0020.02413.79
5.4.110.0050.02213.86
5.4.100.0040.02113.84
5.4.90.0030.02613.90
5.4.80.0060.02113.86
5.4.70.0030.02013.83
5.4.60.0040.02113.85
5.4.50.0070.02913.85
5.4.40.0040.02013.95
5.4.30.0010.02413.89
5.4.20.0030.02013.83
5.4.10.0050.02313.93
5.4.00.0040.02113.59
5.3.290.0100.03912.99
5.3.280.0090.01812.95
5.3.270.0090.03012.98
5.3.260.0050.03113.00
5.3.250.0050.02412.99
5.3.240.0040.02713.04
5.3.230.0060.01812.94
5.3.220.0040.02113.00
5.3.210.0020.02713.01
5.3.200.0050.02113.02
5.3.190.0040.02413.01
5.3.180.0040.02212.92
5.3.170.0040.02212.92
5.3.160.0080.02012.99
5.3.150.0060.03313.00
5.3.140.0070.01812.98
5.3.130.0030.02313.01
5.3.120.0020.04312.97
5.3.110.0050.02512.93
5.3.100.0000.02312.75
5.3.90.0100.02812.67
5.3.80.0070.01812.74
5.3.70.0030.02312.70
5.3.60.0070.03212.73
5.3.50.0070.01812.71
5.3.40.0020.02412.70
5.3.30.0080.02012.57
5.3.20.0050.02012.57
5.3.10.0040.01812.49
5.3.00.0050.02012.55
5.2.170.0000.03011.68
5.2.160.0000.03011.68
5.2.150.0030.02711.68
5.2.140.0000.02711.68
5.2.130.0030.03311.68
5.2.120.0000.03011.68
5.2.110.0030.02311.68
5.2.100.0100.01711.68
5.2.90.0030.02711.68
5.2.80.0070.03011.68
5.2.70.0000.03311.68
5.2.60.0030.03711.68
5.2.50.0000.03011.68
5.2.40.0070.03011.68
5.2.30.0000.03711.68
5.2.20.0000.04311.68
5.2.10.0030.06011.68
5.2.00.0030.06011.68
5.1.60.0070.05011.68
5.1.50.0070.04711.68
5.1.40.0000.06011.68
5.1.30.0070.05011.68
5.1.20.0030.06311.68
5.1.10.0030.07011.68
5.1.00.0100.05011.68
5.0.50.0000.03311.68
5.0.40.0030.04311.68
5.0.30.0030.05011.68
5.0.20.0000.04711.68
5.0.10.0000.03711.68
5.0.00.0070.06011.68
4.4.90.0000.01311.68
4.4.80.0030.02311.68
4.4.70.0000.03311.68
4.4.60.0000.02711.68
4.4.50.0000.02711.68
4.4.40.0000.03311.68
4.4.30.0030.03311.68
4.4.20.0000.03711.68
4.4.10.0000.03711.68
4.4.00.0070.04711.68
4.3.110.0030.03311.68
4.3.100.0030.03311.68
4.3.90.0030.03011.68
4.3.80.0000.06311.68
4.3.70.0030.03011.68
4.3.60.0000.03711.68
4.3.50.0000.03711.68
4.3.40.0030.05311.68
4.3.30.0000.03311.68
4.3.20.0000.03711.68
4.3.10.0000.03311.68
4.3.00.0000.02711.68

preferences:
45.45 ms | 400 KiB | 5 Q