问题描述
很抱歉,这听起来像是一个很愚蠢的问题.
Sorry if this sounds like a really silly question.
但是我在网络上搜索了Google,并且还专门搜索了php.net站点和stackoverflow.com站点.我知道PHP在使用and, or, &&, ||
运算符时会进行短路惰性评估,但是在PHP手册中它在何处清晰明了??
But I Googled the web and also Googled specifically both the php.net site and the stackoverflow.com site.I know PHP does short circuit lazy evaluation when using and, or, &&, ||
operators, but where is it stated loud and clear in the PHP manual???
我发现只有 Wikipedia 是唯一的受信任的"信息源,它说PHP确实很懒对这些运算符的评估.
I found only Wikipedia as the only 'trusted' source that say PHP does lazy evaluation on these operators.
推荐答案
我最近发现有关PHP短路实现的官方"内容: http://php.net/manual/zh/language.operators.ologic.php
Closest thing I can find to an 'official' mention of PHP's short-circuit implementation: http://php.net/manual/en/language.operators.logical.php
这篇关于PHP短路懒惰评估,在php.net手册中它在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!