ID: 36075
User updated by: koukine at gmail dot com
Reported By: koukine at gmail dot com
Status: Bogus
Bug Type: Class/Object related
Operating System: Windows XP Pro SP2
PHP Version: 4.4.2
New Comment:
Yes, I did but unfortunatly I did not isolate as much as the one I
posted. It is the other code of our application which was actually
going through the all objects and instantiating them.
Extreamly sorry and THANKS A LOT. It was helpful.
Previous Comments:
------------------------------------------------------------------------
[2006-01-19 01:45:19] [EMAIL PROTECTED]
PHP doesn't call parent constructors at all (and this is expected).
Did you actually run this code?
It produces only "BBB; ".
------------------------------------------------------------------------
[2006-01-19 01:35:29] koukine at gmail dot com
Description:
------------
1. Parent constructor should be called first
2. This class consutructor shold be called once
Reproduce code:
---------------
<?
class A{
function A(){
print("AAA; ");
}
}
class B extends A{
function B(){
print("BBB; ");
}
}
$b = &new B();
?>
Expected result:
----------------
AAA;BBB
Actual result:
--------------
BBB; AAA; BBB;
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36075&edit=1