Bug #32490 [Ver->Csd]: constructor of mysqli has wrong name

From: Date: Tue, 01 Sep 2015 19:45:25 +0000
Subject: Bug #32490 [Ver->Csd]: constructor of mysqli has wrong name
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-195684@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=32490&edit=1 ID: 32490 Updated by: cmb@php.net Reported by: ladoo at gmx dot at Summary: constructor of mysqli has wrong name -Status: Verified +Status: Closed Type: Bug Package: MySQLi related Operating System: * PHP Version: 7.0.0RC1 Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=b15eff63862c9ac24184b8121431019a352a42f8 Log: Fix #32490: constructor of mysqli has wrong name Previous Comments: ------------------------------------------------------------------------ [2015-09-01 16:36:41] cmb@php.net It seems to be arguable whether this is a bug in PHP 5, because PHP 4 style constructors are fine there, but as of PHP 7 these constructors are deprecated, so ::mysqli() should be renamed to ::__construct(). ------------------------------------------------------------------------ [2015-09-01 11:36:56] cmb@php.net Related To: Bug #66948 ------------------------------------------------------------------------ [2005-04-06 01:00:05] php-bugs at lists dot php dot net No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". ------------------------------------------------------------------------ [2005-03-29 23:41:23] sniper@php.net 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 ------------------------------------------------------------------------ [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 https://bugs.php.net/bug.php?id=32490&edit=1

« previous php.bugs (#195684) next »