3v4l.org

run code in 300+ PHP versions simultaneously
<?php $image = 'image/testing.jpg'; $url = 'http://testing.com'; $image_parts = parse_url($image); $url_parts = parse_url($url); // check to see if the image has a path of its own if (dirname($image_parts['path']) == '.') { $image_path = dirname($url_parts['path']) . DS . $image_parts['path']; } else { $image_path = $image_parts['path']; } if (empty($image_parts['host'])) { $image_location = sprintf('%s://%s/%s/%s', $url_parts['scheme'], $url_parts['host'], dirname($url_parts['path']), $image_path); } else { $image_location = $image; } var_dump($image_location);

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.70.0110.00416.88
8.3.60.0110.00418.68
8.3.50.0080.00822.04
8.3.40.0120.00918.83
8.3.30.0120.00318.86
8.3.20.0090.00020.34
8.3.10.0040.00423.65
8.3.00.0030.00620.80
8.2.180.0060.00916.88
8.2.170.0100.01022.96
8.2.160.0030.01020.22
8.2.150.0000.00724.18
8.2.140.0060.00324.66
8.2.130.0070.00026.16
8.2.120.0030.00520.81
8.2.110.0070.00320.34
8.2.100.0070.00417.91
8.2.90.0080.00018.34
8.2.80.0000.00817.97
8.2.70.0030.00517.50
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0000.00819.70
8.2.30.0070.00018.36
8.2.20.0040.00417.80
8.2.10.0000.00718.02
8.2.00.0020.00517.77
8.1.280.0070.00725.92
8.1.270.0090.00023.98
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0090.00022.01
8.1.230.0080.00420.96
8.1.220.0040.00417.79
8.1.210.0080.00018.99
8.1.200.0000.00917.35
8.1.190.0080.00017.35
8.1.180.0050.00318.10
8.1.170.0040.00418.59
8.1.160.0070.00021.92
8.1.150.0000.00818.64
8.1.140.0070.00017.52
8.1.130.0030.00317.82
8.1.120.0000.00717.48
8.1.110.0050.00217.45
8.1.100.0050.00217.46
8.1.90.0030.00617.48
8.1.80.0000.00817.34
8.1.70.0030.00317.40
8.1.60.0060.00317.64
8.1.50.0060.00317.40
8.1.40.0000.00717.53
8.1.30.0000.00917.64
8.1.20.0000.00817.53
8.1.10.0040.00417.50
8.1.00.0030.00617.34
8.0.300.0070.00020.09
8.0.290.0050.00217.05
8.0.280.0050.00218.39
8.0.270.0030.00317.21
8.0.260.0060.00017.06
8.0.250.0070.00016.96
8.0.240.0000.00717.02
8.0.230.0040.00416.86
8.0.220.0000.00716.88
8.0.210.0040.00416.88
8.0.200.0070.00016.98
8.0.190.0040.00416.86
8.0.180.0080.00016.93
8.0.170.0070.00016.81
8.0.160.0000.00716.89
8.0.150.0040.00416.91
8.0.140.0080.00016.83
8.0.130.0000.00713.31
8.0.120.0030.00715.12
8.0.110.0070.00215.17
8.0.100.0040.00615.01
8.0.90.0060.00415.05
8.0.80.0130.00415.16
8.0.70.0100.00015.15
8.0.60.0080.00215.21
8.0.50.0060.00415.13
8.0.30.0100.00615.76
8.0.20.0110.00616.08
8.0.10.0070.00315.24
8.0.00.0070.00915.65
7.4.330.0050.00015.00
7.4.320.0040.00416.63
7.4.300.0070.00016.45
7.4.290.0070.00016.53
7.4.280.0040.00416.55
7.4.270.0000.00716.50
7.4.260.0000.00716.57
7.4.250.0030.00314.94
7.4.240.0060.00315.41
7.4.230.0080.00214.97
7.4.220.0090.00814.95
7.4.210.0090.00515.47
7.4.200.0020.00814.85
7.4.190.0090.00114.99
7.4.180.0050.00213.34
7.4.160.0030.00814.95
7.4.150.0070.00515.32
7.4.140.0110.00316.28
7.4.130.0080.00715.33
7.4.120.0080.00615.54
7.4.110.0110.00514.95
7.4.100.0070.00814.87
7.4.90.0110.00614.82
7.4.80.0080.00816.23
7.4.70.0060.00814.81
7.4.60.0050.00914.73
7.4.50.0060.00314.75
7.4.40.0100.00414.74
7.4.30.0080.00614.83
7.4.20.0110.00013.13
7.4.10.0080.00413.12
7.4.00.0080.00814.31
7.3.330.0050.00013.13
7.3.320.0000.00613.40
7.3.310.0050.00514.83
7.3.300.0070.00214.74
7.3.290.0070.00614.79
7.3.280.0100.00715.55
7.3.270.0090.00815.23
7.3.260.0130.00214.87
7.3.250.0090.00915.31
7.3.240.0110.00314.72
7.3.230.0080.00814.79
7.3.220.0040.00813.17
7.3.210.0120.00514.74
7.3.200.0080.00916.27
7.3.190.0110.00714.73
7.3.180.0090.00514.77
7.3.170.0090.00514.77
7.3.160.0090.00414.73
7.3.150.0080.00013.05
7.3.140.0000.00913.12
7.3.130.0030.00513.11
7.3.120.0010.01014.28
7.3.110.0070.00313.98
7.3.100.0060.00613.92
7.3.90.0080.00313.98
7.3.80.0020.00513.92
7.3.70.0060.00713.92
7.3.60.0050.00413.99
7.3.50.0050.00714.01
7.3.40.0020.00713.83
7.3.30.0050.00413.88
7.3.20.0050.00415.84
7.3.10.0090.00515.92
7.3.00.0060.00616.04
7.2.340.0120.00013.05
7.2.330.0090.00715.05
7.2.320.0130.00214.99
7.2.310.0060.01014.78
7.2.300.0070.00814.87
7.2.290.0080.00814.78
7.2.280.0000.01213.25
7.2.270.0080.00413.13
7.2.260.0090.00313.16
7.2.250.0100.00514.23
7.2.240.0070.00914.07
7.2.230.0080.00413.91
7.2.220.0060.00813.99
7.2.210.0090.00314.01
7.2.200.0110.00713.89
7.2.190.0130.00214.05
7.2.180.0080.00614.09
7.2.170.0090.00314.08
7.2.160.0060.00613.18
7.2.150.0100.00315.16
7.2.140.0120.00014.98
7.2.130.0120.00515.85
7.2.120.0150.00115.72
7.2.110.0130.00616.05
7.2.100.0070.01015.65
7.2.90.0100.00816.02
7.2.80.0080.00715.75
7.2.70.0080.00815.90
7.2.60.0080.00616.18
7.2.50.0100.00515.73
7.2.40.0070.00615.71
7.2.30.0120.00315.64
7.2.20.0080.00715.89
7.2.10.0090.00715.58
7.2.00.0120.00717.08
7.1.330.0070.00614.82
7.1.320.0050.00614.79
7.1.310.0080.00515.00
7.1.300.0110.00314.98
7.1.290.0060.00614.85
7.1.280.0070.00414.87
7.1.270.0050.00714.86
7.1.260.0070.00514.95
7.1.250.0120.00314.70
7.1.240.0000.01214.04
7.1.230.0090.00214.16
7.1.220.0120.00014.27
7.1.210.0120.00014.20
7.1.200.0080.00515.05
7.1.190.0080.00414.29
7.1.180.0060.00614.13
7.1.170.0000.01214.01
7.1.160.0090.00314.17
7.1.150.0040.00814.13
7.1.140.0120.00014.29
7.1.130.0000.01314.25
7.1.120.0100.00214.02
7.1.110.0090.00314.13
7.1.100.0060.00616.25
7.1.90.0060.00614.14
7.1.80.0070.00514.21
7.1.70.0070.00315.52
7.1.60.0110.00716.78
7.1.50.0050.01115.39
7.1.40.0120.00014.09
7.1.30.0130.00014.21
7.1.20.0140.00014.17
7.1.10.0040.00813.98
7.1.00.0050.04818.35
7.0.330.0120.00013.82
7.0.320.0060.00613.83
7.0.310.0040.00813.88
7.0.300.0080.00513.80
7.0.290.0090.00513.95
7.0.280.0090.00213.98
7.0.270.0090.00213.83
7.0.260.0120.00014.02
7.0.250.0060.00614.01
7.0.240.0070.00414.02
7.0.230.0090.00214.09
7.0.220.0060.00614.09
7.0.210.0120.00014.14
7.0.200.0040.00815.38
7.0.190.0120.00014.02
7.0.180.0070.00514.14
7.0.170.0080.00414.03
7.0.160.0110.00014.09
7.0.150.0120.00013.99
7.0.140.0100.03517.95
7.0.130.0130.00013.98
7.0.120.0090.00314.13
7.0.110.0080.00413.89
7.0.100.0060.00614.02
7.0.90.0120.00013.88
7.0.80.0050.00713.90
7.0.70.0100.00213.73
7.0.60.0110.02816.93
7.0.50.0090.04215.88
7.0.40.0070.04516.93
7.0.30.0220.04017.17
7.0.20.0180.03916.96
7.0.10.0070.03417.08
7.0.00.0060.04316.99
5.6.400.0060.00612.78
5.6.390.0060.00512.56
5.6.380.0120.00012.82
5.6.370.0090.00212.82
5.6.360.0040.00812.49
5.6.350.0080.00312.60
5.6.340.0080.00312.63
5.6.330.0070.00312.52
5.6.320.0080.00312.51
5.6.310.0060.00612.61
5.6.300.0120.00012.69
5.6.290.0110.00012.81
5.6.280.0050.03816.86
5.6.270.0100.00012.70
5.6.260.0110.00012.51
5.6.250.0060.00612.67
5.6.240.0110.00012.82
5.6.230.0090.00312.70
5.6.220.0080.00412.80
5.6.210.0090.04116.75
5.6.200.0070.03615.39
5.6.190.0050.03016.87
5.6.180.0210.03916.49
5.6.170.0210.03816.72
5.6.160.0090.04216.60
5.6.150.0060.03015.50
5.6.140.0110.03515.37
5.6.130.0140.03415.39
5.6.120.0060.02216.90
5.6.110.0090.03916.81
5.6.100.0090.04916.80
5.6.90.0070.02016.69
5.6.80.0090.02116.52
5.6.70.0070.00412.78
5.6.60.0050.00512.93
5.6.50.0110.00012.78
5.6.40.0070.00412.59
5.6.30.0070.00412.81
5.6.20.0110.00012.75
5.6.10.0050.00512.75
5.6.00.0070.00412.56
5.5.380.0110.00012.66
5.5.370.0110.00012.71
5.5.360.0120.00012.63
5.5.350.2110.01316.44
5.5.340.0080.04315.17
5.5.330.0090.02216.38
5.5.320.0080.01816.39
5.5.310.0180.02116.47
5.5.300.0040.02715.21
5.5.290.0080.03615.35
5.5.280.0090.02316.55
5.5.270.0080.03816.73
5.5.260.0090.02516.62
5.5.250.0060.02816.56
5.5.240.0080.02416.53
5.5.230.0060.00612.73
5.5.220.0080.00312.50
5.5.210.0070.00312.66
5.5.200.0080.00312.43
5.5.190.0040.00712.32
5.5.180.0060.00612.42
5.5.170.0050.00512.40
5.5.160.0040.00612.45
5.5.150.0060.00612.55
5.5.140.0110.00012.19
5.5.130.0060.00612.34
5.5.120.0110.00012.17
5.5.110.0070.00512.32
5.5.100.0000.01112.43
5.5.90.0040.00812.63
5.5.80.0000.01112.47
5.5.70.0100.00012.61
5.5.60.0110.00012.66
5.5.50.0110.00012.49
5.5.40.0060.00612.55
5.5.30.0110.00012.62
5.5.20.0050.00512.53
5.5.10.0070.00312.67
5.5.00.0050.00512.52
5.4.450.0230.02527.43
5.4.440.0110.02325.38
5.4.430.0170.02322.77
5.4.420.0350.01821.98
5.4.410.0140.02420.63
5.4.400.0140.02219.79
5.4.390.0140.02518.97
5.4.380.0190.03415.53
5.4.370.0250.03915.42
5.4.360.0150.03015.60
5.4.350.0140.03615.61
5.4.340.0180.03015.68
5.4.330.0040.00712.50
5.4.320.0070.01912.54
5.4.310.0070.02412.45
5.4.300.0090.02012.49
5.4.290.0090.01912.54
5.4.280.0080.02012.47
5.4.270.0060.02212.47
5.4.260.0040.02512.37
5.4.250.0090.02412.36
5.4.240.0060.02612.43
5.4.230.0040.02312.38
5.4.220.0080.02012.37
5.4.210.0080.01912.46
5.4.200.0090.02012.35
5.4.190.0060.02112.38
5.4.180.0080.01912.29
5.4.170.0070.01912.51
5.4.160.0080.01812.52
5.4.150.0080.01912.39
5.4.140.0080.02112.32
5.4.130.0050.02212.23
5.4.120.0070.02012.21
5.4.110.0020.02512.29
5.4.100.0070.01912.36
5.4.90.0050.02312.27
5.4.80.0080.02112.23
5.4.70.0070.02512.36
5.4.60.0060.02712.30
5.4.50.0060.02812.24
5.4.40.0080.02412.23
5.4.30.0080.02412.27
5.4.20.0060.02712.35
5.4.10.0090.02312.27
5.4.00.0110.02111.82
5.3.290.0070.02212.96
5.3.280.0050.02912.70
5.3.270.0090.02812.76
5.3.260.0100.02612.82
5.3.250.0080.02612.79
5.3.240.0100.02612.84
5.3.230.0070.02712.76
5.3.220.0100.02412.79
5.3.210.0080.02912.88
5.3.200.0110.02312.74
5.3.190.0060.02912.80
5.3.180.0080.02913.00
5.3.170.0120.01912.82
5.3.160.0080.02312.95
5.3.150.0070.02812.82
5.3.140.0070.02712.84
5.3.130.0070.02612.92
5.3.120.0080.02212.64
5.3.110.0050.03012.64
5.3.100.0040.03012.57
5.3.90.0100.02412.55
5.3.80.0040.02812.46
5.3.70.0090.02412.46
5.3.60.0070.02912.61
5.3.50.0090.02612.42
5.3.40.0080.02512.29
5.3.30.0060.02212.38
5.3.20.0030.02312.19
5.3.10.0110.01412.15
5.3.00.0080.02112.13
5.2.170.0050.02010.53
5.2.160.0060.01810.56
5.2.150.0070.01610.64
5.2.140.0040.01710.50
5.2.130.0040.01710.47
5.2.120.0020.01910.51
5.2.110.0060.01410.47
5.2.100.0050.01610.61
5.2.90.0040.01710.58
5.2.80.0060.01610.47
5.2.70.0060.01510.42
5.2.60.0050.01510.45
5.2.50.0050.01710.38
5.2.40.0070.01410.52
5.2.30.0030.01710.34
5.2.20.0050.01510.41
5.2.10.0070.01410.21
5.2.00.0040.01710.12
5.1.60.0020.0179.53
5.1.50.0040.0159.38
5.1.40.0040.0149.49
5.1.30.0040.0169.72
5.1.20.0050.0199.70
5.1.10.0040.0199.61
5.1.00.0070.0179.45
5.0.50.0020.0178.56
5.0.40.0040.0148.49
5.0.30.0030.0218.40
5.0.20.0060.0108.38
5.0.10.0020.0138.38
5.0.00.0030.0208.37
4.4.90.0030.0127.63
4.4.80.0020.0127.62
4.4.70.0030.0107.62
4.4.60.0020.0117.62
4.4.50.0020.0107.63
4.4.40.0010.0187.60
4.4.30.0040.0087.63
4.4.20.0020.0117.67
4.4.10.0020.0117.67
4.4.00.0030.0137.63
4.3.110.0020.0097.58
4.3.100.0010.0097.58
4.3.90.0020.0097.56
4.3.80.0030.0157.54
4.3.70.0030.0087.56
4.3.60.0010.0097.56
4.3.50.0020.0087.56
4.3.40.0040.0127.51
4.3.30.0020.0096.90
4.3.20.0020.0106.89
4.3.10.0020.0096.87
4.3.00.0030.01017.63

preferences:
51.79 ms | 401 KiB | 5 Q