mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
9975986b7e
Closes GH-5999
18 lines
283 B
PHP
18 lines
283 B
PHP
--TEST--
|
|
errmsg: only variables can be passed by reference
|
|
--FILE--
|
|
<?php
|
|
|
|
function foo (&$var) {
|
|
}
|
|
|
|
foo(1);
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Error: foo(): Argument #1 ($var) cannot be passed by reference in %s:%d
|
|
Stack trace:
|
|
#0 {main}
|
|
thrown in %s on line %d
|