PHP中取反一直不怎么理解 应该如何读代码

WBOY
Release: 2016-06-06 20:07:29
Original
873 people have browsed it

if(!(2>1)){

<code>   echo '2>1';</code>
Copy after login
Copy after login

}else{

<code>   echo '2</code>
Copy after login
Copy after login

}

表达式中的代码怎么读啊,这块好晕,求大家帮助

这个问题已被关闭,原因:与已有问题重复

回复内容:

if(!(2>1)){

<code>   echo '2>1';</code>
Copy after login
Copy after login

}else{

<code>   echo '2</code>
Copy after login
Copy after login

}

表达式中的代码怎么读啊,这块好晕,求大家帮助

<code>if (!(2 > 1)) {

}

//就是
if (!true) {

}

//也就是
if (false) {

}</code>
Copy after login

层层理解条件即可
话说,可读性差的代码,不提倡

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!