PageRenderTime 41ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/2.1/Testing/Tests/Compiler/func_get_args.php

#
PHP | 23 lines | 17 code | 6 blank | 0 comment | 0 complexity | d31119ead7da89c0e8ab11cd6131a92b 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. <?php
  4. class foo
  5. {
  6. function bar()
  7. {
  8. $args = func_get_args();
  9. foreach($args as $arg)
  10. {
  11. echo $arg;
  12. }
  13. }
  14. }
  15. $x = new foo();
  16. $x->bar('ahoj',13);
  17. ?>