Skip to content

Instantly share code, notes, and snippets.

@iluuu1994
Created July 12, 2020 10:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iluuu1994/7596fa93e08b62dad1989f762715b1ba to your computer and use it in GitHub Desktop.
Save iluuu1994/7596fa93e08b62dad1989f762715b1ba to your computer and use it in GitHub Desktop.
<?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