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">'; //remove all whitespace from within and around the src portion $imageTag = trim(preg_replace('/[\s]+/','', $imageTag)); print_r($imageTag . "\n"); //grab the src portion of the image tag $srcPattern = "/src=.*?(\s|>)/s"; preg_match($srcPattern, $imageTag, $srcParts); $srcPart = $srcParts[0]; 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(strpos($oldUrl, '"') == 0 || strpos($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.0070.00718.43
8.3.50.0160.00222.00
8.3.40.0150.00018.94
8.3.30.0110.00419.07
8.3.20.0000.00720.13
8.3.10.0040.00423.66
8.3.00.0090.00019.63
8.2.180.0130.00718.63
8.2.170.0070.00722.96
8.2.160.0100.00720.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0040.00422.45
8.2.110.0090.00022.16
8.2.100.0030.01018.03
8.2.90.0000.00819.35
8.2.80.0050.00317.97
8.2.70.0060.00317.88
8.2.60.0000.00818.05
8.2.50.0000.01018.07
8.2.40.0000.00820.19
8.2.30.0080.00018.14
8.2.20.0000.00917.89
8.2.10.0040.00418.06
8.2.00.0060.00317.96
8.1.280.0060.00925.92
8.1.270.0060.00323.91
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0000.00923.91
8.1.230.0110.00419.04
8.1.220.0000.00717.79
8.1.210.0000.00818.77
8.1.200.0000.00917.25
8.1.190.0000.00817.24
8.1.180.0110.00019.14
8.1.170.0050.00318.69
8.1.160.0000.00822.06
8.1.150.0050.00218.84
8.1.140.0000.00717.51
8.1.130.0000.00717.85
8.1.120.0000.00717.69
8.1.110.0040.00417.61
8.1.100.0000.00817.67
8.1.90.0000.00817.60
8.1.80.0020.00517.65
8.1.70.0000.00717.49
8.1.60.0000.00717.71
8.1.50.0000.00817.71
8.1.40.0000.00817.57
8.1.30.0040.00417.75
8.1.20.0000.00817.83
8.1.10.0000.00817.63
8.1.00.0030.00617.58
8.0.300.0040.00418.77
8.0.290.0080.00017.02
8.0.280.0030.00318.39
8.0.270.0000.00817.34
8.0.260.0030.00317.21
8.0.250.0030.00317.11
8.0.240.0000.00816.94
8.0.230.0000.00717.09
8.0.220.0030.00316.93
8.0.210.0000.00817.08
8.0.200.0000.00717.14
8.0.190.0030.00617.02
8.0.180.0000.00716.95
8.0.170.0070.00016.96
8.0.160.0040.00416.86
8.0.150.0040.00417.05
8.0.140.0040.00417.06
8.0.130.0000.00613.51
8.0.120.0040.00416.89
8.0.110.0000.00717.08
8.0.100.0000.00717.08
8.0.90.0080.00017.11
8.0.80.0060.00917.03
8.0.70.0050.00216.91
8.0.60.0040.00416.93
8.0.50.0050.00316.86
8.0.30.0090.01417.38
8.0.20.0100.00717.43
8.0.10.0040.00417.06
8.0.00.0110.00716.96
7.4.330.0050.00015.14
7.4.320.0050.00216.72
7.4.300.0030.00316.70
7.4.290.0030.00316.74
7.4.280.0050.00316.71
7.4.270.0020.00516.83
7.4.260.0000.00716.70
7.4.250.0040.00416.83
7.4.240.0040.00416.84
7.4.230.0030.00516.54
7.4.220.0140.00616.91
7.4.210.0060.00816.81
7.4.200.0040.00316.57
7.4.190.0030.00316.71
7.4.160.0060.00916.60
7.4.150.0090.00917.40
7.4.140.0060.01417.86
7.4.130.0130.00716.73
7.4.120.0080.01116.81
7.4.110.0070.01116.59
7.4.100.0090.00916.72
7.4.90.0120.00616.68
7.4.80.0060.01519.39
7.4.70.0070.01416.96
7.4.60.0090.01216.41
7.4.50.0050.00316.57
7.4.40.0110.00616.58
7.4.30.0080.00816.82
7.4.00.0030.01215.01
7.3.330.0020.00213.41
7.3.320.0000.00613.18
7.3.310.0000.00716.45
7.3.300.0030.00316.41
7.3.290.0070.00716.49
7.3.280.0110.00816.52
7.3.270.0150.00317.40
7.3.260.0100.00716.82
7.3.250.0130.00716.60
7.3.240.0120.00616.84
7.3.230.0030.01316.39
7.3.210.0110.00616.58
7.3.200.0090.00919.39
7.3.190.0100.01016.57
7.3.180.0070.00816.56
7.3.170.0100.01316.94
7.3.160.0060.01016.47
7.3.120.0100.00715.00
7.3.10.0120.00616.64
7.3.00.0140.00616.46
7.2.330.0030.01516.74
7.2.320.0120.00916.78
7.2.310.0070.01016.71
7.2.300.0100.00716.80
7.2.290.0110.00716.94
7.2.130.0160.00616.42
7.2.120.0180.01116.73
7.2.110.0100.00816.92
7.2.100.0070.01116.71
7.2.90.0150.00416.76
7.2.80.0150.00716.60
7.2.70.0230.00616.90
7.2.60.0080.00516.92
7.2.50.0180.00316.30
7.2.40.0080.01516.91
7.2.30.0150.00816.84
7.2.20.0210.00916.76
7.2.10.0110.01316.80
7.2.00.0090.01417.16
7.1.250.0000.01315.46
7.1.70.0000.00817.32
7.1.60.0120.00919.46
7.1.50.0180.00717.24
7.1.00.0070.07322.38
7.0.200.0000.00917.06
7.0.140.0030.07722.04
7.0.60.0130.06019.93
7.0.50.0030.04317.93
7.0.40.0000.07320.10
7.0.30.0200.07020.04
7.0.20.0300.08320.03
7.0.10.0130.05320.18
7.0.00.0170.08020.10
5.6.280.0100.07021.07
5.6.210.0170.06320.46
5.6.200.0070.06718.15
5.6.190.0070.07720.27
5.6.180.0230.08020.43
5.6.170.0200.03720.52
5.6.160.0130.07720.41
5.6.150.0030.09018.07
5.6.140.0000.05718.21
5.6.130.0030.04318.14
5.6.120.0170.07021.04
5.6.110.0130.08020.98
5.6.100.0030.06721.13
5.6.90.0100.07320.96
5.6.80.0170.07720.40
5.5.350.4330.03720.42
5.5.340.0100.03317.92
5.5.330.0070.04020.19
5.5.320.0330.05320.18
5.5.310.0400.07020.41
5.5.300.0030.08717.92
5.5.290.0000.08717.91
5.5.280.0100.08020.79
5.5.270.0170.06320.75
5.5.260.0100.06020.86
5.5.250.0030.05020.59
5.5.240.0330.06320.28
5.4.450.0430.04719.26
5.4.440.0470.07319.56
5.4.430.0370.07719.42
5.4.420.0370.06019.53
5.4.410.0400.04319.45
5.4.400.0570.06319.20
5.4.390.0470.05718.93
5.4.380.0570.06018.78
5.4.370.0530.06319.24
5.4.360.0530.04018.93
5.4.350.0430.05719.08
5.4.340.0500.04319.14
5.4.320.0400.04019.08
5.4.310.0500.06019.16
5.4.300.0400.04318.93
5.4.290.0330.05018.77
5.4.280.0470.06319.09
5.4.270.0430.02719.21
5.4.260.0500.05719.05
5.4.250.0430.06718.88
5.4.240.0370.05719.15
5.4.230.0400.05019.07
5.4.220.0330.06018.80
5.4.210.0430.06319.07
5.4.200.0330.03719.07
5.4.190.0430.05319.07
5.4.180.0370.05718.94
5.4.170.0370.05719.07
5.4.160.0330.04719.20
5.4.150.0470.07018.93
5.4.140.0500.03316.34
5.4.130.0400.06316.23
5.4.120.0430.06016.31
5.4.110.0430.06716.44
5.4.100.0370.04016.27
5.4.90.0330.04016.25
5.4.80.0470.05016.20
5.4.70.0400.05716.48
5.4.60.0470.06716.04
5.4.50.0430.06316.16
5.4.40.0430.06716.15
5.4.30.0530.05716.32
5.4.20.0400.04716.18
5.4.10.0430.03016.20
5.4.00.0330.03715.90
5.3.290.0530.07014.51
5.3.280.0370.04014.46
5.3.270.0400.05014.55
5.3.260.0570.05714.51
5.3.250.0470.05014.55
5.3.240.0500.06314.65
5.3.230.0470.07014.54
5.3.220.0370.04714.52
5.3.210.0400.04014.66
5.3.200.0370.04314.55
5.3.190.0470.03714.43
5.3.180.0400.05314.55
5.3.170.0500.06314.65
5.3.160.0470.06314.37
5.3.150.0500.05714.42
5.3.140.0500.04714.41
5.3.130.0500.06314.41
5.3.120.0500.04314.50
5.3.110.0400.04314.53
5.3.100.0370.04314.08
5.3.90.0400.03713.89
5.3.80.0400.04014.03
5.3.70.0300.04013.86
5.3.60.0330.03713.83
5.3.50.0370.03713.79
5.3.40.0430.06313.79
5.3.30.0530.06013.75
5.3.20.0470.06313.64
5.3.10.0570.05713.75
5.3.00.0530.05013.52
5.2.170.0400.04013.52
5.2.160.0330.04713.52
5.2.150.0230.04313.52
5.2.140.0370.03713.52
5.2.130.0230.04013.52
5.2.120.0330.04713.52
5.2.110.0330.03013.52
5.2.100.0400.05713.52
5.2.90.0230.03713.52
5.2.80.0300.03013.52
5.2.70.0430.05013.52
5.2.60.0270.03313.52
5.2.50.0370.04713.52
5.2.40.0300.03013.52
5.2.30.0230.04013.52
5.2.20.0330.02713.52
5.2.10.0370.04713.52
5.2.00.0270.04013.52
5.1.60.0300.02013.52
5.1.50.0270.02313.52
5.1.40.0330.04713.52
5.1.30.0330.03013.52
5.1.20.0400.04313.52
5.1.10.0300.03313.52
5.1.00.0370.04013.52
5.0.50.0230.04013.52
5.0.40.0200.03713.52
5.0.30.0130.03313.52
5.0.20.0170.03313.52
5.0.10.0230.02713.52
5.0.00.0230.05013.52
4.4.90.0200.03013.52
4.4.80.0130.04013.52
4.4.70.0200.03313.52
4.4.60.0170.03013.52
4.4.50.0200.02713.52
4.4.40.0130.04013.52
4.4.30.0230.01713.52
4.4.20.0170.02013.52
4.4.10.0170.03013.52
4.4.00.0170.02713.52
4.3.110.0200.03013.52
4.3.100.0170.01313.52
4.3.90.0130.01313.52
4.3.80.0130.02313.52
4.3.70.0100.01713.52
4.3.60.0200.01013.52
4.3.50.0170.03713.52
4.3.40.0070.03013.52
4.3.30.0070.02313.52
4.3.20.0030.02313.52
4.3.10.0100.01713.52
4.3.00.0100.03313.52

preferences:
39.49 ms | 401 KiB | 5 Q