|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-03-23 21:03 UTC] kalle@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Apr 01 01:00:01 2026 UTC |
Description: ------------ get_resource_type() returns bool false on a valid resource handle. Reproduce code: --------------- <?php $host = 'localhost'; $user = 'user'; $pass = 'pass'; $dbpn = 'database'; $connection = mysqli_connect ( $host, $user, $pass, $dbpn ); if ( ! $connection ) { echo 'bad connection'; exit (); } var_dump ( get_resource_type ( $connection ) ); mysqli_close ( $connection ); ?> Expected result: ---------------- I expect... string(unknown) Because it seems that mysqli_() is not in the (List of Resource Types) supported. But it would be nice if mysqli_() and the rest of the database extensions that PHP supports were added to the (List of Resource Types) supported. Actual result: -------------- I get.. bool(false) [23-Mar-2009 15:07:18] PHP Warning: Supplied argument is not a valid resource handle in X:\http\docs\test.php on line [17] Which clearly states that $connection is not a valid resource, when it really is!