Home > Backend Development > PHP Tutorial > 这么写是不是矛盾哈

这么写是不是矛盾哈

WBOY
Release: 2016-06-13 12:20:16
Original
977 people have browsed it

这样写是不是矛盾哈
defined('THINK_PATH') or exit();
我的理解是:如果定义了THINK_PATH就执行,或者是退出。
那么问题来了,如果真定义了,他是执行还是退呢,因为这里是or的关系。太矛盾了,让计算机啥整。听谁的
------解决思路----------------------
逻辑或表达式 自左向右检查,只要有一项成立就结束,后面的不在判断了
这就是 逻辑或表达式 的 短路效应

Related labels:
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