bug66286.phpt 464 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Bug #66286: Incorrect object comparison with inheritance
  3. --FILE--
  4. <?php
  5. abstract class first {
  6. protected $someArray = array();
  7. }
  8. class second extends first {
  9. protected $someArray = array();
  10. protected $someValue = null;
  11. public function __construct($someValue) {
  12. $this->someValue = $someValue;
  13. }
  14. }
  15. $objFirst = new second('123');
  16. $objSecond = new second('321');
  17. var_dump ($objFirst == $objSecond);
  18. ?>
  19. --EXPECT--
  20. bool(false)