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