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-- 19 20Notice: Only variables should be passed by reference in %s on line %d 21object(stdClass)#1 (0) { 22} 23 24Notice: Only variables should be passed by reference in %s on line %d 25int(2) 26int(1) 27 28