On Fri, Feb 3, 2012 at 06:30, Justin Martin <frozenf...@php.net> wrote: > On 12-02-02 09:24 PM, Hannes Magnusson wrote: >> >> I don't think its as simple as that. You still need to document the >> params, return values and stuff, which can often be whole lot of info. >> How would >> http://no2.php.net/manual/en/function.session-set-save-handler.php >> for example become? > > > I'd have that reference as it is, but simply include the prototypes. This > doesn't have to be immediately perfect and over-engineered. It's simply a > refactoring of the existing way of doing it, which is to try to describe the > callback function structure using written text; and that's extremely > confusing.
Ok. I'm game with that, just showcasing we have a good chunk of "complicated callbacks", I consider that session_set_save_handler() to be one of them. >> We have in somecases simply documented the callback as a "real" >> function, like >> http://no.php.net/manual/en/function.stream-notification-callback.php >> I think I am more fan of that approach. > > > That makes sense in very complicated instances, where a lot of documentation > supplementary to the prototype is needed. My suggestion for callback > prototypes really only applies to functions such as array_reduce(), which > doesn't require a lot of explanation. Fair enough. It then still leaves us with the problem of the more complex callbacks that we need a solution for. -Hannes