php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #65534
Patch new-mysqli-isnt-C-style-hurrah revision 2013-08-23 12:08 UTC by kit dot lester at mail dot com

Patch new-mysqli-isnt-C-style-hurrah for Documentation problem Bug #65534

Patch version 2013-08-23 12:08 UTC

Return to Bug #65534 | Download this patch
Patch Revisions:

Developer: kit.lester@mail.com


The "add a note" documentation wants comments on the PHP manual to be reported
as  bugs,  but  the bug  system  makes  submitting  a  doc-comment  a bit of a
nightmare!

Like it wants me to update an old bug report! (Why? - unclear. Sorry.)

And then it  demands  a patch  file...  hence  I'll us this  record  of what I
submitted.

Keep up the good work! --

-- Kit Lester

------------------------------------------------------------------------------


It  would  be  nice  if  the   description  of  the  result  in  the  page  on
mysqli::__construct()  could say  something  like that the  result "is of type
mysqli, even if the connection  fails (i.e. never null)"; and somewhere (maybe
with the result) that errno should be checked to determine  that the operation
failed.

This  would  assist  those of us coming  from  systems  in which  failures  of
constructors  commonly  return NULL and failures of functions  commonly return
FALSE - very common in libraries for C and languages derived from C.

Much the same applies to all other manual pages on any  constructor  or method
with an errno (or in this case connect_errno) that should routinely be checked
- so  (apologies!)  this is a  meta-comment  applying to many of the  manual's
pages.  [my  own  old  scars  tell  me  that  I'd   requesting  a  substantial
documentation-editing effort.]
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 01:01:31 2024 UTC