|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-05-07 03:18 UTC] guth at fiifo dot u-psud dot fr
[2005-05-07 18:30 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 01:00:01 2025 UTC |
Description: ------------ hello, Classes A/B and C/D are identical, i just changed a default value from an 'int' to an 'array'. See at the expected and actual results to understand the problem. Reproduce code: --------------- <?php class A { protected static $plop = 42; } class B extends A { public function __construct() { self::$plop = 43; var_dump(self::$plop); } } new B; class C { protected static $plop = array('42'); public function __construct() { self::$plop = array('12'); } } class D extends C { public function __construct() { parent::__construct(); var_dump(self::$plop); } } new D; ?> Expected result: ---------------- int(43) array(1) { [0]=> string(2) "43" } Actual result: -------------- int(43) array(1) { [0]=> string(2) "42" }