I was refactoring my cURL class today and thought about looking at default values of cURL FLAGS.
Could anyone tell me where I might find or how could I output them?
PS: If it's possible at all.
I was refactoring my cURL class today and thought about looking at default values of cURL FLAGS.
Could anyone tell me where I might find or how could I output them?
PS: If it's possible at all.
This will display the "CURL*" constant names and their values:
foreach (get_defined_constants() as $name => $val) {
if (strpos($name, 'CURL') === 0) {
echo $name . ' => ' . $val . "\n";
}
}
For just the curl option values, change 'CURL' to 'CURLOPT_', of course.
(If you're thinking of using the integer values instead of the constant names in your script, you shouldn't.)