Possible Duplicate: Writing a function in php
I\'m using the following code
echo \'Curl: \',
Just return your existing check from a function.
function _isCurl(){ return function_exists('curl_version'); }