3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_url = 'current.sub.meh.com'; $stage_url = 'foo.stage.it'; $current_domains = explode( '.', $current_url ); $current_sub_domain = array_slice( $current_domains, 0, count( $current_domains ) - 2 ); $stage_top_domain = array_slice( explode( '.', $stage_url ), - 2, 2 ); $stage_url = implode( '.', array_merge( $current_sub_domain, $stage_top_domain ) ); echo $stage_url;

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.0000.01416.63
8.3.50.0110.00716.34
8.3.40.0070.00718.84
8.3.30.0110.00418.48
8.3.20.0040.00422.14
8.3.10.0040.00421.82
8.3.00.0040.00419.67
8.2.180.0040.01118.36
8.2.170.0100.01022.96
8.2.160.0000.01419.08
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00719.32
8.2.120.0050.00326.35
8.2.110.0030.00721.05
8.2.100.0040.00717.75
8.2.90.0000.00819.22
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0050.00317.93
8.2.50.0060.00318.10
8.2.40.0040.00420.54
8.2.30.0000.00719.26
8.2.20.0070.00017.93
8.2.10.0070.00018.18
8.2.00.0040.00418.12
8.1.280.0110.00425.92
8.1.270.0040.00423.96
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00023.92
8.1.230.0070.00321.04
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0080.00017.36
8.1.180.0040.00418.10
8.1.170.0040.00418.64
8.1.160.0030.00519.13
8.1.150.0060.00318.80
8.1.140.0040.00419.59
8.1.130.0000.00718.88
8.1.120.0060.00317.36
8.1.110.0000.00717.42
8.1.100.0000.00717.38
8.1.90.0000.00817.36
8.1.80.0070.00017.47
8.1.70.0040.00417.41
8.1.60.0030.00717.46
8.1.50.0000.00817.54
8.1.40.0040.00417.45
8.1.30.0090.00017.59
8.1.20.0030.00917.61
8.1.10.0000.00717.50
8.1.00.0070.00017.30
8.0.300.0030.00618.77
8.0.290.0000.00716.75
8.0.280.0070.00018.43
8.0.270.0030.00317.29
8.0.260.0030.00316.88
8.0.250.0000.00716.88
8.0.240.0090.00016.96
8.0.230.0080.00016.75
8.0.220.0040.00416.82
8.0.210.0040.00416.83
8.0.200.0040.00416.88
8.0.190.0020.00516.80
8.0.180.0070.00016.75
8.0.170.0080.00016.86
8.0.160.0080.00016.93
8.0.150.0030.00316.93
8.0.140.0030.00516.92
8.0.130.0000.00713.23
8.0.120.0030.00616.82
8.0.110.0070.00016.92
8.0.100.0000.00817.00
8.0.90.0040.00416.90
8.0.80.0030.01816.77
8.0.70.0040.00416.92
8.0.60.0020.00516.86
8.0.50.0040.00416.89
8.0.30.0140.00717.26
8.0.20.0110.00917.40
8.0.10.0030.00616.79
8.0.00.0090.00916.70
7.4.330.0030.00315.55
7.4.320.0020.00516.50
7.4.300.0000.00816.60
7.4.290.0030.00316.63
7.4.280.0000.00716.40
7.4.270.0070.00016.47
7.4.260.0030.00716.45
7.4.250.0040.00416.49
7.4.240.0040.00416.59
7.4.230.0000.00716.39
7.4.220.0030.01416.45
7.4.210.0060.00916.54
7.4.200.0030.00316.43
7.4.160.0140.00716.53
7.4.150.0100.00717.40
7.4.140.0120.00817.86
7.4.130.0070.01016.55
7.4.120.0140.00816.50
7.4.110.0030.01916.53
7.4.100.0100.00916.45
7.4.90.0100.00716.54
7.4.80.0130.00319.39
7.4.70.0060.01116.46
7.4.60.0200.00316.52
7.4.50.0060.00916.50
7.4.40.0070.01016.38
7.4.30.0080.01116.58
7.4.00.0080.00814.91
7.3.330.0060.00013.15
7.3.320.0030.00313.15
7.3.310.0050.00216.27
7.3.300.0030.00316.29
7.3.290.0070.00816.24
7.3.280.0080.00816.28
7.3.270.0070.01017.40
7.3.260.0060.01316.46
7.3.250.0090.00916.42
7.3.240.0110.00816.37
7.3.230.0030.01316.56
7.3.210.0140.00316.21
7.3.200.0080.00916.40
7.3.190.0090.00616.25
7.3.180.0110.00416.41
7.3.170.0030.01216.41
7.3.160.0060.00916.56
7.3.120.0100.00814.80
7.3.110.0120.00514.58
7.3.100.0040.00914.88
7.3.90.0010.00714.62
7.3.80.0060.00514.78
7.3.70.0080.00514.82
7.3.60.0070.00414.81
7.3.50.0050.01014.75
7.3.40.0080.00514.54
7.3.30.0100.00214.86
7.3.20.0020.01116.46
7.3.10.0060.00716.65
7.3.00.0060.00916.54
7.2.330.0140.00516.41
7.2.320.0100.00716.66
7.2.310.0060.01516.64
7.2.300.0110.00816.34
7.2.290.0170.00716.64
7.2.250.0050.01415.10
7.2.240.0070.01214.92
7.2.230.0070.00815.06
7.2.220.0060.00614.97
7.2.210.0050.01014.98
7.2.200.0070.00814.90
7.2.190.0040.01415.01
7.2.180.0060.00814.95
7.2.170.0100.00415.00
7.2.90.0390.01314.66
7.2.80.0370.01114.89
7.2.70.0650.00615.17
7.2.60.0520.00615.15
7.2.50.0560.00914.82
7.2.40.0430.01115.11
7.2.30.0600.00615.21
7.2.20.0430.00715.16
7.2.10.0760.01115.07
7.2.00.0130.00715.26
7.1.330.0060.01015.80
7.1.320.0030.01015.62
7.1.310.0030.01015.81
7.1.300.0090.00315.51
7.1.290.0080.00615.61
7.1.280.0050.00715.75
7.1.270.0050.00715.65
7.1.260.0060.00815.66
7.1.210.0300.00913.86
7.1.200.0450.01013.88
7.1.190.0460.01114.17
7.1.180.0450.01013.74
7.1.170.1480.01313.92
7.1.160.0480.01013.94
7.1.150.0500.00713.66
7.1.140.0360.01313.82
7.1.130.0700.01013.83
7.1.120.0130.00713.98
7.1.110.0130.00413.89
7.1.100.0590.00914.12
7.1.90.0090.01213.82
7.1.80.0120.01213.84
7.1.70.0260.00313.88
7.1.60.0650.01031.86
7.1.50.0770.01031.82
7.1.40.0840.01331.92
7.1.30.1030.01031.77
7.1.20.0770.01231.96
7.1.10.0170.00013.93
7.1.00.0650.01013.95
7.0.310.0420.00613.34
7.0.300.0740.01313.58
7.0.290.0820.00413.42
7.0.280.0480.01013.68
7.0.270.0580.01313.61
7.0.260.0250.00613.48
7.0.250.0110.00713.61
7.0.240.0490.00013.50
7.0.230.0180.00313.44
7.0.220.0120.00613.59
7.0.210.0450.00913.66
7.0.200.0530.00313.57
7.0.190.0090.01213.38
7.0.180.0900.00613.64
7.0.170.0910.01213.00
7.0.160.0620.00613.44
7.0.150.0500.00313.32
7.0.140.0640.00313.33
7.0.130.0460.00713.43
7.0.120.0530.00713.46
7.0.110.0470.01013.67
7.0.100.0510.00313.58
7.0.90.0150.00013.65
7.0.80.0530.00313.46
7.0.70.0480.00713.58
7.0.60.0550.00313.58
7.0.50.1650.00713.54
7.0.40.0870.00613.52
7.0.30.0690.01013.47
7.0.20.0630.01013.75
7.0.10.0610.01013.53
7.0.00.0510.01013.48

preferences:
41.27 ms | 400 KiB | 5 Q