#48514 [Opn->Csd]: cURL extension uses same resource name for simple and multi APIs
| From: | felipe@php.net | Date: | Fri, 12 Jun 2009 20:52:02 +0000 |
| Subject: | #48514 [Opn->Csd]: cURL extension uses same resource name for simple and multi APIs | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-138254@lists.php.net to get a copy of this message | ||
ID: 48514
Updated by: felipe@php.net
Reported By: wharmby at uk dot ibm dot com
-Status: Open
+Status: Closed
Bug Type: cURL related
Operating System: *
PHP Version: 5.*, 6CVS (2009-06-10)
-Assigned To:
+Assigned To: felipe
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Fixed in 5.2, 5.3 and HEAD. Thanks.
Previous Comments:
------------------------------------------------------------------------
[2009-06-09 21:40:14] wharmby at uk dot ibm dot com
Description:
------------
The cURL extension currently registers 2 resource types and instances
of these resources are returned by the curl_init() and curl_multi_init()
api's.
However, it is not currently possible to programaticaly determine which
type of curl resource a variable represents as get_resource_type()
returns "curl" for both types of resource.
I expected to get a different names for each of the 2 resource types;
e.g "curl" and "curl_multi"
Reproduce code:
---------------
<?php
$ch1 = curl_init();
var_dump($ch1);
var_dump(get_resource_type($ch1));
$ch2 = curl_multi_init();
var_dump($ch2);
var_dump(get_resource_type($ch2));
?>
Expected result:
----------------
resource(4) of type (curl)
string(4) "curl"
resource(5) of type (curl_multi)
string(4) "curl_multi"
Actual result:
--------------
resource(4) of type (curl)
string(4) "curl"
resource(5) of type (curl)
string(4) "curl"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48514&edit=1