bug60833.phpt 625 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. --TEST--
  2. Bug #60833 (self, parent, static behave inconsistently case-sensitive)
  3. --FILE--
  4. <?php
  5. class A {
  6. static $x = "A";
  7. function testit() {
  8. $this->v1 = new sELF;
  9. $this->v2 = new SELF;
  10. }
  11. }
  12. class B extends A {
  13. static $x = "B";
  14. function testit() {
  15. PARENT::testit();
  16. $this->v3 = new sELF;
  17. $this->v4 = new PARENT;
  18. $this->v4 = STATIC::$x;
  19. }
  20. }
  21. $t = new B();
  22. $t->testit();
  23. var_dump($t);
  24. ?>
  25. --EXPECTF--
  26. object(B)#%d (4) {
  27. ["v1"]=>
  28. object(A)#%d (0) {
  29. }
  30. ["v2"]=>
  31. object(A)#%d (0) {
  32. }
  33. ["v3"]=>
  34. object(B)#%d (0) {
  35. }
  36. ["v4"]=>
  37. string(1) "B"
  38. }