php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #63687 documentation claiming "procedural code"
Submitted: 2012-12-04 15:21 UTC Modified: 2012-12-05 14:44 UTC
From: bill at fastpitchcentral dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bill at fastpitchcentral dot com
New email:
PHP Version: OS:

 

 [2012-12-04 15:21 UTC] bill at fastpitchcentral dot com
Description:
------------
---
From manual page: http://www.php.net/mysqli-result.fetch-fields#refsect1-mysqli-
result.fetch-fields-seealso
---
Your "Example #2 Procedural style" is incorrect.  It contains numerous lines of 
code that are object-oriented instead of procedural.

I love PHP.  But for me it will never be an object-oriented language.  The 
educational system in the USA is bad enough already.  Don't add to the confusion 
by claiming code is procedural when it is not.  The kids just will not understand.

I suspect the problem is throughout the MYSQLI area and perhaps anywhere there is 
a presentation of object-oriented code and procedural code.

Test script:
---------------
N/A

Expected result:
----------------
If your examples contain the title "procedural code" all the code should be 
procedural code.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-05 09:03 UTC] kalle@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Hi

There is no bug in the example, the object oriented code you are seeing in the example is due to the fact that 'mysqli_fetch_fields()' returns an object, to simulate what the first example does, while I agree it could be changed to use an array fetching function, one could argue the other way around.

The object is not a specific requirement of the MySQLi API for procedural style, its just the way that the extension chooses to return the data for the user.
 [2012-12-05 09:03 UTC] kalle@php.net
-Status: Open +Status: Not a bug
 [2012-12-05 14:44 UTC] bill at fastpitchcentral dot com
Kalle said, "Sorry, but your problem does not imply a bug in PHP itself."  Well, I'm sorry but your bug tracking system here gave "Documentation Problem" as a "Bug Type".  I did not build your system.  Kalle, instead of attacking people for fun I suggest you do something more productive.

Ultimately all I was suggesting is that the title "Procedural Code" is a poor choice of words that will confuse children.  I'm too old to want you to do anything for me.  Or, maybe y'all just like to " -> " for some perverse reason?  That symbol will not appear in my code and I still have 4 or 5 more years to program.

Please don't bother answering this time.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 11:00:02 2026 UTC