PHP 7.2 and bcmod()
| From: | Sebastian Bergmann | Date: | Tue, 05 Dec 2017 05:48:26 +0000 |
| Subject: | PHP 7.2 and bcmod() | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-101239@lists.php.net to get a copy of this message | ||
http://git.php.net/?p=php-src.git;a=blob_plain;f=UPGRADING;hb=refs/heads/PHP-7.2
has this to say on bcmod():
> The bcmod() function no longer truncates fractional numbers
> to integers. As such, its behavior now follows fmod() rather than
> the
% operator. For example
> bcmod('4', '3.5') now returns '0.5'
> instead of '1'.
However, I cannot reproduce this:
$ php --version
PHP 7.2.0 (cli) (built: Nov 28 2017 20:05:12) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
$ php -r 'var_dump(bcmod('4', '3.5'));'
string(1) "0"
Am I missing something?
Thanks!
Sebastian