note 33098 deleted from function.curl-setopt by didou

From: Date: Fri, 28 Jan 2005 16:03:59 +0000
Subject: note 33098 deleted from function.curl-setopt by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-84127@lists.php.net to get a copy of this message
Note Submitter: jacob_at_keystreams_dot_com ---- [Ed. note: This is because PHP converts the unknown CURLOPT_NON_EXISTENT_OPTION into the string 'CURLOPT_NON_EXISTENT_OPTION', which is then passed to curl_setopt(). That value is then cast (PHP-style) into an integer, which gives it the value 0. This amounts to a noop within curl_setopt(), so the function does nothing, successfully. The return value is actually boolean TRUE in this case.] if (!curl_setopt($ch, CURLOPT_NON_EXISTENT_OPTION, 1)) echo 'invalid option'; 'invalid option' is never printed out. curl_setopt seems to fall silent (does not return anything).

« previous php.notes (#84127) next »