php-src/Zend/tests/bug66286.phpt

27 lines
464 B
Plaintext
Raw Normal View History

--TEST--
Bug #66286: Incorrect object comparison with inheritance
--FILE--
<?php
abstract class first {
protected $someArray = array();
2018-09-16 17:16:42 +00:00
}
2018-09-16 17:16:42 +00:00
class second extends first {
protected $someArray = array();
protected $someValue = null;
public function __construct($someValue) {
$this->someValue = $someValue;
}
}
2018-09-16 17:16:42 +00:00
$objFirst = new second('123');
$objSecond = new second('321');
2018-09-16 17:16:42 +00:00
var_dump ($objFirst == $objSecond);
?>
--EXPECT--
bool(false)