3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_url_host = 'sub.example.com'; $main_url_host = 'example.com'; $current_url_host_rev = strrev( $current_url_host ); $main_url_host_rev = strrev( $main_url_host ); if ( strpos( $current_url_host_rev, $main_url_host_rev ) === 0 ) { $current_url_host_rev = trim( substr( $current_url_host_rev, strlen( $main_url_host_rev ) ), '.' ); } $current_url_sub_domains = strrev( $main_url_host_rev ); echo $main_url_host_rev;

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.0110.00716.38
8.3.50.0120.00316.47
8.3.40.0040.01118.76
8.3.30.0090.00618.63
8.3.20.0050.00220.14
8.3.10.0060.00323.45
8.3.00.0030.00619.65
8.2.180.0190.00318.16
8.2.170.0070.00722.96
8.2.160.0130.00719.04
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0070.00019.16
8.2.120.0060.00326.35
8.2.110.0060.00320.52
8.2.100.0090.00317.62
8.2.90.0040.00419.10
8.2.80.0000.00818.04
8.2.70.0060.00317.63
8.2.60.0040.00417.80
8.2.50.0080.00018.10
8.2.40.0000.00720.61
8.2.30.0000.00719.20
8.2.20.0000.00818.16
8.2.10.0020.00518.10
8.2.00.0040.00418.16
8.1.280.0070.00725.92
8.1.270.0080.00023.97
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0070.00322.81
8.1.230.0070.00319.15
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0030.00517.13
8.1.180.0050.00318.10
8.1.170.0050.00318.47
8.1.160.0030.00319.09
8.1.150.0070.00018.83
8.1.140.0040.00419.49
8.1.130.0070.00018.72
8.1.120.0030.00317.41
8.1.110.0080.00017.27
8.1.100.0040.00417.27
8.1.90.0060.00317.41
8.1.80.0070.00317.24
8.1.70.0070.00017.40
8.1.60.0000.00917.57
8.1.50.0000.00817.46
8.1.40.0060.00317.31
8.1.30.0020.00517.56
8.1.20.0000.01017.57
8.1.10.0040.00417.48
8.1.00.0030.00617.41
8.0.300.0070.00018.77
8.0.290.0000.00716.75
8.0.280.0050.00318.37
8.0.270.0000.00717.17
8.0.260.0030.00318.39
8.0.250.0070.00016.99
8.0.240.0050.00316.91
8.0.230.0000.00716.85
8.0.220.0050.00216.78
8.0.210.0070.00016.80
8.0.200.0070.00016.76
8.0.190.0090.00016.83
8.0.180.0030.00416.90
8.0.170.0030.00516.89
8.0.160.0000.00716.87
8.0.150.0030.00616.78
8.0.140.0050.00316.68
8.0.130.0000.00513.16
8.0.120.0080.00016.79
8.0.110.0040.00416.86
8.0.100.0000.00816.63
8.0.90.0000.00816.71
8.0.80.0070.01016.80
8.0.70.0040.00416.69
8.0.60.0070.00016.88
8.0.50.0000.00716.72
8.0.30.0120.00716.92
8.0.20.0120.01717.40
8.0.10.0000.00716.80
8.0.00.0070.01016.74
7.4.330.0030.00315.55
7.4.320.0030.00316.59
7.4.300.0030.00316.56
7.4.290.0030.00316.45
7.4.280.0030.00616.58
7.4.270.0000.00616.41
7.4.260.0050.00316.48
7.4.250.0040.00416.45
7.4.240.0050.00516.46
7.4.230.0000.00716.40
7.4.220.0080.00816.55
7.4.210.0080.00816.65
7.4.200.0030.00316.52
7.4.160.0140.00516.48
7.4.150.0100.00617.40
7.4.140.0090.00817.86
7.4.130.0040.01416.39
7.4.120.0080.01016.45
7.4.110.0080.00816.37
7.4.100.0090.00916.52
7.4.90.0090.00816.43
7.4.80.0090.00919.39
7.4.70.0100.00716.53
7.4.60.0030.01316.45
7.4.50.0080.00416.53
7.4.40.0080.00816.55
7.4.30.0090.00916.46
7.4.00.0030.01315.07
7.3.330.0000.00613.15
7.3.320.0060.00013.33
7.3.310.0030.00316.36
7.3.300.0030.00316.20
7.3.290.0000.00716.28
7.3.280.0070.01016.33
7.3.270.0130.00317.40
7.3.260.0120.00616.40
7.3.250.0080.01316.28
7.3.240.0090.00716.35
7.3.230.0140.00816.47
7.3.210.0120.00316.51
7.3.200.0140.00816.30
7.3.190.0060.01016.38
7.3.180.0090.00616.29
7.3.170.0060.00916.30
7.3.160.0130.00316.54
7.2.330.0120.00616.57
7.2.320.0120.00916.46
7.2.310.0070.01016.64
7.2.300.0130.00316.71
7.2.290.0110.01116.39
7.2.90.0390.00614.75
7.2.80.0180.00914.57
7.2.70.0390.01315.12
7.2.60.0260.00414.69
7.2.50.0230.00314.75
7.2.40.0740.00015.09
7.2.30.0070.00714.87
7.2.20.0130.00714.81
7.2.10.0070.00714.85
7.2.00.0470.00315.09
7.1.210.0420.00613.71
7.1.200.0490.00313.87
7.1.190.0240.00613.81
7.1.180.0170.01313.57
7.1.170.0250.00013.88
7.1.160.0330.00713.69
7.1.150.0420.00613.70
7.1.140.0100.00313.93
7.1.130.0390.00613.97
7.1.120.0240.00813.76
7.1.110.0280.00614.09
7.1.100.0310.00313.77
7.1.90.0500.01214.00
7.1.80.0170.00013.75
7.1.70.0320.00613.87
7.1.60.0990.01631.88
7.1.50.0590.00731.88
7.1.40.0710.01131.69
7.1.30.0670.00831.84
7.1.20.0320.00331.89
7.1.10.0180.00713.63
7.1.00.0870.00313.84
7.0.310.0420.00713.17
7.0.300.0210.01413.43
7.0.290.0240.00713.32
7.0.280.0140.00013.50
7.0.270.0120.00513.41
7.0.260.0520.00313.70
7.0.250.0130.00513.54
7.0.240.0100.01313.75
7.0.230.0120.00913.51
7.0.220.0120.00913.59
7.0.210.0110.00913.57
7.0.200.0700.00013.71
7.0.190.0480.00013.44
7.0.180.0640.00713.64
7.0.170.0590.00313.30
7.0.160.0240.00713.52
7.0.150.0210.00513.58
7.0.140.0100.00313.27
7.0.130.0100.00313.55
7.0.120.0040.00813.63
7.0.110.0210.00813.29
7.0.100.0250.00513.40
7.0.90.0070.01013.45
7.0.80.0140.00413.59
7.0.70.0110.00613.53
7.0.60.0480.00613.72
7.0.50.0090.00613.49
7.0.40.0150.00013.47
7.0.30.0360.00913.40
7.0.20.0140.00413.29
7.0.10.0220.00013.59
7.0.00.0450.00413.52

preferences:
66.41 ms | 401 KiB | 5 Q