--TEST-- ReflectionClass::getConstructor() --FILE-- getConstructor(); if ($rm != null) { echo "Constructor of $class: " . $rm->getName() . "\n"; } else { echo "No constructor for $class\n"; } } ?> --EXPECTF-- Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; OldCtor has a deprecated constructor in %s on line %d Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; B has a deprecated constructor in %s on line %d Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; C has a deprecated constructor in %s on line %d Constructor of NewCtor: __construct Constructor of ExtendsNewCtor: __construct Constructor of OldCtor: OldCtor Constructor of ExtendsOldCtor: OldCtor Constructor of OldAndNewCtor: __construct Constructor of NewAndOldCtor: __construct Constructor of B: B Constructor of C: C Constructor of D1: __construct Constructor of D2: C No constructor for X No constructor for Y