PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<错误消息已经改变函数 TRUE/FALSE 返回值>
Last updated: Mon, 16 Jul 2012

布尔值的快速计算

PHP 3.0 中的布尔值采取了快速计算的方法。这就意味着如同 (1 || test_me()) 的表达式将不会执行函数 test_me()。因为这个表达式的值始终为 1

这只是一个很小的兼容性问题,但是会造成一些意想不到的结果。




<错误消息已经改变函数 TRUE/FALSE 返回值>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST