PageRenderTime 56ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/2.0/Tests/Variables/func_get_args.php

#
PHP | 26 lines | 18 code | 3 blank | 5 comment | 0 complexity | 6bb88e9909f40d1af294aa0badf94f36 MD5 | raw file
Possible License(s): CPL-1.0, GPL-2.0, CC-BY-SA-3.0, MPL-2.0-no-copyleft-exception, Apache-2.0
  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. ?>