From:             wharmby at uk dot ibm dot com
Operating system: Windows XP
PHP version:      5.2CVS-2009-06-09 (snap)
PHP Bug Type:     cURL related
Bug description:  cURL extension uses non-unique resource type names

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 bug report at http://bugs.php.net/?id=48514&edit=1
-- 
Try a CVS snapshot (PHP 5.2):        
http://bugs.php.net/fix.php?id=48514&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):        
http://bugs.php.net/fix.php?id=48514&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):        
http://bugs.php.net/fix.php?id=48514&r=trysnapshot60
Fixed in CVS:                        
http://bugs.php.net/fix.php?id=48514&r=fixedcvs
Fixed in CVS and need be documented: 
http://bugs.php.net/fix.php?id=48514&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=48514&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=48514&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=48514&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=48514&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=48514&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=48514&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=48514&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=48514&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=48514&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=48514&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=48514&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=48514&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=48514&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=48514&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=48514&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=48514&r=mysqlcfg

Reply via email to