|  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
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:
Solve the problem:
16 + 27 = ?
Subscribe to this entry?

 [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-2023 The PHP Group
All rights reserved.
Last updated: Sun Mar 26 07:05:48 2023 UTC