Beware of CURLE_* constants!
On the official site:
some constants are different, some missing compared to the PHP implementation.
in PHP the curl error number 28 is called
while in the official site is:
So if you use the second, it won't march the error 28 because in PHP it is not defined that way.
The same is for these:
that are in someway named differently or missing from PHP.