3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace std { function array_pop(array &$array): mixed { foreach ($array as $key => $value) {} unset($array[$key]); return $value; } } namespace { $preflight = microtime(true); $foo = ['bar', 123, 'baz', true]; $start = microtime(true); var_dump(array_pop($foo), $foo); $end = microtime(true); printf("%0.6fs\n", $end - $start); $foo = ['bar', 123, 'baz', true]; $start = microtime(true); var_dump(std\array_pop($foo), $foo); $end = microtime(true); printf("%0.6fs\n", $end - $start); }

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.1.100.0030.00717.26
8.1.90.0120.00417.42
8.1.80.0100.00517.37
8.1.70.0120.00417.38
8.1.60.0150.00417.48
8.1.50.0090.00917.49
8.1.40.0120.00617.46
8.1.30.0130.00617.57
8.1.20.0190.00017.65
8.1.10.0150.00217.56
8.1.00.0060.00617.44
8.0.230.0110.00616.92
8.0.220.0140.00316.84
8.0.210.0150.00216.89
8.0.200.0130.00316.91
8.0.190.0100.00516.96
8.0.180.0100.00516.92
8.0.170.0140.00016.95
8.0.160.0080.00716.95
8.0.150.0060.01016.87
8.0.140.0070.00716.75
8.0.130.0090.00716.80
8.0.120.0120.00416.83
8.0.110.0070.00716.84
8.0.100.0090.00516.91
8.0.90.0140.00316.83
8.0.80.0110.00416.90
8.0.70.0110.00416.79
8.0.60.0090.00616.89
8.0.50.0100.00516.90
8.0.30.0090.00616.77
8.0.20.0000.00916.84
8.0.10.0130.00317.05
7.4.300.0130.00316.45
7.4.290.0040.00816.43
7.4.280.0090.00216.32
7.4.270.0090.00916.39
7.4.260.0150.00316.42
7.4.250.0000.01016.30
7.4.240.0110.00316.34
7.4.230.0100.00016.38
7.4.220.0070.00316.41
7.4.210.0040.00616.49
7.4.200.0030.00816.50
7.4.190.0060.00616.33
7.4.180.0080.00416.57
7.4.160.0090.00316.35
7.4.150.0070.00616.49
7.4.140.0110.00016.35
7.4.130.0100.00316.34
7.4.120.0080.00416.46
7.4.110.0070.00516.31
7.4.100.0070.00516.43
7.4.90.0130.00016.24
7.4.80.0130.00016.32
7.4.70.0130.00016.20
7.4.60.0090.00616.43
7.4.50.0120.00316.33
7.4.40.0090.00616.38
7.4.30.0090.00216.23
7.4.20.0080.00316.30
7.4.10.0100.00316.29
7.4.00.0120.00316.27

preferences:
20.06 ms | 401 KiB | 5 Q