开发者

php numbers: assert( 1.0 < 2.0 )

开发者 https://www.devze.com 2023-01-04 00:23 出处:网络
How can this <?php assert( 1.0 < 2.0 ); ?> result in Warning: assert() [function.assert]: Assertion failed in C:\\Program Files (x86)\\wamp\\www\\test.php on line 2

How can this

<?php
assert( 1.0 < 2.0 );
?>

result in

Warning: assert() [function.assert]: Assertion failed in C:\Program Files (x86)\wamp\www\test.php on line 2

Edit: depending on the file I put this code in, 1.0 <开发者_运维问答 2.0 evaluates to false or true.


Try writing it as a string instead. :)

assert("1.0 < 2.0");

0

精彩评论

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