3v4l.org

run code in 300+ PHP versions simultaneously
<?php static function get_CurrentDomain() { $host = $_SERVER['HTTP_HOST']; $level_size = 2; // splits on . // reverses // slices array from 0 to level size // reverses // joins with . return join('.', array_reverse(array_slice(array_reverse(explode('.', $host)), 0, $level_size))); }

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)
7.2.20.0170.01017.86
7.2.10.0160.01017.79
7.2.00.0210.00717.79
7.1.140.0090.01616.74
7.1.130.0140.01116.43
7.1.120.0230.00316.57
7.1.110.0290.01115.97
7.1.100.0150.01216.18
7.1.90.0250.00015.64
7.1.80.0900.01016.03
7.1.70.0120.01215.03
7.1.60.0260.01332.88
7.1.50.0350.00732.64
7.1.40.0310.01032.34
7.1.30.0290.01032.39
7.1.20.0290.01032.38
7.1.10.0220.00614.64
7.1.00.0160.01014.79

preferences:
153.65 ms | 1160 KiB | 7 Q