php.net |  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
Votes:1
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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
5 + 11 = ?
Subscribe to this entry?

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

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: http://uk3.php.net/manual/en/mysqli.construct.php



Test script:
---------------
<?php

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

//TRUE
method_exists('pdo', '__construct')



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

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] cmb@php.net
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2015-09-01 11:36 UTC] cmb@php.net
Actually, this is a duplicate of bug #32490.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 12:01:29 2024 UTC