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