note 56336 added to function.func-get-args

From: Date: Wed, 31 Aug 2005 05:05:02 +0000
Subject: note 56336 added to function.func-get-args
Groups: php.notes 
Request: Send a blank email to php-notes+get-94476@lists.php.net to get a copy of this message
Just to clarify on jwhite at ytztech dot com's comment below... func_get_args() does actually always return an array, it's just that a test such as: <?php if ($array = func_get_args()) { echo '<h1>SUCCESS!</h1>'; } ?> ...will equate to FALSE if the array returned by func_get_args() is empty (i.e. no arguments passed), as PHP converts an empty array to a FALSE boolean (as opposed to an array with elements, which converts to TRUE). ---- Manual Page -- http://www.php.net/manual/en/function.func-get-args.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56336 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56336&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56336&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56336&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56336&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56336&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56336&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56336&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#94476) next »