CURLINFO_HTTP_CODE does not return a string, as the docs say, but rather an integer.
<?php
$c = curl_init('http://www.example.com/');
if(curl_getinfo($c, CURLINFO_HTTP_CODE) === '200') echo "CURLINFO_HTTP_CODE returns a string.";
if(curl_getinfo($c, CURLINFO_HTTP_CODE) === 200) echo "CURLINFO_HTTP_CODE returns an integer.";
curl_close($c);
?>
returns
"CURLINFO_HTTP_CODE returns an integer."