Coyote6
04-20-2012, 04:20 PM
Hi,
I was reading the Curl helper class from CodeIgnitor and it has a syntax I haven't seen before. It uses the word AND without an if statement. Can someone please tell me what it means and its purpose.
$url AND $this->create($url);
Here is the entire construct function in the class.
function __construct($url = '')
{
$this->_ci = & get_instance();
log_message('debug', 'cURL Class Initialized');
if ( ! $this->is_enabled())
{
log_message('error', 'cURL Class - PHP was not built with cURL enabled. Rebuild PHP with --with-curl to use cURL.');
}
$url AND $this->create($url);
}
I was reading the Curl helper class from CodeIgnitor and it has a syntax I haven't seen before. It uses the word AND without an if statement. Can someone please tell me what it means and its purpose.
$url AND $this->create($url);
Here is the entire construct function in the class.
function __construct($url = '')
{
$this->_ci = & get_instance();
log_message('debug', 'cURL Class Initialized');
if ( ! $this->is_enabled())
{
log_message('error', 'cURL Class - PHP was not built with cURL enabled. Rebuild PHP with --with-curl to use cURL.');
}
$url AND $this->create($url);
}