I have been looking around for what the use of ?, and : mean in PHP, such as in the following examples
$data = (file_exists($data)) ? $this->parse($data) : $data;
and
$func = ( $regType == 'P' ) ? 'preg_match' : 'ereg' . $case;
Could someone point me in the right direction of some documentation on this? I have tryed searching, but I can't seem to search for the uses of ? and : properly.
Thank you!
$data = (file_exists($data)) ? $this->parse($data) : $data;
and
$func = ( $regType == 'P' ) ? 'preg_match' : 'ereg' . $case;
Could someone point me in the right direction of some documentation on this? I have tryed searching, but I can't seem to search for the uses of ? and : properly.
Thank you!