3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_url = 'foo.bar.baz.com'; $current_domains = explode( '.', $current_url ); $current_top_domain = array_slice( $current_domains, 2 ); echo implode( '.', $current_top_domain );

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.0080.00816.49
8.3.50.0070.01416.39
8.3.40.0090.00618.40
8.3.30.0080.00818.60
8.3.20.0040.00420.34
8.3.10.0040.00421.91
8.3.00.0040.00419.56
8.2.180.0070.00716.60
8.2.170.0070.01422.96
8.2.160.0120.00319.08
8.2.150.0070.00024.18
8.2.140.0050.00324.66
8.2.130.0030.00519.27
8.2.120.0070.00026.35
8.2.110.0030.00620.57
8.2.100.0080.00417.78
8.2.90.0000.00919.13
8.2.80.0050.00317.97
8.2.70.0090.00317.50
8.2.60.0030.00617.80
8.2.50.0060.00318.10
8.2.40.0000.00820.65
8.2.30.0040.00419.12
8.2.20.0000.00717.94
8.2.10.0040.00417.96
8.2.00.0040.00417.96
8.1.280.0040.01125.92
8.1.270.0050.00322.18
8.1.260.0020.00526.35
8.1.250.0050.00328.09
8.1.240.0100.00022.62
8.1.230.0070.00420.83
8.1.220.0000.00717.79
8.1.210.0000.00818.77
8.1.200.0030.00617.22
8.1.190.0060.00317.10
8.1.180.0000.00718.10
8.1.170.0000.00818.56
8.1.160.0000.00718.97
8.1.150.0000.00718.82
8.1.140.0040.00419.48
8.1.130.0030.00318.88
8.1.120.0030.00417.44
8.1.110.0000.00917.27
8.1.100.0000.00817.36
8.1.90.0080.00017.27
8.1.80.0000.00717.22
8.1.70.0000.00717.42
8.1.60.0040.00417.54
8.1.50.0040.00417.34
8.1.40.0070.00017.43
8.1.30.0030.00617.55
8.1.20.0040.00717.57
8.1.10.0020.00517.41
8.1.00.0000.00817.48
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0030.00318.36
8.0.270.0000.00717.24
8.0.260.0030.00316.82
8.0.250.0060.00016.96
8.0.240.0070.00316.96
8.0.230.0000.00716.79
8.0.220.0060.00016.84
8.0.210.0000.00816.86
8.0.200.0040.00416.90
8.0.190.0030.00516.85
8.0.180.0070.00016.86
8.0.170.0000.00716.82
8.0.160.0070.00016.86
8.0.150.0030.00316.76
8.0.140.0030.00316.82
8.0.130.0030.00513.19
8.0.120.0030.00616.79
8.0.110.0030.00316.82
8.0.100.0040.00416.89
8.0.90.0000.00716.68
8.0.80.0090.01416.80
8.0.70.0040.00416.80
8.0.60.0040.00416.89
8.0.50.0040.00416.84
8.0.30.0140.00317.14
8.0.20.0090.00917.40
8.0.10.0090.00016.81
8.0.00.0140.01016.80
7.4.330.0000.00515.55
7.4.320.0030.00316.53
7.4.300.0030.00316.38
7.4.290.0060.00016.48
7.4.280.0040.00416.44
7.4.270.0070.00016.51
7.4.260.0070.00016.49
7.4.250.0080.00016.41
7.4.240.0000.00816.52
7.4.230.0000.00716.56
7.4.220.0070.01016.63
7.4.210.0090.00816.43
7.4.200.0030.00316.23
7.4.160.0110.00616.42
7.4.150.0110.00717.40
7.4.140.0110.00717.86
7.4.130.0130.00716.59
7.4.120.0110.00716.38
7.4.110.0030.01216.28
7.4.100.0120.00616.57
7.4.90.0110.00616.59
7.4.80.0110.00619.39
7.4.70.0140.00316.33
7.4.60.0150.00616.64
7.4.50.0070.00716.32
7.4.40.0070.01116.38
7.4.30.0100.00616.38
7.4.00.0050.00814.97
7.3.330.0030.00312.94
7.3.320.0030.00312.99
7.3.310.0030.00316.07
7.3.300.0000.00616.15
7.3.290.0000.00716.03
7.3.280.0090.00816.11
7.3.270.0110.00617.40
7.3.260.0180.00516.40
7.3.250.0110.00616.26
7.3.240.0090.00716.18
7.3.230.0140.00416.17
7.3.210.0090.00616.42
7.3.200.0060.01516.25
7.3.190.0090.01216.40
7.3.180.0070.01016.40
7.3.170.0130.00916.26
7.3.160.0080.01316.53
7.3.120.0050.00914.74
7.3.110.0040.01314.77
7.3.100.0030.01014.73
7.3.90.0050.00714.68
7.3.80.0050.01114.87
7.3.70.0040.00814.67
7.3.60.0100.00214.68
7.3.50.0030.00914.70
7.3.40.0080.00614.81
7.3.30.0010.01014.84
7.3.20.0100.00516.44
7.3.10.0050.01016.48
7.3.00.0110.00316.48
7.2.330.0140.00516.45
7.2.320.0140.00416.29
7.2.310.0070.01016.55
7.2.300.0160.00016.68
7.2.290.0170.00016.55
7.2.250.0060.01315.02
7.2.240.0080.00714.92
7.2.230.0020.01414.98
7.2.220.0000.01214.74
7.2.210.0040.01215.07
7.2.200.0040.00914.99
7.2.190.0090.00514.90
7.2.180.0060.00814.80
7.2.170.0050.01114.98
7.2.160.0070.01114.95
7.2.150.0110.00716.58
7.2.140.0000.01516.52
7.2.130.0030.01316.64
7.2.120.0040.01116.92
7.2.110.0070.00716.83
7.2.100.0070.00716.83
7.2.90.0060.00916.86
7.2.80.0050.00816.79
7.2.70.0080.00816.89
7.2.60.0020.01416.88
7.2.50.0030.01316.88
7.2.40.0080.00816.72
7.2.30.0090.00416.90
7.2.20.0070.00716.71
7.2.10.0040.01316.82
7.2.00.0090.00516.68
7.1.330.0000.01415.87
7.1.320.0070.00615.72
7.1.310.0080.00715.77
7.1.300.0030.00815.63
7.1.290.0010.00815.58
7.1.280.0050.00915.77
7.1.270.0040.00815.81
7.1.260.0050.00715.83
7.1.250.0000.01015.73
7.1.210.0070.00715.57
7.1.200.0080.00315.80
7.1.190.0030.01015.83
7.1.180.0000.01415.56
7.1.170.0070.00415.88
7.1.160.0060.01015.80
7.1.150.0070.00315.71
7.1.140.0080.00515.64
7.1.130.0060.00915.59
7.1.120.0040.01115.41
7.1.110.0080.00315.54
7.1.100.0120.00315.86
7.1.90.0060.00915.85
7.1.80.0060.00615.59
7.1.70.0050.01115.77
7.1.60.0180.01433.80
7.1.50.1630.00331.93
7.1.40.0290.00033.32
7.1.30.0100.02033.66
7.1.20.0280.01133.51
7.1.10.0070.00315.55
7.1.00.0090.00415.62
7.0.310.0060.00915.12
7.0.300.0000.01115.09
7.0.290.0030.00715.26
7.0.280.0030.00715.20
7.0.270.0090.00615.41
7.0.260.0100.00315.35
7.0.250.0070.00415.46
7.0.240.0100.00015.50
7.0.230.0070.00415.19
7.0.220.0100.00015.42
7.0.210.0080.00515.15
7.0.200.0070.00715.29
7.0.190.1590.01015.21
7.0.180.0060.01115.42
7.0.170.0080.00615.42
7.0.160.0080.00415.38
7.0.150.0070.00315.35
7.0.140.0000.01015.48
7.0.130.0100.00015.22
7.0.120.0080.00315.30
7.0.110.1230.00613.51
7.0.100.1370.01313.59
7.0.90.0040.01313.39
7.0.80.0130.00415.41
7.0.70.0070.00715.26
7.0.60.0120.01213.23
7.0.50.0100.00815.52
7.0.40.0100.00315.14
7.0.30.0070.00615.50
7.0.20.0040.00915.39
7.0.10.0080.00415.34
7.0.00.0090.00415.41

preferences:
37.89 ms | 401 KiB | 5 Q