On 14.02.2008, at 10:07, Lars Strojny wrote:
Hi Jochem,
Am Donnerstag, den 14.02.2008, 00:56 +0100 schrieb Jochem Maas:
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()).
Yeah, I agree that if at all I would go with Lars's original proposal.
I am +1 if we also commit array_merge_replace() at the same time :)
No seriously, its rare enough stuff that I do not see a special need
for these functions. But I do buy the argument that it improves
readability and is easier to remember (and get proper autocompletion
in an IDE). So I am +0.
regards,
Lukas
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php