note 56819 added to function.set-include-path
| From: | kencomer at NOSPAM dot kencomer dot com | Date: | Thu, 15 Sep 2005 22:01:32 +0000 |
| Subject: | note 56819 added to function.set-include-path | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-95251@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/function.set-include-path.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+56819
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56819&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56819&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56819&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56819&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56819&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+56819&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56819&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+56819&report=yes
Search -- http://master.php.net/manage/user-notes.php