Re: [RFC] prepend_include_path()/append_include_path()
| From: | Jochem Maas | Date: | Thu, 14 Feb 2008 09:57:31 +0000 |
| Subject: | Re: [RFC] prepend_include_path()/append_include_path() | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35491@lists.php.net to get a copy of this message | ||
Lukas Kahwe Smith schreef:
On 14.02.2008, at 10:07, Lars Strojny wrote:point taken, I was just thinking out loud really, I didn't even know of set_include_path() before yesterday. I happily use ini_set('include_path') and have no need for the extra functions ... but someone wrote them, someone might like them and I figure offering an idea (however stupid - heck of got so many ;-)) can't hurt (anything apart from my meager reputation)Hi Jochem, Am Donnerstag, den 14.02.2008, 00:56 +0100 schrieb Jochem Maas:Yeah, I agree that if at all I would go with Lars's original proposal.I think Lars has a point ... maybe set_include_path() could be given a second parameter instead to mitigate the need for seperate funcs?: set_include_path('foo', INCPATH_OVERRIDE); // default set_include_path('foo', INCPATH_APPEND); set_include_path('foo', INCPATH_PREPEND);Thanks for your support, but this seems counter intuitive. Why should *set*_include_path() be used to *append* or *prepend* to the include path? Also learning another mouthful of constants is maybe suboptimal. Getting used to prepend_/append_...() is easy from my point of view, as the name is derived from what's currently present (set_include_path()).