From:             [EMAIL PROTECTED]
Operating system: Debian Linux
PHP version:      4.3.0RC2
PHP Bug Type:     Zend Engine 2 problem
Bug description:  __construct doesn't get called

<?php
echo phpversion().chr(10);

class BaseClass {
    function __construct() {
        print "In BaseClass constructor\n";
    }
}

class SubClass extends BaseClass {
    function __construct() {
        parent::__construct();
        print "In SubClass constructor\n";
    }
}

$obj = new BaseClass();
$obj = new SubClass();
?>

This example ( taken from:
http://www.php.net/source.php?url=/zend2_example.phps )

gives me the following output:

--output--
4.3.0RC2
----------

So __construct() doesn't seem to be called. 

If I rename __construct to BaseClass i get this output:
--output--
4.3.0RC2
In BaseClass constructor
In BaseClass constructor
----------
-- 
Edit bug report at http://bugs.php.net/?id=20784&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20784&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20784&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20784&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20784&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20784&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20784&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20784&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20784&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20784&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20784&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20784&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20784&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20784&r=isapi

Reply via email to