#32490 [Opn->Fbk]: constructor of mysqli is wrong named
| From: | sniper@php.net | Date: | Tue, 29 Mar 2005 21:41:23 +0000 |
| Subject: | #32490 [Opn->Fbk]: constructor of mysqli is wrong named | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-76004@lists.php.net to get a copy of this message | ||
ID: 32490
Updated by: sniper@php.net
Reported By: ladoo at gmx dot at
-Status: Open
+Status: Feedback
Bug Type: MySQLi related
Operating System: Linux (x86)
PHP Version: 5.0.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2005-03-29 21:55:02] ladoo at gmx dot at
Description:
------------
Due to the PHP5 manual the constructor of a class shall be called
__construct and the method named after the class is evaluated only for
compatibility reasons. The constructor of the mysqli class is mysqli,
but it should be __construct.
Reproduce code:
---------------
$x = new mysqli();
if(method_exists($x, "mysqli")) echo "mysqli exists";
if(method_exists($x, "__construct")) echo "__construct exists";
Expected result:
----------------
__construct exists
Actual result:
--------------
mysqli exists
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32490&edit=1