Doc #74578 [Opn->Nab]: Sample code error

From: Date: Fri, 12 May 2017 07:48:29 +0000
Subject: Doc #74578 [Opn->Nab]: Sample code error
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14684@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74578&edit=1 ID: 74578 Updated by: peehaa@php.net Reported by: cnlyzy at qq dot com Summary: Sample code error -Status: Open +Status: Not a bug Type: Documentation Problem Package: Documentation problem Operating System: windows10 PHP Version: 7.1.5 Block user comment: N Private report: N New Comment: The only sample code that uses that is a user supplied note and *not* in the actual manual. Previous Comments: ------------------------------------------------------------------------ [2017-05-12 07:41:10] cnlyzy at qq dot com Description: ------------ --- From manual page: http://www.php.net/class.mysqli-sql-exception --- $e->errorMessage(); in the sample code; does not exist Test script: --------------- <?php mysqli_report(MYSQLI_REPORT_STRICT); try { $mysqli = new mysqli('127.0.0.1','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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74578&edit=1

« previous php.doc.bugs (#14684) next »