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());
Output for 8.2.31 - 8.2.32, 8.3.5 - 8.3.32, 8.4.9 - 8.4.23, 8.5.6 - 8.5.8
NULL

preferences:
42.52 ms | 541 KiB | 4 Q