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.0150.00618.53
8.3.50.0100.00821.21
8.3.40.0140.00019.06
8.3.30.0070.00718.98
8.3.20.0060.00318.70
8.3.10.0030.00621.23
8.3.00.0070.00023.53
8.2.180.0120.00316.63
8.2.170.0030.01422.96
8.2.160.0090.01220.37
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00821.06
8.2.110.0070.00320.54
8.2.100.0060.00617.91
8.2.90.0000.00819.35
8.2.80.0000.00817.97
8.2.70.0050.00317.63
8.2.60.0030.00618.03
8.2.50.0040.00418.07
8.2.40.0000.00718.16
8.2.30.0040.00419.99
8.2.20.0000.00817.74
8.2.10.0030.00617.86
8.2.00.0080.00017.89
8.1.280.0110.00425.92
8.1.270.0070.00023.99
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00322.45
8.1.230.0040.00820.88
8.1.220.0050.00318.77
8.1.210.0030.00518.90
8.1.200.0000.00817.23
8.1.190.0040.00417.53
8.1.180.0000.00918.10
8.1.170.0040.00418.77
8.1.160.0000.00818.98
8.1.150.0040.00418.78
8.1.140.0000.00717.64
8.1.130.0030.00317.85
8.1.120.0040.00417.61
8.1.110.0020.00517.47
8.1.100.0000.00717.60
8.1.90.0040.00417.58
8.1.80.0050.00217.60
8.1.70.0070.00017.59
8.1.60.0080.00017.77
8.1.50.0040.00417.63
8.1.40.0000.00917.73
8.1.30.0050.00317.81
8.1.20.0080.00017.69
8.1.10.0040.00417.61
8.1.00.0080.00017.55
8.0.300.0030.00319.90
8.0.290.0070.00017.28
8.0.280.0000.00818.34
8.0.270.0030.00317.29
8.0.260.0070.00017.01
8.0.250.0080.00017.07
8.0.240.0000.00817.08
8.0.230.0000.00717.16
8.0.220.0040.00416.93
8.0.210.0000.00717.02
8.0.200.0030.00317.00
8.0.190.0040.00416.99
8.0.180.0040.00417.01
8.0.170.0000.00716.95
8.0.160.0000.00717.02
8.0.150.0040.00417.02
8.0.140.0050.00317.00
8.0.130.0030.00313.43
8.0.120.0000.00917.08
8.0.110.0070.00016.93
8.0.100.0000.00817.06
8.0.90.0070.00017.11
8.0.80.0160.00617.09
8.0.70.0000.00716.91
8.0.60.0040.00417.11
8.0.50.0030.00517.02
8.0.30.0140.01016.96
8.0.20.0130.00617.40
8.0.10.0040.00416.97
8.0.00.0090.00917.08
7.4.330.0050.00014.89
7.4.320.0050.00316.71
7.4.300.0040.00416.77
7.4.290.0040.00416.73
7.4.280.0040.00416.65
7.4.270.0070.00016.80
7.4.260.0030.00313.55
7.4.250.0050.00316.77
7.4.240.0040.00416.82
7.4.230.0000.00616.61
7.4.220.0160.01016.73
7.4.210.0080.00916.71
7.4.200.0000.00816.47
7.4.190.0000.00716.63
7.4.160.0080.00816.90
7.4.150.0060.00917.40
7.4.140.0050.01217.86
7.4.130.0040.01316.74
7.4.120.0110.00716.79
7.4.110.0140.00316.71
7.4.100.0140.00616.74
7.4.90.0180.00616.60
7.4.80.0120.00619.37
7.4.70.0070.01316.71
7.4.60.0100.00716.62
7.4.50.0080.00016.89
7.4.40.0090.00622.52
7.4.30.0080.01016.48
7.4.00.0070.01015.25
7.3.330.0050.00013.44
7.3.320.0000.00613.32
7.3.310.0000.00716.30
7.3.300.0040.00416.45
7.3.290.0100.01016.46
7.3.280.0090.00816.49
7.3.270.0150.00317.40
7.3.260.0190.00518.24
7.3.250.0120.00616.80
7.3.240.0080.01516.70
7.3.230.0100.00616.85
7.3.210.0090.00916.52
7.3.200.0070.01019.39
7.3.190.0090.01216.66
7.3.180.0090.00616.37
7.3.170.0080.01516.78
7.3.160.0030.01216.63
7.3.120.0100.00715.02
7.2.330.0070.01016.93
7.2.320.0060.01316.96
7.2.310.0070.01716.85
7.2.300.0080.00816.70
7.2.290.0030.01716.79
7.2.00.0070.00719.79
7.1.100.0030.00718.46
7.1.70.0000.00817.39
7.1.60.0030.02219.40
7.1.50.0130.01816.99
7.1.00.0030.04322.41
7.0.200.0100.00515.15
7.0.140.0130.06322.19
7.0.70.0070.07021.82
7.0.60.0030.07021.58
7.0.50.0030.08322.09
7.0.40.0000.04320.04
7.0.30.0070.04320.04
7.0.20.0100.08020.07
7.0.10.0070.05320.18
7.0.00.0030.09020.09
5.6.280.0100.06721.02
5.6.220.0030.08320.61
5.6.210.0130.07720.62
5.6.200.0030.06321.01
5.6.190.0030.05721.01
5.6.180.0100.04321.04
5.6.170.0000.06021.04
5.6.160.0000.05720.94
5.6.150.0030.08721.07
5.6.140.0000.05721.06
5.6.130.0070.05021.11
5.6.120.0070.06721.04
5.6.110.0100.07721.05
5.6.100.0030.06020.93
5.6.90.0100.06020.97
5.6.80.0070.08020.49
5.6.70.0100.05320.40
5.6.60.0100.07720.39
5.6.50.0000.06720.48
5.6.40.0000.08720.41
5.6.30.0000.08020.31
5.6.20.0000.06720.43
5.6.10.0000.07320.39
5.6.00.0030.07320.45
5.5.360.0030.06320.40
5.5.350.0070.06320.41
5.5.340.0100.07720.90
5.5.330.0030.04720.87
5.5.320.0070.04020.75
5.5.310.0070.07720.91
5.5.300.0030.07320.80
5.5.290.0070.06020.90
5.5.280.0000.09320.88
5.5.270.0000.08720.82
5.5.260.0070.08720.78
5.5.250.0130.07020.70
5.5.240.0100.05020.24
5.5.230.0070.07320.21
5.5.220.0070.07720.21
5.5.210.0070.08020.21
5.5.200.0070.07720.08
5.5.190.0030.05719.99
5.5.180.0070.07320.22
5.5.160.0000.05720.20
5.5.150.0100.08020.24
5.5.140.0070.05320.18
5.5.130.0030.05320.21
5.5.120.0100.07720.26
5.5.110.0030.05020.21
5.5.100.0000.08720.08
5.5.90.0030.08320.04
5.5.80.0100.07320.06
5.5.70.0070.07720.11
5.5.60.0000.06020.06
5.5.50.0070.05720.11
5.5.40.0100.03720.03
5.5.30.0030.08020.03
5.5.20.0030.08320.04
5.5.10.0000.08019.95
5.5.00.0070.06319.96
5.4.450.0070.08319.11
5.4.440.0130.07319.42
5.4.430.0030.05019.10
5.4.420.0070.07319.30
5.4.410.0030.08019.29
5.4.400.0070.07719.05
5.4.390.0030.07719.05
5.4.380.0070.07019.03
5.4.370.0000.08019.05
5.4.360.0070.07318.96
5.4.350.0070.05719.14
5.4.340.0070.07718.98
5.4.320.0070.04719.07
5.4.310.0100.07319.12
5.4.300.0070.07319.03
5.4.290.0070.07718.90
5.4.280.0030.08019.14
5.4.270.0000.07719.12
5.4.260.0000.07019.22
5.4.250.0100.06719.06
5.4.240.0070.07018.93
5.4.230.0030.07319.07
5.4.220.0030.08318.94
5.4.210.0000.06019.14
5.4.200.0100.06719.11
5.4.190.0070.05019.12
5.4.180.0030.04018.94
5.4.170.0030.04718.95
5.4.160.0030.04719.00
5.4.150.0030.07718.88
5.4.140.0000.06016.12
5.4.130.0030.07316.05
5.4.120.0070.07016.11
5.4.110.0070.07016.30
5.4.100.0000.07716.44
5.4.90.0070.05016.44
5.4.80.0000.08016.36
5.4.70.0070.05016.20
5.4.60.0100.03716.40
5.4.50.0030.04716.23
5.4.40.0030.07316.33
5.4.30.0000.07316.20
5.4.20.0070.07316.32
5.4.10.0030.07016.38
5.4.00.0130.05315.82
5.3.290.0000.05014.61
5.3.280.0070.05314.43
5.3.270.0030.08014.44
5.3.260.0000.05314.59
5.3.250.0000.05014.62
5.3.240.0100.06714.46
5.3.230.0130.05014.54
5.3.220.0030.05714.39
5.3.210.0100.07014.55
5.3.200.0100.07014.56
5.3.190.0030.07314.55
5.3.180.0100.03314.44
5.3.170.0030.04714.52
5.3.160.0070.07314.42
5.3.150.0070.05314.52
5.3.140.0070.07014.49
5.3.130.0070.06314.53
5.3.120.0030.07714.53
5.3.110.0030.06714.55
5.3.100.0030.07713.85
5.3.90.0000.07014.02
5.3.80.0030.07714.00
5.3.70.0070.05713.79
5.3.60.0000.06713.94
5.3.50.0000.04013.71
5.3.40.0070.07013.86
5.3.30.0000.06713.89
5.3.20.0000.07313.45
5.3.10.0000.03713.59
5.3.00.0000.05313.41
5.2.170.0030.02712.77
5.2.160.0030.06012.77
5.2.150.0030.05712.77
5.2.140.0000.04312.77
5.2.130.0030.04012.77
5.2.120.0030.06012.77
5.2.110.0070.05312.77
5.2.100.0000.04712.77
5.2.90.0000.05712.77
5.2.80.0000.03712.77
5.2.70.0000.03312.77
5.2.60.0030.06312.77
5.2.50.0000.03012.77
5.2.40.0000.06012.77
5.2.30.0000.06312.77
5.2.20.0030.05312.77
5.2.10.0000.03012.77
5.2.00.0070.05312.77
5.1.60.0000.04312.77
5.1.50.0030.04012.77
5.1.40.0000.05312.77
5.1.30.0000.05712.77
5.1.20.0030.05712.77
5.1.10.0030.05712.77
5.1.00.0000.03312.77
5.0.50.0030.04312.77
5.0.40.0070.04312.77
5.0.30.0000.06712.77
5.0.20.0000.04312.77
5.0.10.0030.04012.77
5.0.00.0030.06712.77
4.4.90.0000.03312.77
4.4.80.0000.01312.77
4.4.70.0000.02312.77
4.4.60.0000.01312.77
4.4.50.0030.03012.77
4.4.40.0000.02312.77
4.4.30.0070.03012.77
4.4.20.0000.03312.77
4.4.10.0000.04012.77
4.4.00.0000.05312.77
4.3.110.0030.03712.77
4.3.100.0030.02712.77
4.3.90.0030.02712.77
4.3.80.0000.04012.77
4.3.70.0000.03012.77
4.3.60.0030.03012.77
4.3.50.0000.03712.77
4.3.40.0030.04712.77
4.3.30.0070.03012.77
4.3.20.0070.03012.77
4.3.10.0000.03312.77
4.3.00.0000.03312.77

preferences:
45.12 ms | 401 KiB | 5 Q