call_user_func_007.phpt 416 B

1234567891011121314151617181920
  1. --TEST--
  2. call_user_func() should not use FUNC_ARG fetches
  3. --FILE--
  4. <?php
  5. function foo(&$ref) { $ref = 24; }
  6. $a = [];
  7. call_user_func('foo', $a[0][0]);
  8. var_dump($a);
  9. ?>
  10. --EXPECTF--
  11. Warning: Undefined array key 0 in %s on line %d
  12. Warning: Trying to access array offset on value of type null in %s on line %d
  13. Warning: foo(): Argument #1 ($ref) must be passed by reference, value given in %s on line %d
  14. array(0) {
  15. }