You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
343 B

  1. --TEST--
  2. Basic class support - attempting to pass a class constant by reference.
  3. --FILE--
  4. <?php
  5. class aclass
  6. {
  7. const myConst = "hello";
  8. }
  9. function f(&$a)
  10. {
  11. $a = "changed";
  12. }
  13. f(aclass::myConst);
  14. var_dump(aclass::myConst);
  15. ?>
  16. --EXPECTF--
  17. Fatal error: Only variables can be passed by reference in %s on line 12