mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Document behavior of NaN/Inf to int casts
As of PHP 7.0.0 this results in int(0); formerly it has been undefined. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@339291 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
b4c0293c1b
commit
2891a305f1
1 changed files with 7 additions and 0 deletions
|
@ -226,6 +226,13 @@ var_dump(round(25/7)); // float(4)
|
|||
have enough precision to give an exact <type>integer</type> result. No
|
||||
warning, not even a notice will be issued when this happens!
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
Instead of being undefined and platform-dependent, NaN and Infinity will
|
||||
always be zero when cast to integer as of PHP 7.0.0.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<warning>
|
||||
<para>
|
||||
|
|
Loading…
Reference in a new issue