Created
July 12, 2020 10:14
-
-
Save iluuu1994/7596fa93e08b62dad1989f762715b1ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function takes_ref(&$ref) {} | |
$foo = null; | |
takes_ref($foo?->bar); | |
// Can either: | |
// 1. Throw no error, pass null | |
// 2. Throw a "Cannot parameter 1 by reference" error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment