/2.0/Tests/Variables/func_get_args.php

# · PHP · 26 lines · 18 code · 3 blank · 5 comment · 0 complexity · 6bb88e9909f40d1af294aa0badf94f36 MD5 · raw file

  1. [expect php]
  2. [file]
  3. <?
  4. /*
  5. Checks whether references are correctly dereferenced when calling args-aware function by name.
  6. */
  7. function f($a)
  8. {
  9. $args = func_get_args();
  10. var_dump($args);
  11. $args[0] = 4;
  12. }
  13. function g()
  14. {
  15. $a = 1;
  16. $f = "f";
  17. $f($a);
  18. var_dump($a);
  19. }
  20. g();
  21. ?>