3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url1 = 'https://www.youtube.com/watch?v=udm5jUA-2bs'; $url_host_parts1 = explode('.', parse_url($url1, PHP_URL_HOST)); $host1 = (count($url_host_parts1) == 2) ? $url_host_parts1[0] : $url_host_parts1[1]; echo $host1; echo "\n"; $url2 = 'https://youtube.com/watch?v=udm5jUA-2bs'; $url_host_parts2 = explode('.', parse_url($url2, PHP_URL_HOST)); $host2 = (count($url_host_parts2) == 2) ? $url_host_parts2[0] : $url_host_parts2[1]; echo $host2;

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.5.10.0110.00716.69
8.5.00.0120.00819.92
8.4.150.0020.00014.05
8.4.140.0120.00417.57
8.4.130.0150.00519.58
8.4.120.0080.01222.39
8.4.110.0130.00718.81
8.4.100.0110.01018.85
8.4.90.0070.01118.83
8.4.80.0110.00818.55
8.4.70.0050.00317.98
8.4.60.0130.00720.66
8.4.50.0120.00720.66
8.4.40.0030.00619.68
8.4.30.0030.00619.50
8.4.20.0070.01120.55
8.4.10.0040.01619.45
8.3.280.0140.01118.57
8.3.270.0120.00716.48
8.3.260.0120.00716.73
8.3.250.0100.00717.16
8.3.240.0120.00816.79
8.3.230.0120.00716.54
8.3.220.0050.00319.16
8.3.210.0070.01016.55
8.3.200.0130.00616.45
8.3.190.0110.00719.16
8.3.180.0110.00716.60
8.3.170.0090.00917.26
8.3.160.0100.01020.26
8.3.150.0130.00616.57
8.3.140.0030.00617.35
8.3.130.0000.00916.57
8.3.120.0030.00618.73
8.3.110.0090.00016.75
8.3.100.0060.00324.06
8.3.90.0090.00326.77
8.3.80.0040.00717.97
8.3.70.0110.00718.55
8.3.60.0210.00018.12
8.3.50.0080.00518.06
8.3.40.0060.00918.74
8.3.30.0160.00918.54
8.3.20.0050.00921.08
8.3.10.0070.00722.20
8.3.00.0080.00819.33
8.2.290.0100.00820.57
8.2.280.0120.00618.24
8.2.270.0090.00916.90
8.2.260.0060.00318.41
8.2.250.0090.00616.93
8.2.240.0040.01517.16
8.2.230.0030.00720.94
8.2.220.0110.00037.54
8.2.210.0140.00426.77
8.2.200.0100.00016.75
8.2.190.0120.00316.65
8.2.180.0040.01118.39
8.2.170.0110.00722.96
8.2.160.0060.01021.30
8.2.150.0130.00720.68
8.2.140.0050.00921.92
8.2.130.0080.00521.17
8.2.120.0110.00521.39
8.2.110.0070.01020.06
8.2.100.0140.00519.16
8.2.90.0100.00718.64
8.2.80.0090.00619.54
8.2.70.0100.00718.62
8.2.60.0100.00519.01
8.2.50.0080.00919.65
8.2.40.0120.00519.72
8.2.30.0050.00919.34
8.2.20.0120.00518.90
8.2.10.0040.01219.00
8.2.00.0090.00918.60
8.1.330.0130.00722.30
8.1.320.0050.00315.97
8.1.310.0040.00418.69
8.1.300.0000.00817.00
8.1.290.0040.00430.84
8.1.280.0130.00325.92
8.1.270.0090.00522.51
8.1.260.0070.00823.47
8.1.250.0090.00623.61
8.1.240.0130.00819.06
8.1.230.0170.00719.64
8.1.220.0140.00318.64
8.1.210.0080.00919.00
8.1.200.0120.00518.65
8.1.190.0110.00818.68
8.1.180.0080.01118.41
8.1.170.0120.00518.60
8.1.160.0100.00818.71
8.1.150.0110.00819.12
8.1.140.0170.00319.35
8.1.130.0060.00919.59
8.1.120.0110.00818.39
8.1.110.0140.00518.32
8.1.100.0130.00419.18
8.1.90.0120.00718.69
8.1.80.0130.00619.15
8.1.70.0110.00518.68
8.1.60.0130.00718.34
8.1.50.0160.00418.31
8.1.40.0140.00618.35
8.1.30.0080.00719.06
8.1.20.0140.00519.32
8.1.10.0140.00718.86
8.1.00.0150.00518.20
8.0.300.0070.00718.01
8.0.290.0170.00417.82
8.0.280.0130.00617.93
8.0.270.0110.00217.78
8.0.260.0120.00718.35
8.0.250.0140.00718.06
8.0.240.0190.00517.97
8.0.230.0140.00717.55
8.0.220.0130.00317.97
8.0.210.0190.00317.34
8.0.200.0140.00917.62
8.0.190.0140.00717.46
8.0.180.0130.00517.47
8.0.170.0130.00917.44
8.0.160.0090.00517.58
8.0.150.0140.00817.98
8.0.140.0160.00617.46
8.0.130.0140.00516.66
8.0.120.0150.00817.53
8.0.110.0180.00517.53
8.0.100.0130.00717.53
8.0.90.0180.00417.56
8.0.80.0150.00817.51
8.0.70.0060.00717.51
8.0.60.0180.00217.47
8.0.50.0180.00417.43
8.0.30.0110.00518.25
8.0.20.0100.00717.73
8.0.10.0170.00318.13
8.0.00.0160.00418.72
7.4.330.0140.00516.96
7.4.320.0170.00617.23
7.4.300.0200.00317.20
7.4.290.0220.00317.26
7.4.280.0210.00417.24
7.4.270.0200.00417.66
7.4.260.0190.00717.20
7.4.250.0210.00417.21
7.4.240.0190.00717.24
7.4.230.0150.01017.18
7.4.220.0230.00217.22
7.4.210.0210.00317.10
7.4.200.0190.00417.23
7.4.190.0200.00917.48
7.4.180.0200.00718.00
7.4.160.0150.00817.04
7.4.150.0240.00517.93
7.4.140.0180.00618.08
7.4.130.0210.00617.22
7.4.120.0180.00616.86
7.4.110.0200.00817.21
7.4.100.0180.00717.65
7.4.90.0230.00317.22
7.4.80.0230.00317.92
7.4.70.0180.00717.20
7.4.60.0170.00717.19
7.4.50.0170.00917.54
7.4.40.0190.00617.08
7.4.30.0210.00517.18
7.4.20.0140.01117.06
7.4.10.0210.00517.03
7.4.00.0180.00716.40
7.3.330.0180.00516.38
7.3.320.0190.00516.35
7.3.310.0180.00717.56
7.3.300.0150.00817.37
7.3.290.0160.00717.13
7.3.280.0170.00917.14
7.3.270.0200.00917.99
7.3.260.0190.00616.87
7.3.250.0230.00417.43
7.3.240.0150.00816.84
7.3.230.0190.00517.52
7.3.220.0260.00317.43
7.3.210.0200.00617.23
7.3.200.0240.00417.52
7.3.190.0200.00817.17
7.3.180.0210.00717.14
7.3.170.0210.00617.46
7.3.160.0210.01017.15
7.3.150.0230.00617.50
7.3.140.0180.00716.95
7.3.130.0160.00817.08
7.3.120.0160.00816.67
7.3.110.0130.00816.63
7.3.100.0180.00516.73
7.3.90.0150.00816.40
7.3.80.0150.00616.60
7.3.70.0100.01016.58
7.3.60.0160.00416.58
7.3.50.0140.00816.55
7.3.40.0130.00716.36
7.3.30.0140.00816.38
7.3.20.0150.00917.63
7.3.10.0160.00817.58
7.3.00.0170.00717.47
7.2.340.0220.00817.43
7.2.330.0170.01017.27
7.2.320.0210.00717.64
7.2.310.0180.01117.64
7.2.300.0180.00917.62
7.2.290.0190.00817.23
7.2.280.0190.00817.29
7.2.270.0170.01017.13
7.2.260.0200.00617.11
7.2.250.0150.00916.75
7.2.240.0170.01017.33
7.2.230.0140.00916.77
7.2.220.0130.00816.49
7.2.210.0120.00916.56
7.2.200.0130.01016.46
7.2.190.0140.00716.70
7.2.180.0140.00716.70
7.2.170.0130.00816.53
7.2.160.0170.00616.99
7.2.150.0170.01217.90
7.2.140.0170.00717.93
7.2.130.0160.00817.92
7.2.120.0120.00917.87
7.2.110.0130.00917.80
7.2.100.0090.00817.78
7.2.90.0150.00817.71
7.2.80.0160.00717.80
7.2.70.0150.00817.79
7.2.60.0150.00817.77
7.2.50.0170.00617.77
7.2.40.0200.00917.75
7.2.30.0140.00717.74
7.2.20.0170.00717.75
7.2.10.0150.00817.92
7.2.00.0120.00517.92
7.1.330.0170.00516.87
7.1.320.0170.00516.72
7.1.310.0160.00616.77
7.1.300.0150.00516.65
7.1.290.0140.00616.71
7.1.280.0130.00816.72
7.1.270.0140.00517.09
7.1.260.0140.00616.71
7.1.250.0150.00816.80
7.1.240.0160.00616.67
7.1.230.0210.00716.68
7.1.220.0170.00616.68
7.1.210.0150.00816.64
7.1.200.0190.00416.63
7.1.190.0150.00916.64
7.1.180.0190.00616.65
7.1.170.0190.00516.65
7.1.160.0150.00816.63
7.1.150.0180.00616.67
7.1.140.0160.00916.62
7.1.130.0160.00616.61
7.1.120.0190.00616.70
7.1.110.0130.00816.58
7.1.100.0150.00816.54
7.1.90.0170.00616.61
7.1.80.0180.00416.62
7.1.70.0160.00616.56
7.1.60.0150.00616.68
7.1.50.0180.00716.70
7.1.40.0170.00816.61
7.1.30.0180.00516.60
7.1.20.0180.00716.61
7.1.10.0160.00816.62
7.1.00.0130.00516.62
7.0.330.0160.01016.39
7.0.320.0190.00616.80
7.0.310.0190.00416.66
7.0.300.0190.00616.62
7.0.290.0150.01016.77
7.0.280.0220.00616.65
7.0.270.0140.01216.68
7.0.260.0220.00516.78
7.0.250.0170.00916.84
7.0.240.0190.00616.78
7.0.230.0180.00516.84
7.0.220.0180.00616.71
7.0.210.0140.00816.78
7.0.200.0200.00516.75
7.0.190.0200.00516.83
7.0.180.0220.00416.82
7.0.170.0180.00416.91
7.0.160.0130.00916.78
7.0.150.0180.00616.75
7.0.140.0150.00916.81
7.0.130.0150.00916.84
7.0.120.0170.00816.78
7.0.110.0190.00617.46
7.0.100.0180.00516.89
7.0.90.0130.00716.69
7.0.80.0180.00916.71
7.0.70.0150.01116.61
7.0.60.0100.01016.82
7.0.50.0120.00616.75
7.0.40.0220.00816.78
7.0.30.0130.00516.84
7.0.20.0250.00416.69
7.0.10.0210.00816.78
7.0.00.0200.00616.71
5.6.400.0180.01016.47
5.6.390.0170.00716.34
5.6.380.0150.00816.05
5.6.370.0190.00716.79
5.6.360.0140.01316.80
5.6.350.0180.00716.76
5.6.340.0180.00916.79
5.6.330.0150.01016.84
5.6.320.0190.00516.80
5.6.310.0200.00416.75
5.6.300.0140.01016.77
5.6.290.0190.00516.81
5.6.280.0130.01116.73
5.6.270.0180.01016.80
5.6.260.0220.00516.78
5.6.250.0150.01016.80
5.6.240.0190.00716.84
5.6.230.0160.00916.75
5.6.220.0180.01116.79
5.6.210.0170.00816.76
5.6.200.0210.00616.77
5.6.190.0210.00716.77
5.6.180.0190.00716.77
5.6.170.0180.00816.74
5.6.160.0180.00816.81
5.6.150.0160.01016.67
5.6.140.0170.00816.73
5.6.130.0140.01016.74
5.6.120.0210.00516.76
5.6.110.0150.00916.78
5.6.100.0170.00616.78
5.6.90.0170.00716.73
5.6.80.0160.00916.73
5.6.70.0130.01216.73
5.6.60.0160.00816.85
5.6.50.0180.00716.74
5.6.40.0160.01016.75
5.6.30.0160.00816.78
5.6.20.0170.00916.71
5.6.10.0170.00816.74
5.6.00.0160.00716.65

preferences:
87.03 ms | 403 KiB | 5 Q