ID:               28241
 User updated by:  jevon at jevon dot org
 Reported By:      jevon at jevon dot org
 Status:           Open
 Bug Type:         Zend Engine 2 problem
 Operating System: WinXP
 PHP Version:      5.0.0RC2
 New Comment:

Oops, $p[0]->getDefault() (although this shouldn't affect the logic)


Previous Comments:
------------------------------------------------------------------------

[2004-05-01 11:24:54] jevon at jevon dot org

Description:
------------
It would be nice for Reflection_Parameter to have a "getDefault" method
to get the default value for the parameter.

Reproduce code:
---------------
class Foo {
  function a($b = 1) { }
}

...

$r = new Reflection_Class("Foo"));
$m = $r->getMethods();
$p = $m[0]->getParameters();
echo "p->getDefault = " . $p->getDefault();

Expected result:
----------------
p->getDefault = 1

Actual result:
--------------
The function doesn't exist
(Fatal error: Call to undefined method
reflection_parameter::getDefault())


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28241&edit=1

Reply via email to