3v4l.org

run code in 500+ PHP versions simultaneously
<?php final class SkipVariadic { private $b = 1; public function set($a, $b = null) { if (func_num_args() > 1) { $this->b = $b; } } public function get() { $this->set(1); return $this->b; } } $x = new SkipVariadic(); var_dump($x->get());

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.5.80.0120.00516.68
8.5.70.0010.00718.36
8.5.60.0060.00416.79
8.4.220.0070.00221.29
8.4.210.0070.00421.20
8.4.90.0020.00819.39
8.3.310.0020.00818.28
8.3.180.0050.00318.33
8.3.90.0130.01016.43
8.3.50.0050.00418.45
8.2.310.0040.00517.93

preferences:
44.03 ms | 528 KiB | 5 Q