note 58849 added to function.compact
| From: | mijllirg at wearethedotin dot com | Date: | Thu, 17 Nov 2005 19:38:51 +0000 |
| Subject: | note 58849 added to function.compact | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-98719@lists.php.net to get a copy of this message | ||
You might could think of it as ${$var}. So, if you variable is not accessible with the ${$var} it
will not working with this function. Examples being inside of function or class where you variable
is not present.
<?php
$foo = 'bar';
function blah()
{
// this will no work since the $foo is not in scope
$somthin = compact('foo'); // you get empty array
}
?>
PS: Sorry for my poor english...
----
Manual Page -- http://www.php.net/manual/en/function.compact.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+58849
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58849&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58849&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58849&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58849&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58849&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58849&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58849&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+58849&report=yes
Search -- http://master.php.net/manage/user-notes.php