Reflection API : Feature request and question

From: Date: Wed, 05 May 2004 07:33:56 +0000
Subject: Reflection API : Feature request and question
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-9666@lists.php.net to get a copy of this message
Hello, I have played around with the Reflection API, missed some features and have some questions: At the moment there is no way of checking if a default parameter has a value, and if so, to get it's value. Example: function foo($bar = TRUE) {} The default value for $bar would be TRUE in this example (maybe a "hasDefaultValue()" and a "getDefaultValue()" method?). The ReflectionParameter method "allowsNull()" doesn't seem to return anything else then (bool)TRUE ?? The ReflectionFunction method "getStartLine()" would be, in my opinion) become even more usefull if you had something like a "getLine()" method which should return the source code on that line, but i might be out of my league here. :) With kind regards, - Arjen

« previous php.internals (#9666) next »