|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30624 mysqli_connect() returns object instead of resource
Submitted: 2004-10-30 19:19 UTC Modified: 2004-10-30 19:36 UTC
From: Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.0.2 OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2004-10-30 19:19 UTC]
The procedural function mysqli_connect() returns a MySQLi object instead of an link identifier.

Reproduce code:
php5 -r "var_dump(mysqli_connect('localhost','root',''));"

Expected result:
resource (#N) of type mysqli

Actual result:
object(mysqli)#1 (0) {


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-10-30 19:25 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

This is exactly what it does, no bug here.
 [2004-10-30 19:32 UTC]
Ah, Derick fast as usual; 
/me just wanted to bogussify that, too... 

 [2004-10-30 19:36 UTC]
the mailer is too slow! +bogus from me too! 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 11:01:31 2024 UTC