mirror of
https://github.com/php/php-src.git
synced 2024-12-13 03:44:17 +08:00
27 lines
464 B
PHP
27 lines
464 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)
|