|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-11-10 14:31 UTC] webmaster at mif dot it
[2005-11-10 14:31 UTC] webmaster at mif dot it
[2005-11-10 14:35 UTC] johannes@php.net
[2005-11-10 14:41 UTC] webmaster at mif dot it
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 02:00:01 2025 UTC |
Description: ------------ Cannot use Mysqli functions, without using references. Reproduce code: --------------- This code: $db = mysqli_connect('localhost','Matteo','teo28273'); and this doesn't works: $db = new mysqli('localhost','Matteo','teo28273'); This code: $db =& mysqli_connect('localhost','Matteo','teo28273'); and this code works: $db =& new mysqli('localhost','Matteo','teo28273'); Expected result: ---------------- The following code (and all mysqli functions) work properly: $db = mysqli_connect('localhost','Matteo','teo28273'); or $db = new mysqli('localhost','Matteo','teo28273'); Actual result: -------------- Produces this error: #Fatal error: Trying to clone an uncloneable object of class mysqli in [***]\index.php on line 4