|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-04-27 11:14 UTC] jellybob@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
When using the @param or @var markup and defining a type for a variable, phpdoc gives errors in it's report when the default value for a variable is NULL and it is not designated the "resource" type. IMHO NULL should be a valid value for any variable type. Ex: /** * This is a function * @param string $var1 A variable with default=NULL * @return string */ function foo($var1 = NULL) { return $var1; } The above will produce the following in the report: [function] foo mismatch 1st parameter type "$var1" does not match the the documented type "string", possible error consider an update to "@param resource $var1 A variable with default=NULL" or "@param resource A variable with default=NULL", the variable name is optional. I hope this is enough information. Adam