#36075 [NEW]: php4.4.1 constructors are called twice
| From: | koukine at gmail dot com | Date: | Thu, 19 Jan 2006 00:35:30 +0000 |
| Subject: | #36075 [NEW]: php4.4.1 constructors are called twice | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-92161@lists.php.net to get a copy of this message | ||
From: koukine at gmail dot com
Operating system: Windows XP Pro SP2
PHP version: 4.4.2
PHP Bug Type: Class/Object related
Bug description: php4.4.1 constructors are called twice
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 bug report at http://bugs.php.net/?id=36075&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36075&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36075&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36075&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=36075&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=36075&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=36075&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=36075&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=36075&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=36075&r=support
Expected behavior: http://bugs.php.net/fix.php?id=36075&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=36075&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=36075&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=36075&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36075&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=36075&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=36075&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=36075&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=36075&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=36075&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=36075&r=mysqlcfg