#22269 [Fbk->Opn]: Inherited Classes ignore initalization-value of inherites Variables

From: Date: Wed, 19 Feb 2003 07:16:43 +0000
Subject: #22269 [Fbk->Opn]: Inherited Classes ignore initalization-value of inherites Variables
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-33509@lists.php.net to get a copy of this message
ID: 22269 User updated by: White_Angel at gmx dot de Reported By: White_Angel at gmx dot de -Status: Feedback +Status: Open Bug Type: Class/Object related Operating System: Linux;RedHat8.0;2.4.18-24 PHP Version: 5CVS-2003-02-18 (dev) New Comment: Yes. it Seems. Previous Comments: ------------------------------------------------------------------------ [2003-02-18 22:49:41] sniper@php.net Is this PHP 5-dev related only? ------------------------------------------------------------------------ [2003-02-18 03:49:14] White_Angel at gmx dot de And Again: Inherited Classes ignore initalization-value of inherites Variables Clean CVS checkout. default configure & make .... The Following Test Fail. (Checked on 2 Systems. SMP & !SMP) --TEST-- Classes inheritance test --POST-- --GET-- --FILE-- <?php /* Inheritance test2. Inherited Vars */ class foo { var $a="Content A"; function display() { echo "This is class foo\n"; echo "a = ".$this->a."\n"; } }; class bar extends foo { function display() { /* alternative display function for class bar */ echo "This is class bar\n"; echo "a = ".$this->a."\n"; } }; $foo1 = new foo; $foo1->display(); $bar1 = new bar; $bar1->display(); --EXPECT-- This is class foo a = Content A This is class bar a = Content A --- Im getting This is class foo a = Content A This is class bar a = PS: If i make a mistake. This Info is welcome to me too. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22269&edit=1

« previous php.bugs (#33509) next »