<?php declare(strict_types=1); function foo(int $x, int $y = 2, ?int &$z = null) { var_dump(func_num_args()); $z = $x ** 2; return $x * $y; } var_dump([foo(5, z: $a), $a]); var_dump([foo(3, -1)]);
You have javascript disabled. You will not be able to edit any code.