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"; preg_match($srcPattern, $imageTag, $srcParts); $srcPart = $srcParts[0]; print_r($srcPart); //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.0100.01018.53
8.3.50.0090.01121.21
8.3.40.0160.00618.93
8.3.30.0130.01018.69
8.3.20.0050.00318.84
8.3.10.0050.00321.22
8.3.00.0000.00823.66
8.2.180.0070.00718.63
8.2.170.0060.00922.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00421.26
8.2.110.0000.01021.25
8.2.100.0040.00818.03
8.2.90.0050.00319.36
8.2.80.0060.00317.97
8.2.70.0060.00317.88
8.2.60.0040.00418.05
8.2.50.0080.00018.07
8.2.40.0040.00418.34
8.2.30.0090.00019.43
8.2.20.0000.00717.80
8.2.10.0040.00417.78
8.2.00.0000.00817.81
8.1.280.0100.00725.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0100.00022.14
8.1.230.0120.00018.95
8.1.220.0030.00517.80
8.1.210.0000.00818.77
8.1.200.0060.00317.47
8.1.190.0000.00917.38
8.1.180.0060.00318.10
8.1.170.0030.00518.73
8.1.160.0070.00018.87
8.1.150.0000.00718.78
8.1.140.0060.00317.65
8.1.130.0000.00717.86
8.1.120.0080.00017.52
8.1.110.0000.00717.60
8.1.100.0040.00417.64
8.1.90.0050.00217.50
8.1.80.0000.00717.62
8.1.70.0030.00317.59
8.1.60.0040.00417.77
8.1.50.0000.00817.54
8.1.40.0060.00317.71
8.1.30.0020.00517.78
8.1.20.0030.00717.69
8.1.10.0030.00517.73
8.1.00.0040.00417.64
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0070.00018.53
8.0.270.0000.00817.19
8.0.260.0070.00017.02
8.0.250.0040.00417.12
8.0.240.0030.00717.08
8.0.230.0040.00417.09
8.0.220.0030.00617.02
8.0.210.0030.00316.95
8.0.200.0000.00616.99
8.0.190.0000.00817.06
8.0.180.0000.00816.99
8.0.170.0040.00417.06
8.0.160.0000.00816.92
8.0.150.0030.00516.86
8.0.140.0030.00616.90
8.0.130.0030.00313.55
8.0.120.0000.00817.00
8.0.110.0000.00717.11
8.0.100.0040.00416.91
8.0.90.0040.00416.91
8.0.80.0090.00617.09
8.0.70.0000.00817.00
8.0.60.0080.00016.95
8.0.50.0040.00417.07
8.0.30.0060.01217.36
8.0.20.0080.01217.40
8.0.10.0000.00717.20
8.0.00.0070.01316.89
7.4.330.0020.00216.78
7.4.320.0060.00016.58
7.4.300.0030.00316.82
7.4.290.0030.00316.64
7.4.280.0000.00716.70
7.4.270.0050.00316.58
7.4.260.0050.00013.47
7.4.250.0060.00316.81
7.4.240.0000.00816.83
7.4.230.0070.00016.72
7.4.220.0090.00916.70
7.4.210.0070.00716.71
7.4.200.0040.00416.93
7.4.190.0040.00416.88
7.4.160.0110.00516.74
7.4.150.0120.00917.40
7.4.140.0050.01417.86
7.4.130.0120.00516.67
7.4.120.0090.01216.75
7.4.110.0140.00316.82
7.4.100.0110.00816.64
7.4.90.0060.01516.77
7.4.80.0070.01419.39
7.4.70.0130.00716.63
7.4.60.0070.01716.62
7.4.50.0080.00016.51
7.4.40.0130.00322.77
7.4.30.0120.00916.75
7.4.00.0030.01014.95
7.3.330.0060.00013.29
7.3.320.0000.00513.30
7.3.310.0030.00316.37
7.3.300.0070.00016.46
7.3.290.0090.00916.54
7.3.280.0090.00716.47
7.3.270.0200.00317.40
7.3.260.0090.01418.24
7.3.250.0100.01016.73
7.3.240.0110.00616.72
7.3.230.0130.00316.74
7.3.210.0030.01816.43
7.3.200.0130.00319.39
7.3.190.0110.01016.36
7.3.180.0130.00316.44
7.3.170.0080.01216.59
7.3.160.0130.00316.66
7.3.120.0090.00914.93
7.2.330.0090.00916.84
7.2.320.0060.01216.61
7.2.310.0060.01716.85
7.2.300.0100.01116.75
7.2.290.0120.00616.85
7.2.110.0110.01116.72
7.1.70.0060.00917.38
7.1.60.0040.00717.58
7.1.50.0100.01317.18
7.1.00.0030.05022.49
7.0.200.0080.00417.01
7.0.140.0070.07321.96
7.0.110.0130.07021.70
7.0.100.0030.08321.86
7.0.90.0100.08021.63
7.0.80.0030.09021.79
7.0.70.0030.04321.82
7.0.60.0070.04321.77
7.0.50.0100.07021.83
7.0.40.0070.07319.60
7.0.30.0000.08319.65
7.0.20.0070.08019.60
7.0.10.0030.05019.69
7.0.00.0070.07719.68
5.6.280.0000.07321.00
5.6.260.0000.07020.69
5.6.250.0100.07720.54
5.6.240.0100.08020.64
5.6.230.0000.08320.50
5.6.220.0000.04720.63
5.6.210.0070.07720.57
5.6.200.0100.07020.52
5.6.190.0070.04720.65
5.6.180.0030.08320.42
5.6.170.0030.08020.41
5.6.160.0070.07720.64
5.6.150.0070.07720.58
5.6.140.0000.08320.41
5.6.130.0100.07020.60
5.6.120.0170.07020.64
5.6.110.0100.07020.63
5.6.100.0130.04020.79
5.6.90.0100.04020.39
5.6.80.0030.06320.03
5.6.70.0030.05320.03
5.6.60.0030.07019.91
5.6.50.0030.08019.89
5.6.40.0130.04319.96
5.6.30.0070.04319.77
5.6.20.0030.07319.86
5.6.10.0000.04719.86
5.6.00.0030.05719.91
5.5.380.0030.08017.44
5.5.370.0000.07317.61
5.5.360.0070.07017.62
5.5.350.0030.08317.19
5.5.340.0070.08017.86
5.5.330.0100.07318.10
5.5.320.0000.08317.87
5.5.310.0070.07317.84
5.5.300.0070.07717.98
5.5.290.0000.08018.13
5.5.280.0070.08318.16
5.5.270.0000.08318.09
5.5.260.0030.08017.76
5.5.250.0030.07317.80
5.5.240.0070.07017.48
5.5.230.0030.04317.51
5.5.220.0100.07017.28
5.5.210.0030.08017.39
5.5.200.0070.06017.47
5.5.190.0030.08017.11
5.5.180.0000.08017.51
5.5.160.0000.07717.52
5.5.150.0000.06317.16
5.5.140.0000.08017.50
5.5.130.0030.08017.47
5.5.120.0000.08017.24
5.5.110.0130.06317.36
5.5.100.0070.08017.42
5.5.90.0130.06017.26
5.5.80.0070.06717.37
5.5.70.0070.08017.01
5.5.60.0070.07317.11
5.5.50.0100.07017.34
5.5.40.0070.07017.37
5.5.30.0070.07017.00
5.5.20.0030.07317.11
5.5.10.0100.04017.48
5.5.00.0070.06317.27
5.4.450.0100.07719.20
5.4.440.0030.07719.30
5.4.430.0070.07319.29
5.4.420.0130.03719.27
5.4.410.0030.07319.14
5.4.400.0030.05719.07
5.4.390.0030.07319.14
5.4.380.0000.05319.20
5.4.370.0100.05718.90
5.4.360.0070.05718.89
5.4.350.0030.07019.05
5.4.340.0100.07018.98
5.4.320.0000.04719.22
5.4.310.0000.08319.22
5.4.300.0130.06719.05
5.4.290.0000.07719.02
5.4.280.0070.04318.97
5.4.270.0030.06019.09
5.4.260.0070.06719.07
5.4.250.0070.07319.04
5.4.240.0030.05719.04
5.4.230.0070.06319.21
5.4.220.0030.07719.02
5.4.210.0130.06718.96
5.4.200.0070.07018.89
5.4.190.0070.07318.96
5.4.180.0070.07718.89
5.4.170.0100.04019.21
5.4.160.0070.03719.09
5.4.150.0000.08318.96
5.4.140.0030.07316.16
5.4.130.0100.06016.16
5.4.120.0030.04316.41
5.4.110.0030.04316.23
5.4.100.0030.05716.08
5.4.90.0070.06716.45
5.4.80.0030.07316.16
5.4.70.0100.06316.36
5.4.60.0070.07016.42
5.4.50.0170.03716.20
5.4.40.0030.05016.42
5.4.30.0000.07016.43
5.4.20.0000.07016.41
5.4.10.0030.06316.44
5.4.00.0000.07315.55
5.3.290.0030.04014.53
5.3.280.0030.07014.64
5.3.270.0070.07314.48
5.3.260.0000.06014.39
5.3.250.0000.08014.63
5.3.240.0030.07714.39
5.3.230.0030.04714.38
5.3.220.0030.08014.56
5.3.210.0030.07714.59
5.3.200.0030.07014.43
5.3.190.0000.07714.43
5.3.180.0070.04014.63
5.3.170.0000.07014.48
5.3.160.0000.08014.55
5.3.150.0100.07014.48
5.3.140.0030.07314.36
5.3.130.0070.06314.55
5.3.120.0000.08014.42
5.3.110.0030.06714.54
5.3.100.0000.07714.11
5.3.90.0000.07714.03
5.3.80.0030.07313.94
5.3.70.0130.03714.04
5.3.60.0030.06713.94
5.3.50.0030.04014.02
5.3.40.0030.06314.02
5.3.30.0000.04313.72
5.3.20.0070.07313.48
5.3.10.0070.06313.59
5.3.00.0000.04313.70
5.2.170.0070.06311.21
5.2.160.0000.06310.93
5.2.150.0030.06011.15
5.2.140.0000.06711.04
5.2.130.0000.06311.06
5.2.120.0070.05710.99
5.2.110.0030.06011.04
5.2.100.0030.06011.06
5.2.90.0030.03310.98
5.2.80.0030.06311.04
5.2.70.0030.04711.02
5.2.60.0030.06011.01
5.2.50.0030.05011.09
5.2.40.0000.06010.93
5.2.30.0070.05710.88
5.2.20.0000.05310.95
5.2.10.0070.04710.85
5.2.00.0100.05310.66
5.1.60.0000.0539.92
5.1.50.0030.04710.16
5.1.40.0000.0539.88
5.1.30.0030.05010.34
5.1.20.0030.03310.20
5.1.10.0100.0309.89
5.1.00.0030.0509.96
5.0.50.0000.0408.80
5.0.40.0000.0478.36
5.0.30.0000.0678.14
5.0.20.0030.0408.21
5.0.10.0000.0438.14
5.0.00.0070.0608.17
4.4.90.0000.0377.29
4.4.80.0030.0337.29
4.4.70.0030.0237.29
4.4.60.0030.0337.29
4.4.50.0000.0377.29
4.4.40.0030.0277.29
4.4.30.0030.0307.29
4.4.20.0000.0377.29
4.4.10.0000.0377.29
4.4.00.0000.0577.29
4.3.110.0000.0377.29
4.3.100.0000.0337.29
4.3.90.0000.0337.29
4.3.80.0030.0477.29
4.3.70.0030.0177.29
4.3.60.0000.0377.29
4.3.50.0000.0337.29
4.3.40.0000.0507.29
4.3.30.0000.0377.29
4.3.20.0000.0377.29
4.3.10.0030.0207.29
4.3.00.0000.0337.29

preferences:
49.54 ms | 401 KiB | 5 Q