magic_by_ref_007.phpt 300 B

12345678910111213141516171819
  1. --TEST--
  2. passing second parameter of __call() by ref
  3. --FILE--
  4. <?php
  5. class test {
  6. function __call($name, &$args) { }
  7. }
  8. $t = new test;
  9. $func = "foo";
  10. $arg = 1;
  11. $t->$func($arg);
  12. echo "Done\n";
  13. ?>
  14. --EXPECTF--
  15. Fatal error: Method test::__call() cannot take arguments by reference in %s on line %d