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. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php