#29728 [NEW]: Reflection API Feature: Default parameter value.
| From: | wb at pro-net dot co dot uk | Date: | Wed, 18 Aug 2004 10:05:02 +0000 |
| Subject: | #29728 [NEW]: Reflection API Feature: Default parameter value. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-64827@lists.php.net to get a copy of this message | ||
From: wb at pro-net dot co dot uk
Operating system: *
PHP version: 5.0.0
PHP Bug Type: Zend Engine 2 problem
Bug description: Reflection API Feature: Default parameter value.
Description:
------------
This is not strictly a bug and more of a feature request (if there is a
better place for feature requests then please let me know).
At the moment there is no way to find out if a parameter for a method has
a default value or not.
It would be nice is the ReflectionParameter class had something like the
the following methods.
<boolean> ReflectionParameter->isRequired()
Returns TRUE if the parameter is required or FALSE if it is not required
(and therefore has a default value).
<mixed> ReflectionParameter->getDefault()
Returns the default value for the parameter. This could throw an Exception
if no default value is set as it could be possiable for the default value
to be FALSE :)
Reproduce code:
---------------
n/a
Expected result:
----------------
n/a
Actual result:
--------------
n/a
--
Edit bug report at http://bugs.php.net/?id=29728&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29728&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29728&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29728&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29728&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29728&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29728&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29728&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29728&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29728&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29728&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29728&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29728&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29728&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29728&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29728&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29728&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29728&r=float