note 56819 deleted from function.set-include-path by mazzanet
| From: | mazzanet@php.net | Date: | Fri, 16 Sep 2005 06:14:03 +0000 |
| Subject: | note 56819 deleted from function.set-include-path by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-95268@lists.php.net to get a copy of this message | ||
Note Submitter: kencomer at NOSPAM dot kencomer dot com
----
Darn. All of that and I missed two things:
1) array_unique(array_merge()) might have been smarter than array_flip(array_flip(array_merge())); I
did not know that array_unique() existed. According to a note on the array_unique() page, though,
flip-flip is usually much faster and less memory intensive.
2) the comments about the array_flip() stuff should read:
// flipping once makes the paths into the keys,
// duplicate keys are eliminated automatically
// array( 1=>'/path1', 2=>'/path2', 3=>'/path2',
4=>'/path3' )
// becomes array('/path1'=>1, '/path2'=>3,
'/path3'=>4 )
// flipping again returns the array back
// into array( 1=>'/path1', 3=>'/path2', 4=>'/path3'
)
Neither of the above directly affect the functionality, but if you are trying to learn array_flip(),
I did not want to lead you astray.