magic_by_ref_004.phpt 284 B

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