3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current_url_host = 'sub.miao.example.com'; $main_url_host = 'example.com'; $current_url_host_rev = strrev( $current_url_host ); $main_url_host_rev = strrev( $main_url_host ); $current_url_sub_domains_rev = ''; if ( strpos( $current_url_host_rev, $main_url_host_rev ) === 0 ) { $current_url_sub_domains_rev = trim( substr( $current_url_host_rev, strlen($main_url_host_rev) ), '.'); } echo strrev($current_url_sub_domains_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.01116.38
8.3.50.0040.01116.39
8.3.40.0040.01618.57
8.3.30.0060.00918.72
8.3.20.0000.00821.95
8.3.10.0050.00323.48
8.3.00.0080.00019.68
8.2.180.0070.01018.54
8.2.170.0100.00722.96
8.2.160.0090.00919.07
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00719.27
8.2.120.0040.00426.35
8.2.110.0060.00320.57
8.2.100.0070.00417.78
8.2.90.0050.00319.04
8.2.80.0030.00618.04
8.2.70.0050.00317.63
8.2.60.0040.00418.04
8.2.50.0040.00418.10
8.2.40.0070.00020.55
8.2.30.0000.00719.14
8.2.20.0000.00717.92
8.2.10.0070.00018.05
8.2.00.0000.00718.02
8.1.280.0090.01225.92
8.1.270.0020.00523.84
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0070.00322.66
8.1.230.0090.00318.99
8.1.220.0030.00617.91
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0030.00517.23
8.1.180.0040.00418.10
8.1.170.0000.00818.46
8.1.160.0000.00719.00
8.1.150.0050.00218.74
8.1.140.0000.00819.61
8.1.130.0000.00718.83
8.1.120.0000.00717.30
8.1.110.0040.00417.39
8.1.100.0040.00417.30
8.1.90.0000.00717.35
8.1.80.0040.00417.38
8.1.70.0070.00017.37
8.1.60.0050.00317.49
8.1.50.0000.00917.33
8.1.40.0040.00417.30
8.1.30.0080.00017.48
8.1.20.0070.00317.61
8.1.10.0060.00317.37
8.1.00.0000.01017.32
8.0.300.0050.00318.77
8.0.290.0080.00016.60
8.0.280.0050.00218.48
8.0.270.0030.00317.29
8.0.260.0000.00616.82
8.0.250.0000.00616.89
8.0.240.0040.00416.96
8.0.230.0000.00716.94
8.0.220.0030.00316.82
8.0.210.0030.00316.72
8.0.200.0000.00816.90
8.0.190.0060.00316.77
8.0.180.0030.00416.78
8.0.170.0000.00816.86
8.0.160.0040.00416.78
8.0.150.0040.00416.78
8.0.140.0050.00216.75
8.0.130.0000.00613.25
8.0.120.0000.00816.78
8.0.110.0040.00416.61
8.0.100.0050.00216.64
8.0.90.0000.00816.77
8.0.80.0030.01316.83
8.0.70.0070.00016.71
8.0.60.0040.00416.64
8.0.50.0000.00716.77
8.0.30.0090.00917.08
8.0.20.0100.00917.40
8.0.10.0000.00716.82
8.0.00.0060.01016.69
7.4.330.0050.00015.55
7.4.320.0030.00316.57
7.4.300.0060.00016.50
7.4.290.0070.00016.49
7.4.280.0000.00916.43
7.4.270.0000.00716.68
7.4.260.0000.00716.48
7.4.250.0000.00716.44
7.4.240.0040.00416.60
7.4.230.0030.00316.33
7.4.220.0280.00816.53
7.4.210.0100.00516.53
7.4.200.0030.00316.59
7.4.160.0030.01216.41
7.4.150.0110.00617.40
7.4.140.0130.00617.86
7.4.130.0100.01416.56
7.4.120.0150.00716.41
7.4.110.0120.00616.31
7.4.100.0100.00716.41
7.4.90.0060.01016.47
7.4.80.0090.00919.39
7.4.70.0090.01216.50
7.4.60.0180.00016.42
7.4.50.0070.00716.30
7.4.40.0230.03416.34
7.4.30.0130.01416.36
7.4.00.0070.00714.82
7.3.330.0030.00313.10
7.3.320.0020.00313.19
7.3.310.0030.00316.35
7.3.300.0060.00016.27
7.3.290.0000.00716.28
7.3.280.0070.00816.24
7.3.270.0110.00617.40
7.3.260.0090.00816.37
7.3.250.0110.00616.36
7.3.240.0060.01416.25
7.3.230.0140.00316.22
7.3.210.0090.00916.48
7.3.200.0000.01916.35
7.3.190.0060.01016.38
7.3.180.0090.01216.38
7.3.170.0160.00616.38
7.3.160.0130.00316.41
7.2.330.0130.00316.45
7.2.320.0170.00516.57
7.2.310.0030.01416.52
7.2.300.0100.00716.32
7.2.290.0130.01216.34
7.2.90.0280.01014.31
7.2.80.0350.01114.71
7.2.70.0690.01014.87
7.2.60.0380.00914.88
7.2.50.0760.00715.09
7.2.40.0670.01315.02
7.2.30.0770.00314.76
7.2.20.0530.00614.85
7.2.10.0640.00914.92
7.2.00.0700.00314.77
7.1.210.0510.00413.84
7.1.200.0480.01613.76
7.1.190.0360.00713.98
7.1.180.0450.00413.88
7.1.170.0670.00713.55
7.1.160.0560.01613.64
7.1.150.0730.00613.70
7.1.140.0390.01013.78
7.1.130.0650.00713.79
7.1.120.0500.00313.89
7.1.110.0710.00414.00
7.1.100.0570.00013.87
7.1.90.0440.00613.83
7.1.80.0730.00313.86
7.1.70.0570.00014.05
7.1.60.0770.00631.78
7.1.50.0640.01031.43
7.1.40.0330.01331.76
7.1.30.0300.00931.67
7.1.20.0920.01032.07
7.1.10.0480.01113.83
7.1.00.0140.01113.79
7.0.310.0520.01313.46
7.0.300.0490.01313.41
7.0.290.0450.01213.39
7.0.280.0420.00813.21
7.0.270.0630.01513.50
7.0.260.0470.00713.30
7.0.250.0730.00713.46
7.0.240.0410.01313.47
7.0.230.0650.01413.66
7.0.220.0560.00613.58
7.0.210.0480.00813.61
7.0.200.0650.00613.58
7.0.190.0540.01013.52
7.0.180.0610.00013.42
7.0.170.0220.01113.40
7.0.160.0140.01113.64
7.0.150.0800.00613.25
7.0.140.0150.00213.42
7.0.130.0420.01113.57
7.0.120.0110.01113.46
7.0.110.0520.01113.53
7.0.100.0130.01313.55
7.0.90.0280.00713.70
7.0.80.0450.01113.41
7.0.70.0510.01013.66
7.0.60.0350.00713.77
7.0.50.0690.01313.79
7.0.40.0670.01213.58
7.0.30.0580.00413.52
7.0.20.0410.00613.50
7.0.10.0820.00313.73
7.0.00.0590.00713.25

preferences:
39.42 ms | 401 KiB | 5 Q