On Thursday, December 09, 2010 4:44:44 am Michael Shadle wrote: > On Thu, Dec 9, 2010 at 2:38 AM, Andrey Hristov <p...@hristov.com> wrote: > > Yes, as the documentation will mention how to do it, for old > > applications. For new apps it is easy - pass all the information you > > need as parameter to the function. It works in other languages, why > > shouldn't it work for PHP? > > named parameters would help here. otherwise you wind up with a mess of > argument hell. or passing a single array in and then in the function > parsing that for the items (which is what I do, sort of a userland way > of doing named parameters) > > but adding more and more parameters to functions over time leads to > issues if they do not have default values and if you have to pass say, > the 6th parameter, but don't need to pass the rest, etc.
It seems like something like this bundled by default could provide an alternative to the super-globals: http://us3.php.net/manual/en/book.http.php Note: I have not actually used said library, just drooled over having a properly abstracted HTTP object for incoming and outgoing communication. --Larry Garfield -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php