----- Original Message ----- 
From: "Arjen Warendorff" <[EMAIL PROTECTED]>
To: "'PHP Internals List'" <[EMAIL PROTECTED]>
Sent: Wednesday, May 05, 2004 7:33 PM
Subject: [PHP-DEV] Reflection API : Feature request and question


> 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?).

I reported this in my bug:
http://bugs.php.net/bug.php?id=28241
It was suspended until PHP 5.1... but yes, I really think the Reflection API
needs this!

> 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. :)

Couldn't you do this in userland? Which the PHP internals seem so obsessed
about :D
I don't know if this is truly useful - maybe if the PHP code is stored in
memory anyway, and it doesn't introduce a performance penalty...?

Jevon

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to