php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66807 The object-oriented style example contains procedural-style code
Submitted: 2014-03-02 03:54 UTC Modified: 2014-04-17 06:57 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: trentonmaki at gmail dot com Assigned: krakjoe (profile)
Status: Closed Package: Documentation problem
PHP Version: 5.5.9 OS:
Private report: No CVE-ID: None
 [2014-03-02 03:54 UTC] trentonmaki at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/mysqli-result.fetch-array
---

The object-oriented style example contains procedural-style code.

Snippet:
<?php
$link = mysqli_connect("localhost", "my_user", "my_password", "world");

/* check connection */
if (mysqli_connect_errno()) { //<- here is the problem
    printf("Connect failed: %s\n", mysqli_connect_error());  //<- As well as here
    exit();
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-17 06:57 UTC] krakjoe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: krakjoe
 [2014-04-17 06:57 UTC] krakjoe@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

I don't know when this was fixed, but it has been.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 10:00:01 2026 UTC