blob: 9ce82268c16c0032a5bca2373ed18080362d5466 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--TEST--
Bug #72038 (Function calls with values to a by-ref parameter don't always throw a notice)
--FILE--
<?php
test($foo = new stdClass);
var_dump($foo);
test($bar = 2);
var_dump($bar);
test($baz = &$bar);
var_dump($baz);
function test(&$param) {
$param = 1;
}
?>
--EXPECTF--
Notice: Only variables should be passed by reference in %s on line %d
object(stdClass)#1 (0) {
}
Notice: Only variables should be passed by reference in %s on line %d
int(2)
int(1)
|