|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #74578 Sample code error
Submitted: 2017-05-12 07:41 UTC Modified: 2017-05-12 07:48 UTC
From: cnlyzy at qq dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: 7.1.5 OS: windows10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: cnlyzy at qq dot com
New email:
PHP Version: OS:


 [2017-05-12 07:41 UTC] cnlyzy at qq dot com
From manual page:

$e->errorMessage(); in the sample code; does not exist

Test script:
try {
    $mysqli = new mysqli('','uesr','password','testDB');
    echo 'connect success';
} catch (Exception $e) {
    echo 'ERROR:'.$e->getMessage();

Expected result:
Capture the exception of mysqli

Actual result:
Capture the exception of mysqli


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-05-12 07:48 UTC]
-Status: Open +Status: Not a bug
 [2017-05-12 07:48 UTC]
The only sample code that uses that is a user supplied note and *not* in the actual manual.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Feb 27 09:01:24 2021 UTC