Old constructors also count as contructor:
<?php
class SomeClass {
function SomeClass($some_arg) {
}
}
$refl = new ReflectionClass('SomeClass');
var_dump($refl->isInstantiable()); echo $refl->getConstructor();
?>
Some more behavior:
<?php
class SomeClass {
function funcA($arg1, $arg2) {
}
}
$refl = new ReflectionClass('SomeClass');
var_dump($refl->isInstantiable()); var_dump($refl->getConstructor()); class AnotherClass {
private function __construct() {
}
function funcB($arg1, $arg2) {
}
}
$refl = new ReflectionClass('AnotherClass');
var_dump($refl->isInstantiable()); echo $refl->getConstructor();
?>
Tested on PHP 5.2.4