|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66948 method_exists('mysqli', '__construct') returns false
Submitted: 2014-03-24 18:11 UTC Modified: 2015-09-01 11:36 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: tom at r dot je Assigned: cmb (profile)
Status: Duplicate Package: MySQLi related
PHP Version: 5.5.10 OS: *
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: tom at r dot je
New email:
PHP Version: OS:


 [2014-03-24 18:11 UTC] tom at r dot je

method_exists('mysqli', '__construct')

Doing similar without inbuilt classes such as:

method_exists('pdo', '__construct')

Correctly returns true.

The documentation for MySQLI suggests it has a constructor:

Test script:

var_dump(method_exists('mysqli', '__construct'));

method_exists('pdo', '__construct')

Expected result:
method_exists('mysqli', '__construct') should return true

Actual result:
method_exists('mysqli', '__construct') returns false


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-16 02:08 UTC] kurt at x64architecture dot com
This is related to #32490.

method_exists(mysqli, "mysqli"); // Evaluates to true
method_exists(mysqli, "__construct"); // Evaluates to false
 [2015-09-01 11:36 UTC]
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2015-09-01 11:36 UTC]
Actually, this is a duplicate of bug #32490.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 21:01:32 2024 UTC