|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 7.2
-- Calendar:
- . Fix integer overflows (Joshua Rogers)
-
- Core:
. Removed IS_TYPE_IMMUTABLE (it's the same as COPYABLE & !REFCOUNTED). (Dmitry)
. Removed the sql.safe_mode directive. (Kalle)
. Raised minimum supported Windows versions to Windows 7/Server 2008 R2.
(Anatol)
+- BCMath:
+ . Fixed bug #46564 (bcmod truncates fractionals). (liborm85)
+
+- Calendar:
+ . Fix integer overflows (Joshua Rogers)
+
- Date:
. Fixed bug #69587 (DateInterval properties and isset). (jhdxr)
property names would become inaccessible string keys.
. Minimum supported Windows versions are Windows 7/Server 2008 R2.
+- BCMath:
+ . 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'.
+
- PCRE:
. preg_match() and other PCRE functions now distinguish between unmatched
subpatterns and empty matches by reporting NULL and "" (empty string),
bc_init_num(&first);
bc_init_num(&second);
bc_init_num(&result);
- bc_str2num(&first, ZSTR_VAL(left), 0);
- bc_str2num(&second, ZSTR_VAL(right), 0);
+ php_str2num(&first, ZSTR_VAL(left));
+ php_str2num(&second, ZSTR_VAL(right));
switch (bc_modulo(first, second, &result, 0)) {
case 0:
echo bcmod("11", "2"),"\n";
echo bcmod("-1", "5"),"\n";
echo bcmod("8728932001983192837219398127471", "1928372132132819737213"),"\n";
+echo bcmod("3.5", "4"),"\n";
+echo bcmod("1071", "357.5"),"\n";
?>
--EXPECT--
1
-1
1459434331351930289678
+3.5
+356.0