Skip to content

Instantly share code, notes, and snippets.

@iluuu1994
Created July 12, 2020 10:14
Show Gist options
  • 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