开发者

How does this if statement read?

开发者 https://www.devze.com 2023-03-19 12:28 出处:网络
How does this if statement read out loud? if (开发者_如何学Go!$_SESSION[\'stuff\']) { $age=12; } (Admin, please change the non-descript title since I don\'t know what to call the boolean expressio

How does this if statement read out loud?

if (开发者_如何学Go!$_SESSION['stuff']) { 
    $age=12;
}

(Admin, please change the non-descript title since I don't know what to call the boolean expression in the if statement)


If not stuff in $_SESSION

If the value (or lack thereof) at index stuff of Array $_SESSION evaluates to false, then set $age to INT value 12.


Are you referring to the exclamation mark? That is a "not".


If it's not the "stuff" session, set "age" to 12.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号