objects_030.phpt 375 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Trying to access undeclared parent property
  3. --FILE--
  4. <?php
  5. class bar {
  6. public function __set($a, $b) {
  7. print "hello\n";
  8. }
  9. }
  10. class foo extends bar {
  11. public function __construct() {
  12. parent::$f = 1;
  13. }
  14. public function __set($a, $b) {
  15. print "foo\n";
  16. }
  17. }
  18. new foo;
  19. ?>
  20. --EXPECTF--
  21. Fatal error: Access to undeclared static property: bar::$f in %s on line %d