Re: [RFC] prepend_include_path()/append_include_path()

From: Date: Thu, 14 Feb 2008 23:46:33 +0000
Subject: Re: [RFC] prepend_include_path()/append_include_path()
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-35504@lists.php.net to get a copy of this message
On Wed, February 13, 2008 9:47 am, Lars Strojny wrote: > Hi everyone, > > the following patch[1] adds the functions append_include_path() and > prepend_include_path(). These function are there to make include path > adjustments easier than it is. Especially append_include_path() is > what > is done most of the time. > > The current patch is in a bit hacky state, as I have my doubts whether > storing the include paths as a string is a good idea. I want to gain > some feedback for this addition first before I invest more work on it. > > [1] > http://lars.schokokeks.org/php/include_path_modifiers-1.diff Seems kinda silly, really, since one can just do: set_include_path("foo:" . include_path()); set_include_path(include_path() . ":bar"); Okay, you need to use PATH_SEPARATOR and maybe you'd want to be sure you're not adding the same path twice in a really fancy version... But even that wouldn't be 100% with symlinks or other funkiness like using "/foo/bar//baz/"... -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So?

« previous php.internals (#35504) next »