1--TEST--
2$GLOBALS must be passed by reference (runtime error)
3--FILE--
4<?php
5
6function by_ref(&$ref) {}
7try {
8    by_ref($GLOBALS);
9} catch (Error $e) {
10    echo $e->getMessage(), "\n";
11}
12
13try {
14    by_ref2($GLOBALS);
15} catch (Error $e) {
16    echo $e->getMessage(), "\n";
17}
18function by_ref2(&$ref) {}
19
20?>
21--EXPECT--
22by_ref(): Argument #1 ($ref) could not be passed by reference
23by_ref2(): Argument #1 ($ref) could not be passed by reference
24