Check CURL is available using PHP

If you need to check whether curl is available in a web server, you can use snippet below to check available curl. The code below will check if curl is available and enabled in the web server.
PHP
1234567891011
<?php
function iscurlinstalled()
{
	if  (in_array  ('curl', get_loaded_extensions())) {
		return true;
	}
	else{
		return false;
	}
}
?>
Usage :
PHP
123
<?php
echo (iscurlinstalled())?'curl found':'no curl found';
?>