php5 class initialization

php.internals

t

22 years ago
The below code outputs ... a() ... when I would expect ... __construct() ... is this a bug, some sort of new (only seeing this occur since RC1) feature, or some option I'm supposed to switch off ? <?php class a { function __construct() { echo '__construct()'; } function a() { echo 'a()'; } } $a=new a; ?>