magic_by_ref_006.phpt 285 B

123456789101112131415161718
  1. --TEST--
  2. passing first 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. $t->$func();
  11. echo "Done\n";
  12. ?>
  13. --EXPECTF--
  14. Fatal error: Method test::__call() cannot take arguments by reference in %s on line %d