For example, if I have
assert('2<1');
It turns out that the statement returns as true. I also copy example # 2 from http://php.net/manual/en/function.assert.php , and he also rated each statement as true when this is clearly not the case. Any idea what could be causing this?
Edit -
<?php
var_dump(assert('2<1'));
?>
Output
true
If I ran this at http://sandbox.onlinephpfunctions.com/ , the statement will not complete as expected. However, this does not happen on my test server.
Edit # 2 - PHP Version:
PHP 7.0.9-1+deb.sury.org~trusty+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.9-1+deb.sury.org~trusty+1, Copyright (c) 1999-2016, by Zend Technologies
source
share