File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / Zend / tests / bug66286.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Sun Jun 15 20:04:04 2014 UTC (10 years, 10 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29, HEAD
php 5.4.29

    1: --TEST--
    2: Bug #66286: Incorrect object comparison with inheritance
    3: --FILE--
    4: <?php
    5: 
    6: abstract class first {
    7:     protected $someArray = array();
    8: }     
    9: 
   10: class 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: 
   22: var_dump ($objFirst == $objSecond);    
   23: 
   24: ?>
   25: --EXPECT--
   26: bool(false)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>