1--TEST-- 2Bug #80299: ReflectionFunction->invokeArgs confused in arguments 3--FILE-- 4<?php 5 6$bar = new DateTime(); 7$args = [1, &$bar]; 8 9$function = function (int &$foo, DateTimeInterface &$bar) {}; 10 11(new ReflectionFunction($function))->invokeArgs($args); 12 13?> 14--EXPECTF-- 15Warning: {closure}(): Argument #1 ($foo) must be passed by reference, value given in %s on line %d 16