note 103957 added to reflectionclass.getconstructor
| From: | jochem at drecomm dot nl | Date: | Fri, 13 May 2011 15:34:12 +0000 |
| Subject: | note 103957 added to reflectionclass.getconstructor | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-179694@lists.php.net to get a copy of this message | ||
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
}
*/
?>
----
Server IP: 69.147.83.197
Probable Submitter: 95.97.107.148
----
Manual Page -- http://www.php.net/manual/en/reflectionclass.getconstructor.php
Edit -- https://master.php.net/note/edit/103957
Del: integrated -- https://master.php.net/note/delete/103957/integrated
Del: useless -- https://master.php.net/note/delete/103957/useless
Del: bad code -- https://master.php.net/note/delete/103957/bad+code
Del: spam -- https://master.php.net/note/delete/103957/spam
Del: non-english -- https://master.php.net/note/delete/103957/non-english
Del: in docs -- https://master.php.net/note/delete/103957/in+docs
Del: other reasons-- https://master.php.net/note/delete/103957
Reject -- https://master.php.net/note/reject/103957
Search -- https://master.php.net/manage/user-notes.php