|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-01 11:25 UTC] jevon at jevon dot org
[2004-05-01 12:20 UTC] helly@php.net
[2004-10-12 09:56 UTC] php at bobsilva dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 07:00:01 2025 UTC |
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())