|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-04-26 07:43 UTC] mfischer@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 16 02:00:02 2025 UTC |
When including an initialization function within both A and B classes, creating an instance of he extending B class resets the variable value created by initialization function withing the A class class A { var $var_a; function A() { $this->var_a = "a"; } } class B extends A { var $var_b; function B() { $this->var_b = "b"; } } $test = new B; echo $test->var_a; //no output unless I comment out function B() in class B echo $test->var_b;