bug80299.phpt 368 B

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