class_properties_const.phpt 521 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Const class properties(runtime cache)
  3. --FILE--
  4. <?php
  5. class A {
  6. }
  7. $a = new A;
  8. echo "runtime\n";
  9. var_dump($a->{array()});
  10. var_dump($a->{1});
  11. var_dump($a->{function(){}});
  12. ?>
  13. --EXPECTF--
  14. Warning: Array to string conversion in %s on line %d
  15. runtime
  16. Warning: Undefined property: A::$Array in %s on line %d
  17. NULL
  18. Warning: Undefined property: A::$1 in %s on line %d
  19. NULL
  20. Fatal error: Uncaught Error: Object of class Closure could not be converted to string in %s:%d
  21. Stack trace:
  22. #0 {main}
  23. thrown in %s on line %d