3v4l.org

run code in 300+ PHP versions simultaneously
<?php $imageTag = '<img src = "http://nycxplorer.com/wp-content/uploads/2012/02/bagel1-1.jpg" height="300" width="200">'; //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)-1); } 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.0120.00618.68
8.3.50.0130.00517.56
8.3.40.0090.00618.76
8.3.30.0140.00018.57
8.3.20.0030.00518.89
8.3.10.0080.00020.67
8.3.00.0040.00417.75
8.2.180.0100.01016.63
8.2.170.0090.00622.96
8.2.160.0100.00322.21
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0050.00320.02
8.2.110.0040.00721.10
8.2.100.0040.00718.03
8.2.90.0080.00319.41
8.2.80.0000.00817.93
8.2.70.0000.00817.88
8.2.60.0080.00017.80
8.2.50.0050.00318.07
8.2.40.0000.00820.01
8.2.30.0000.00718.03
8.2.20.0000.00717.97
8.2.10.0000.00717.78
8.2.00.0040.00717.82
8.1.280.0090.00625.92
8.1.270.0080.00023.99
8.1.260.0090.00026.35
8.1.250.0080.00028.09
8.1.240.0090.00022.66
8.1.230.0000.01220.91
8.1.220.0000.00817.74
8.1.210.0030.00518.96
8.1.200.0030.00717.48
8.1.190.0000.00817.43
8.1.180.0040.00418.10
8.1.170.0060.00318.91
8.1.160.0040.00418.92
8.1.150.0040.00418.77
8.1.140.0080.00017.60
8.1.130.0000.00717.77
8.1.120.0040.00417.61
8.1.110.0000.00917.68
8.1.100.0040.00417.61
8.1.90.0070.00017.62
8.1.80.0000.00717.65
8.1.70.0050.00217.63
8.1.60.0000.00817.73
8.1.50.0050.00217.53
8.1.40.0070.00017.68
8.1.30.0000.00817.80
8.1.20.0000.00817.82
8.1.10.0040.00417.75
8.1.00.0060.00317.57
8.0.300.0040.00419.93
8.0.290.0000.00816.88
8.0.280.0040.00418.41
8.0.270.0000.00817.29
8.0.260.0040.00418.75
8.0.250.0050.00317.00
8.0.240.0000.01117.15
8.0.230.0030.00517.04
8.0.220.0030.00317.01
8.0.210.0040.00417.07
8.0.200.0070.00017.15
8.0.190.0050.00317.02
8.0.180.0040.00417.07
8.0.170.0060.00317.04
8.0.160.0030.00317.06
8.0.150.0100.00016.86
8.0.140.0000.01117.03
8.0.130.0000.00613.49
8.0.120.0040.00417.03
8.0.110.0000.00916.95
8.0.100.0040.00416.90
8.0.90.0040.00417.10
8.0.80.0030.01216.98
8.0.70.0040.00417.05
8.0.60.0030.00517.05
8.0.50.0070.00017.00
8.0.30.0120.01017.31
8.0.20.0140.00517.16
8.0.10.0040.00417.02
8.0.00.0090.00916.90
7.4.330.0050.00014.86
7.4.320.0000.00616.72
7.4.300.0000.00616.80
7.4.290.0030.00316.75
7.4.280.0030.00616.81
7.4.270.0070.00316.83
7.4.260.0030.00313.46
7.4.250.0000.00916.82
7.4.240.0000.00716.75
7.4.230.0000.00716.80
7.4.220.0100.00716.89
7.4.210.0100.00716.74
7.4.200.0050.00316.72
7.4.190.0030.00316.93
7.4.160.0110.00616.92
7.4.150.0130.00317.07
7.4.140.0080.01217.31
7.4.130.0120.00516.76
7.4.120.0170.00116.77
7.4.110.0120.00916.48
7.4.100.0100.00716.63
7.4.90.0120.00616.68
7.4.80.0090.00918.80
7.4.70.0060.01216.73
7.4.60.0060.01016.65
7.4.50.0060.00316.78
7.4.40.0070.01022.26
7.4.30.0050.01116.71
7.4.00.0060.00615.19
7.3.330.0000.00713.22
7.3.320.0000.00713.36
7.3.310.0040.00416.48
7.3.300.0000.00716.28
7.3.290.0070.01016.52
7.3.280.0060.00916.48
7.3.270.0110.00617.07
7.3.260.0080.00918.24
7.3.250.0090.01116.58
7.3.240.0100.00616.46
7.3.230.0100.00616.52
7.3.210.0180.00616.54
7.3.200.0070.01019.39
7.3.190.0140.00716.80
7.3.180.0000.01516.55
7.3.170.0070.01016.41
7.3.160.0090.00616.58
7.3.120.0060.01014.84
7.2.330.0090.00916.88
7.2.320.0110.01416.90
7.2.310.0060.01216.82
7.2.300.0080.00817.08
7.2.290.0060.01116.85
7.2.00.0070.00319.93
7.1.200.0000.01615.98
7.1.100.0000.01018.23
7.1.70.0030.00717.43
7.1.60.0120.01219.40
7.1.50.0060.00616.87
7.1.00.0000.04722.37
7.0.200.0030.00516.83
7.0.140.0000.07321.96
7.0.120.0000.03322.15
7.0.60.0100.04719.86
7.0.50.0070.06717.94
7.0.40.0000.09020.23
7.0.30.0470.07320.23
7.0.20.0370.07320.14
7.0.10.0100.07320.19
7.0.00.0170.07320.31
5.6.280.0100.06321.02
5.6.210.0230.05720.75
5.6.200.0070.08018.15
5.6.190.0000.05020.59
5.6.180.2870.03720.77
5.6.170.0400.07720.51
5.6.160.0030.04020.54
5.6.150.0070.07318.08
5.6.140.0070.03718.16
5.6.130.0030.05018.12
5.6.120.0030.07321.01
5.6.110.0100.04020.97
5.6.100.0100.08320.97
5.6.90.0230.07720.87
5.6.80.0070.08020.37
5.6.70.3270.03720.51
5.5.350.0130.07320.43
5.5.340.0070.08018.04
5.5.330.0130.07720.21
5.5.320.0400.07320.51
5.5.310.0300.06020.32
5.5.300.0030.05317.89
5.5.290.0070.08018.01
5.5.280.0030.05020.77
5.5.270.0000.04320.84
5.5.260.0100.07020.83
5.5.250.0070.08320.75
5.5.240.0000.08320.15
5.4.450.0470.04719.14
5.4.440.0600.04719.50
5.4.430.0530.04019.41
5.4.420.0130.05319.43
5.4.410.0400.03019.29
5.4.400.0300.03018.75
5.4.390.0900.03719.04
5.4.380.0300.03018.93
5.4.370.0570.03718.82
5.4.360.0530.04318.75
5.4.350.0670.04019.18
5.4.340.0770.03019.11
5.4.320.0770.03718.93
5.4.310.0600.03319.09
5.4.300.0270.05019.00
5.4.290.0270.04718.71
5.4.280.0570.06018.92
5.4.270.0800.05718.92
5.4.260.0670.04019.10
5.4.250.0500.03018.75
5.4.240.0670.04319.09
5.4.230.0600.03718.92
5.4.220.0600.03719.08
5.4.210.0770.03718.91
5.4.200.0230.04318.86
5.4.190.0530.04018.93
5.4.180.0700.04318.92
5.4.170.0630.04018.93
5.4.160.0430.03718.79
5.4.150.0530.03018.92
5.4.140.0700.04316.32
5.4.130.0700.03716.33
5.4.120.0800.02316.32
5.4.110.0600.03316.33
5.4.100.0870.02716.54
5.4.90.0600.04016.44
5.4.80.0500.03716.30
5.4.70.0530.03716.44
5.4.60.0430.05316.38
5.4.50.0730.02316.14
5.4.40.0600.02716.36
5.4.30.0730.03316.45
5.4.20.0470.04016.18
5.4.10.0770.03716.43
5.4.00.0300.05315.98
5.3.290.0330.04714.52
5.3.280.0700.02314.45
5.3.270.0530.03314.65
5.3.260.0530.03714.46
5.3.250.0630.04014.46
5.3.240.0600.03714.62
5.3.230.0670.04014.47
5.3.220.0470.04714.41
5.3.210.0770.03014.55
5.3.200.0330.04714.58
5.3.190.0430.03014.51
5.3.180.0370.03014.40
5.3.170.0670.03714.41
5.3.160.0670.03314.61
5.3.150.0200.04314.50
5.3.140.0270.05714.51
5.3.130.0630.05014.38
5.3.120.0400.04714.53
5.3.110.0270.03714.42
5.3.100.0870.03713.87
5.3.90.0300.03713.87
5.3.80.0700.03014.03
5.3.70.0400.02713.96
5.3.60.0570.02713.94
5.3.50.0300.04713.80
5.3.40.0270.04013.90
5.3.30.0530.04713.87
5.3.20.0770.02313.52
5.3.10.0600.04313.49
5.3.00.0600.04013.56
5.2.170.0670.02311.33
5.2.160.0500.03311.33
5.2.150.0070.02011.33
5.2.140.0600.03711.33
5.2.130.0430.02711.32
5.2.120.0430.03011.32
5.2.110.0600.02311.32
5.2.100.0630.02311.32
5.2.90.0430.03011.32
5.2.80.0230.03311.32
5.2.70.0500.02711.31
5.2.60.0370.02711.31
5.2.50.0670.04011.27
5.2.40.0430.06011.27
5.2.30.0570.02711.26
5.2.20.0470.02711.26
5.2.10.0400.02711.25
5.2.00.0000.02311.25
5.1.60.0500.02711.24
5.1.50.0470.02011.24
5.1.40.0230.05311.23
5.1.30.0430.02711.23
5.1.20.0170.03011.22
5.1.10.0100.03011.22
5.1.00.0370.02311.22
5.0.50.0230.02011.22
5.0.40.0270.02011.21
5.0.30.0030.02311.21
5.0.20.0300.02011.21
5.0.10.0230.02011.21
5.0.00.0230.02311.20
4.4.90.0170.02011.31
4.4.80.0270.02311.31
4.4.70.0000.02311.26
4.4.60.0330.01011.26
4.4.50.0200.01011.26
4.4.40.0070.02311.24
4.4.30.0130.01711.24
4.4.20.0300.01311.22
4.4.10.0300.01711.22
4.4.00.0070.02711.21
4.3.110.0070.01711.21
4.3.100.0370.01311.21
4.3.90.0170.01011.21
4.3.80.0200.02311.20
4.3.70.0100.02011.20
4.3.60.0100.01011.20
4.3.50.0100.01011.20
4.3.40.0100.02711.20
4.3.30.0070.01311.20
4.3.20.0030.01711.20
4.3.10.0000.02011.20
4.3.00.0030.02011.20

preferences:
37.33 ms | 401 KiB | 5 Q