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

# · PHP · 23 lines · 17 code · 6 blank · 0 comment · 0 complexity · d31119ead7da89c0e8ab11cd6131a92b MD5 · raw file

  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. ?>