Listing all the curl constants and viewing them in PHP – how to see the curl opt integer constants

Listing all the curl constants and viewing them in PHP – how to see the curl opt integer constants

Here is the thing :), I was working on some API where there is an example of cURL usage for it. For some weird reason the developer has decided to use the php cur option integer constant rather than the nice constant names [listed here].
So i have to use this little snippet to reverse match them..
No biggie, just sharing

$all_constants=get_defined_constants(true); // list all defined constants in the world
$curl_opts=array_flip($all_constants['curl]);
ksort($curl_opts);
print_r($curl_opts);

See how you would solve these known algorithm problems

Finding missing numbers from billion sequential number list file

binary tree problems with solution

Implement Queue Using two Stacks – JavaScript algorithm

Find K Complementary numbers from array Java implementation

Get maximum occurring character

Check if there are three numbers a, b, c giving a total T from array A

Kadane’s algorithm in C – Dynamic Programming

Java solution for checking anagram strings – tell if phrases are anagrams

Array reversal in Recurrsion

Find the pairs that makes K Complementary in the given array java solution

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*