3v4l.org

run code in 300+ PHP versions simultaneously
<?php $imageTag = '<img src = http://nycxplorer.com/wp-content/uploads/2012/02/bagel1-1.jpg >'; //grab the src portion of the image tag $srcPattern = "/src.*?=.*?(\s|>)/s"; preg_match($srcPattern, $imageTag, $srcParts); $srcPart = $srcParts[0]; //remove all whitespace from within and around the src portion $srcPart = trim(preg_replace('/[\s]+/','', $srcPart)); print_r($srcPart); //grab the src URL $oldUrl = substr($srcPart, 4); //if there are quotes at the beginning of the url, cut them off if(strpos($oldUrl, '"') == 0 || strpos($oldUrl, "'") == 0) { $oldUrl = substr($oldUrl, 1, strlen($oldUrl)-2); } print_r($oldUrl); ?>

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.0140.00718.43
8.3.50.0080.01021.09
8.3.40.0110.00418.79
8.3.30.0140.00018.96
8.3.20.0000.00818.90
8.3.10.0080.00020.68
8.3.00.0070.00021.87
8.2.180.0170.00316.75
8.2.170.0070.00722.96
8.2.160.0000.01420.31
8.2.150.0070.00724.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0050.00319.73
8.2.110.0030.00721.31
8.2.100.0070.00717.84
8.2.90.0080.00019.07
8.2.80.0030.00517.97
8.2.70.0050.00317.75
8.2.60.0040.00417.93
8.2.50.0000.00918.10
8.2.40.0090.00320.45
8.2.30.0040.00420.05
8.2.20.0000.00717.94
8.2.10.0000.00717.83
8.2.00.0040.00417.82
8.1.280.0120.00625.92
8.1.270.0040.00423.99
8.1.260.0120.00626.35
8.1.250.0040.00428.09
8.1.240.0030.00720.91
8.1.230.0070.00417.89
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0040.00717.47
8.1.190.0030.00617.35
8.1.180.0000.00818.10
8.1.170.0000.00918.73
8.1.160.0000.00722.05
8.1.150.0000.00718.70
8.1.140.0060.00317.55
8.1.130.0020.00517.90
8.1.120.0030.00317.52
8.1.110.0030.00617.59
8.1.100.0040.00417.59
8.1.90.0070.00017.62
8.1.80.0000.00717.61
8.1.70.0030.00317.57
8.1.60.0000.00817.69
8.1.50.0080.00017.61
8.1.40.0040.00417.66
8.1.30.0050.00317.80
8.1.20.0000.00917.77
8.1.10.0030.00617.78
8.1.00.0000.00817.66
8.0.300.0050.00318.77
8.0.290.0040.00416.88
8.0.280.0080.00018.42
8.0.270.0030.00317.33
8.0.260.0000.00817.05
8.0.250.0070.00017.09
8.0.240.0040.00417.16
8.0.230.0000.00717.07
8.0.220.0040.00417.03
8.0.210.0040.00417.11
8.0.200.0000.00617.09
8.0.190.0080.00017.07
8.0.180.0000.00817.05
8.0.170.0000.00817.05
8.0.160.0000.00717.05
8.0.150.0040.00516.99
8.0.140.0040.00716.93
8.0.130.0030.00313.40
8.0.120.0000.00816.89
8.0.110.0050.00217.03
8.0.100.0000.00817.00
8.0.90.0050.00317.11
8.0.80.0090.01117.02
8.0.70.0040.00416.95
8.0.60.0040.00417.00
8.0.50.0040.00416.91
8.0.30.0080.01117.13
8.0.20.0170.00517.40
8.0.10.0000.00717.05
8.0.00.0130.00516.98
7.4.330.0000.00713.43
7.4.320.0030.00316.77
7.4.300.0000.00616.85
7.4.290.0000.00816.69
7.4.280.0030.00516.74
7.4.270.0030.00316.74
7.4.260.0050.00013.47
7.4.250.0000.00716.63
7.4.240.0000.00716.82
7.4.230.0030.00316.89
7.4.220.0030.01316.88
7.4.210.0070.00916.75
7.4.200.0040.00416.85
7.4.190.0040.00416.89
7.4.160.0060.00916.81
7.4.150.0150.00317.40
7.4.140.0070.01217.86
7.4.130.0100.00616.66
7.4.120.0100.00816.77
7.4.110.0170.00016.93
7.4.100.0090.00916.77
7.4.90.0120.00616.84
7.4.80.0070.01419.04
7.4.70.0100.00716.70
7.4.60.0060.01016.60
7.4.50.0060.00316.55
7.4.40.0090.00622.27
7.4.30.0060.01516.76
7.4.00.0140.00415.19
7.3.330.0030.00313.15
7.3.320.0000.00613.28
7.3.310.0000.00716.27
7.3.300.0030.00316.37
7.3.290.0060.01216.45
7.3.280.0090.00716.40
7.3.270.0130.01017.40
7.3.260.0120.00718.24
7.3.250.0120.00616.65
7.3.240.0100.01016.77
7.3.230.0100.00716.55
7.3.210.0000.01716.64
7.3.200.0130.00919.39
7.3.190.0070.01016.70
7.3.180.0150.00016.77
7.3.170.0070.01016.63
7.3.160.0090.00616.81
7.3.120.0040.01114.81
7.3.10.0070.00716.76
7.3.00.0060.01016.73
7.2.330.0060.01016.71
7.2.320.0080.01216.79
7.2.310.0150.00316.64
7.2.300.0090.00616.88
7.2.290.0100.00716.80
7.2.130.0160.00616.65
7.2.120.0160.00017.06
7.2.110.0070.00716.89
7.2.100.0170.00316.95
7.2.90.0090.00916.90
7.2.80.0140.00616.97
7.2.70.0110.00816.94
7.2.60.0110.00617.06
7.2.50.0130.00916.94
7.2.40.0070.01316.84
7.2.30.0170.00716.84
7.2.20.0160.00916.96
7.2.10.0110.01516.68
7.2.00.0130.00918.44
7.1.250.0040.01215.77
7.1.100.0100.00318.68
7.1.70.0000.00717.45
7.1.60.0100.01319.40
7.1.50.0090.01217.28
7.1.00.0030.03322.56
7.0.200.0040.00417.00
7.0.140.0070.06721.95
7.0.60.0030.08319.97
7.0.50.0070.08317.96
7.0.40.0130.08017.68
7.0.30.0100.03717.68
7.0.20.0000.06317.81
7.0.10.0070.08017.77
7.0.00.0170.06317.73
5.6.280.0100.06721.07
5.6.210.0100.06320.52
5.6.200.0130.07318.13
5.6.190.0070.06018.18
5.6.180.0200.06318.12
5.6.170.0130.07718.21
5.6.160.0070.05018.18
5.6.150.0070.05018.14
5.6.140.0030.05018.16
5.6.130.0070.08018.16
5.6.120.0000.06018.21
5.6.110.0030.07318.19
5.6.100.0030.07718.11
5.6.90.0030.05318.07
5.6.80.0030.04317.60
5.6.70.0070.06017.58
5.6.60.0070.08017.59
5.6.50.0100.05317.60
5.6.40.0030.04717.47
5.6.30.0070.07317.54
5.6.20.0170.06317.45
5.6.10.0070.07717.46
5.6.00.0070.07017.46
5.5.350.0270.07020.34
5.5.340.0070.05018.00
5.5.330.0000.05717.92
5.5.320.0130.04318.02
5.5.310.0070.07717.97
5.5.300.0030.08717.98
5.5.290.0070.08318.00
5.5.280.0030.08317.95
5.5.270.0130.06717.91
5.5.260.0000.09017.99
5.5.250.0030.08717.73
5.5.240.0030.08317.29
5.5.230.0030.06317.30
5.5.220.0230.06017.39
5.5.210.0100.07317.29
5.5.200.0070.07717.27
5.5.190.0100.04017.38
5.5.180.0200.06317.38
5.5.160.0030.06717.37
5.5.150.0030.04317.36
5.5.140.0030.08317.27
5.5.130.0030.03717.37
5.5.120.0170.06317.25
5.5.110.0030.04017.26
5.5.100.0000.04017.24
5.5.90.0070.03317.27
5.5.80.0100.03017.14
5.5.70.0070.03317.22
5.5.60.0030.04017.15
5.5.50.0030.03717.23
5.5.40.0030.03717.24
5.5.30.0030.04017.23
5.5.20.0170.06317.18
5.5.10.0100.07017.19
5.5.00.0070.06317.15
5.4.450.0070.05019.32
5.4.440.0070.04719.16
5.4.430.0100.07019.44
5.4.420.0030.07319.37
5.4.410.0070.04319.23
5.4.400.0030.05719.03
5.4.390.0100.05319.09
5.4.380.0100.07018.89
5.4.370.0000.05019.07
5.4.360.0100.07718.95
5.4.350.0130.06718.99
5.4.340.0130.06719.01
5.4.320.0100.06719.14
5.4.310.0070.05019.00
5.4.300.0070.06018.98
5.4.290.0100.03318.89
5.4.280.0100.03319.03
5.4.270.0100.03318.99
5.4.260.0030.03718.98
5.4.250.0130.03018.82
5.4.240.0100.03019.09
5.4.230.0030.03719.12
5.4.220.0030.04318.94
5.4.210.0070.03319.06
5.4.200.0070.03318.88
5.4.190.0070.03318.81
5.4.180.0070.03319.10
5.4.170.0000.04018.96
5.4.160.0070.05319.07
5.4.150.0100.03019.01
5.4.140.0030.03716.37
5.4.130.0000.03716.47
5.4.120.0000.04316.27
5.4.110.0070.04016.35
5.4.100.0030.03316.27
5.4.90.0000.03716.26
5.4.80.0070.03016.52
5.4.70.0070.03016.41
5.4.60.0070.03016.34
5.4.50.0030.03316.22
5.4.40.0070.03016.29
5.4.30.0070.03016.25
5.4.20.0030.03316.34
5.4.10.0030.03716.38
5.4.00.0030.03315.69
5.3.290.0070.07014.58
5.3.280.0030.03714.56
5.3.270.0070.07314.69
5.3.260.0100.03314.43
5.3.250.0000.04014.59
5.3.240.0000.04014.56
5.3.230.0030.03714.57
5.3.220.0030.03714.39
5.3.210.0030.03714.53
5.3.200.0030.03714.64
5.3.190.0000.04014.49
5.3.180.0000.04014.51
5.3.170.0070.03314.34
5.3.160.0030.03714.55
5.3.150.0000.04714.52
5.3.140.0070.03314.54
5.3.130.0070.04314.51
5.3.120.0070.03314.48
5.3.110.0030.04014.51
5.3.100.0030.04314.01
5.3.90.0030.03713.96
5.3.80.0070.03013.87
5.3.70.0070.03014.00
5.3.60.0070.05013.76
5.3.50.0130.03013.70
5.3.40.0030.03313.92
5.3.30.0100.03313.85
5.3.20.0030.07713.63
5.3.10.0070.04313.50
5.3.00.0070.04313.60
5.2.170.0030.03310.98
5.2.160.0070.02311.12
5.2.150.0030.03011.12
5.2.140.0000.04011.15
5.2.130.0000.04311.00
5.2.120.0030.06011.11
5.2.110.0070.02311.06
5.2.100.0030.02711.13
5.2.90.0030.06011.00
5.2.80.0030.06310.92
5.2.70.0030.05011.07
5.2.60.0000.06311.04
5.2.50.0000.05010.91
5.2.40.0030.04010.95
5.2.30.0070.04010.94
5.2.20.0030.04310.84
5.2.10.0070.06010.88
5.2.00.0030.04310.75
5.1.60.0000.03310.03
5.1.50.0030.05310.02
5.1.40.0030.0339.95
5.1.30.0070.05710.27
5.1.20.0070.05310.41
5.1.10.0030.05710.09
5.1.00.0070.0579.98
5.0.50.0070.0338.48
5.0.40.0070.0408.39
5.0.30.0000.0708.22
5.0.20.0030.0438.28
5.0.10.0000.0378.14
5.0.00.0030.0608.12
4.4.90.0000.0207.64
4.4.80.0000.0337.64
4.4.70.0070.0177.64
4.4.60.0070.0137.64
4.4.50.0030.0207.64
4.4.40.0030.0507.64
4.4.30.0070.0307.64
4.4.20.0000.0337.64
4.4.10.0000.0337.64
4.4.00.0030.0407.64
4.3.110.0070.0237.64
4.3.100.0030.0237.64
4.3.90.0000.0277.64
4.3.80.0030.0437.64
4.3.70.0030.0337.64
4.3.60.0000.0307.64
4.3.50.0000.0337.64
4.3.40.0030.0477.64
4.3.30.0030.0337.64
4.3.20.0000.0337.64
4.3.10.0030.0337.64
4.3.00.0000.0307.64

preferences:
42 ms | 401 KiB | 5 Q