In message <[EMAIL PROTECTED]> on Wed, Jan 21, 2004 at 03:31:08AM -0800, Rasmus Lerdorf wrote: > > $url = urlappendvar($_SERVER['HTTP_REFERER'], 'foo', $foo); > > Generally we don't add functions to replace simple one-line PHP > expressions. > > $url .= strstr($url,'?')?"?foo=$foo":"&foo=$foo";
Without wanting to make any comment about the merits of the proposed function, I would have thought there would be merit in having a set of generalised URL-manipulation functions (if someone wanted to write them, that is). For example, the urlappendvar function would clearly handle the syntax of URLs transparently, yet the one-liner requires an author to do The Right Thing in a piecemeal fashion.
I agree that it might be a good idea. There are only two problems: a) The name of the function. b) The timing (we are in a feature freeze right now).
I suggest you bring it up again once we release 5.0.0. I'm sure that it has the potential to spawn an intellectual discussion on what the function should look like and other features which are often needed (i.e. it might become something more interesting).
Andi
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php