3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_SESSION['var'] = 1; function func1() { global $ref; global $nonRef; $ref = &$_SESSION['var']; $nonRef = $_SESSION['var']; } func1(); var_dump($_SESSION['var']); var_dump($ref); var_dump($nonRef);

preferences:
65.98 ms | 407 KiB | 5 Q