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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tom at r dot je
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Thu Nov 21 13:01:29 2024 UTC