note 61774 deleted from class.dir by bjori
| From: | bjori@php.net | Date: | Fri, 14 Apr 2006 22:05:08 +0000 |
| Subject: | note 61774 deleted from class.dir by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108108@lists.php.net to get a copy of this message | ||
Note Submitter:
----
There's a mistake in this guide. If you try to check declared classes in php4.1 or more you
will notice that no "dir" or "Dir" class exists but instead a
"Directory" class do; indeed if you declare a class with name "Directory" the
compiler will return a "already declared class" error but no such error will appear if you
declare a "Dir" or "dir" class. Also, imo, there is no the need of a
"dir" class with 3 simple methods because it would be easier to implement a custom
directory class than using the one provided by php.
Here the code to check this fault:
$arr = get_declared_classes();
print_r($arr);
print_r(get_class_methods($arr[array_search("Directory",$arr)]));
print_r(get_class_methods($arr[array_search("dir",$arr)]));