xref: /PHP-7.4/Zend/tests/bug66286.phpt (revision 782352c5)
1--TEST--
2Bug #66286: Incorrect object comparison with inheritance
3--FILE--
4<?php
5
6abstract class first {
7    protected $someArray = array();
8}
9
10class second extends first {
11    protected $someArray = array();
12    protected $someValue = null;
13
14    public function __construct($someValue) {
15        $this->someValue = $someValue;
16    }
17}
18
19$objFirst = new second('123');
20$objSecond = new second('321');
21
22var_dump ($objFirst == $objSecond);
23
24?>
25--EXPECT--
26bool(false)
27