php-src/Zend/tests/bug66286.phpt
Nikita Popov 7e8e21df0c Fix bug #66286: Incorrect object comparison with inheritance
std_compare_objects immidiately returned 0 if the property tables
of both objects contain NULL at some index. Thus it would report
objects as equal even though properties following after that
differ.
2014-01-04 01:22:14 +01:00

27 lines
499 B
PHP

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