0

What is the difference between these PHP operators?

$str = 'ok';
$chkStr1 = isset($str) ? true : false;  // will output true
$chkStr2 = (isset($str)) ? true : false;  // will output true
$chkStr3 = (isset($str) ? true : false);  // will output true

The result is the same for all three

Mr Eblis
  • 39
  • 3

0 Answers0