note 3417 deleted from function.compact by felipe
| From: | felipe@php.net | Date: | Sat, 29 Dec 2007 16:14:39 +0000 |
| Subject: | note 3417 deleted from function.compact by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134127@lists.php.net to get a copy of this message | ||
Note Submitter: rlynch at ignitionstate dot com
Reason: 5
----
It should be noted that PHP will simply skip any strings that are not set:
<?php
$foo = 4;
$bar = 3;
$result = compact('foo', 'bar', 'baz');
?>
will result in:
('foo' => 4, 'bar' => 3)
'baz' is simply ignored.