News for hackers. Stuff that matters.
Re:We will try to stop fixing bugs in PHP by lifthrasiir on Friday June 22, 2012 @12:15AM (#4145368)
It is possible to add a catch-all clause to the documentation. For example any non-float argument is converted to float via floatval(), or raises an error, and so on. This behavior can be made consistent across every API so that the documentation has only one place to describe it. PHP is missing this either AFAIK.
Re:We will try to stop fixing bugs in PHP by dpark on Friday June 22, 2012 @01:06AM (#4145505)
> This behavior can be made consistent across every API so that the documentation has only one place to describe it.

Sounds like that's what 'zend_parse_parameters' does, actually.

Re:We will try to stop fixing bugs in PHP by soulclap on Friday June 22, 2012 @12:20AM (#4145381)
I agree this would be ideal. Will definitely keep this in mind when writing documentation (and code) for my own tiny open source projects. All the double and triple checking just adds so much bloat most of the time...