|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-06-27 08:52 UTC] apann at personal dot ro
[2005-06-27 09:33 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 21:00:01 2025 UTC |
Description: ------------ See "reproduce code" section. The same thing happens with php version 5.0.3, 5.0.4 and 5.1.0-from_cvs. Os: Mandriva Linux/Ubuntu/Win XP/Win 2000. Reproduce code: --------------- <?php class Base { public function __construct() { echo __METHOD__ . "\n"; } public static function run() { return new self; } } class Ext_One extends Base { public function __construct() { parent::__construct(); echo __METHOD__ . "\n"; } } class Ext_Two extends Base { public function __construct() { parent::__construct(); echo __METHOD__ . "\n"; } } $o1 = Ext_One::run(); $o2 = Ext_Two::run(); Expected result: ---------------- Ext_One::__construct Base::__construct Ext_Two::__construct Base::__construct Actual result: -------------- Base::__construct Base::__construct