curl options constants have duplicated INTEGER values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm running PHP 5.2.9-1 for Windows and am seeing something that strikes me 
rather odd in the curl setopt constants, collisions of sorts I guess you 
might call them.  The sample script below says it all ...

$curl = get_defined_constants(true);
$curl = $curl['curl'];
foreach($curl as $k => $v) {
    if (strpos($k, 'CURLOPT_', 0) === false) {
        unset($curl[$k]);
    }
}
print count($curl) . "\n";
print_r($curl);
/**
2 dupes, 10009 and 10026
    [CURLOPT_READDATA] => 10009
    [CURLOPT_INFILE] => 10009
    [CURLOPT_SSLKEYPASSWD] => 10026
    [CURLOPT_SSLCERTPASSWD] => 10026
 */

I'm retrieving just the CURLOPT_* constants and was not expecting to see 
duplicate integer values here.  CURLOPT_READDATA is not documented in the 
online manual.  I can read into that value somewhat and assume that either 
constant (CURLOPT_READDATA or CURLOPT_INFILE) might suggest that the value 
supplied should be "The file that the transfer should be read from when 
uploading"

However, the SSL constants don't make sense.  I don't see how they could be 
"interchangeable" like the first set.

Anybody have any further insight? 



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux