note 106470 added to reflectionparameter.isdefaultvalueavailable

From: Date: Fri, 11 Nov 2011 16:49:22 +0000
Subject: note 106470 added to reflectionparameter.isdefaultvalueavailable
Groups: php.notes 
Request: Send a blank email to php-notes+get-184397@lists.php.net to get a copy of this message
A quick note to the remark of "php at marcyes dot com": I think the Reflection class does a good job here NOT reporting the declared default value as available. In having the $che parameter without default value, the $bar parameter becomes automatically required, since you no longer may call the foo function without supplying both parameters. As a rule of thumb: optional parameters (the ones with default values) should always be declared last. ---- Server IP: 69.147.83.197 Probable Submitter: 212.19.47.25 ---- Manual Page -- http://www.php.net/manual/en/reflectionparameter.isdefaultvalueavailable.php Edit -- https://master.php.net/note/edit/106470 Del: integrated -- https://master.php.net/note/delete/106470/integrated Del: useless -- https://master.php.net/note/delete/106470/useless Del: bad code -- https://master.php.net/note/delete/106470/bad+code Del: spam -- https://master.php.net/note/delete/106470/spam Del: non-english -- https://master.php.net/note/delete/106470/non-english Del: in docs -- https://master.php.net/note/delete/106470/in+docs Del: other reasons-- https://master.php.net/note/delete/106470 Reject -- https://master.php.net/note/reject/106470 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184397) next »