mirror of
https://github.com/php/php-src.git
synced 2026-03-30 12:13:02 +02:00
Merge branch 'PHP-5.5' into PHP-5.6
This commit is contained in:
26
Zend/tests/bug66286.phpt
Normal file
26
Zend/tests/bug66286.phpt
Normal file
@@ -0,0 +1,26 @@
|
||||
--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)
|
||||
@@ -1373,10 +1373,6 @@ static int zend_std_compare_objects(zval *o1, zval *o2 TSRMLS_DC) /* {{{ */
|
||||
Z_OBJ_UNPROTECT_RECURSION(o1);
|
||||
Z_OBJ_UNPROTECT_RECURSION(o2);
|
||||
return 1;
|
||||
} else {
|
||||
Z_OBJ_UNPROTECT_RECURSION(o1);
|
||||
Z_OBJ_UNPROTECT_RECURSION(o2);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user