xref: /PHP-8.2/Zend/tests/errmsg_022.phpt (revision 9975986b)
1--TEST--
2errmsg: only variables can be passed by reference
3--FILE--
4<?php
5
6function foo (&$var) {
7}
8
9foo(1);
10
11echo "Done\n";
12?>
13--EXPECTF--
14Fatal error: Uncaught Error: foo(): Argument #1 ($var) cannot be passed by reference in %s:%d
15Stack trace:
16#0 {main}
17  thrown in %s on line %d
18