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, null); 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.0080.01116.85
8.5.70.0050.00418.60
8.5.60.0060.00216.79
8.4.220.0060.00421.38
8.4.210.0050.00621.41
8.4.90.0060.00317.76
8.3.310.0060.00418.24
8.3.180.0030.00618.53
8.3.90.0090.00716.58
8.3.50.0040.00518.55
8.2.310.0030.00618.04

preferences:
51.21 ms | 528 KiB | 5 Q