note 103957 deleted from reflectionclass.getconstructor by danbrown
| From: | danbrown@php.net | Date: | Fri, 13 May 2011 15:37:26 +0000 |
| Subject: | note 103957 deleted from reflectionclass.getconstructor by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-179698@lists.php.net to get a copy of this message | ||
Note Submitter: jochem at drecomm dot nl
----
Some more behavior:
<?php
class SomeClass {
function funcA($arg1, $arg2) {
}
}
$refl = new ReflectionClass('SomeClass');
var_dump($refl->isInstantiable()); // bool(true)
var_dump($refl->getConstructor()); // NULL
/* --------------- */
class AnotherClass {
private function __construct() {
}
function funcB($arg1, $arg2) {
}
}
$refl = new ReflectionClass('AnotherClass');
var_dump($refl->isInstantiable()); // bool(false)
echo $refl->getConstructor();
/*
Method [ <user, ctor> private method __construct ] {
@@ /testRefl.php 22 - 23
}
*/
?>