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