#29728 [Opn->Csd]: Reflection API Feature: Default parameter value.
| From: | helly@php.net | Date: | Thu, 19 Aug 2004 07:42:45 +0000 |
| Subject: | #29728 [Opn->Csd]: Reflection API Feature: Default parameter value. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64918@lists.php.net to get a copy of this message | ||
ID: 29728
Updated by: helly@php.net
Reported By: wb at pro-net dot co dot uk
-Status: Open
+Status: Closed
-Bug Type: Feature/Change Request
+Bug Type: Zend Engine 2 problem
Operating System: *
-PHP Version: 5.0.*
+PHP Version: 5.1.0-dev
Assigned To: helly
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-08-19 01:08:17] helly@php.net
The first is ReflectionParameter::isOptional()
------------------------------------------------------------------------
[2004-08-18 12:05:01] wb at pro-net dot co dot uk
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 this bug report at http://bugs.php.net/?id=29728&edit=1