xref: /PHP-8.0/ext/bcmath/tests/bug78878.phpt (revision cd05b56a)
1--TEST--
2Bug #78878 (Buffer underflow in bc_shift_addsub)
3--SKIPIF--
4<?php
5if (!extension_loaded('bcmath')) die('skip bcmath extension not available');
6?>
7--FILE--
8<?php
9try {
10    print bcmul("\xB26483605105519922841849335928742092", bcpowmod(2, 65535, -4e-4));
11} catch (\ValueError $e) {
12    echo $e->getMessage() . \PHP_EOL;
13}
14?>
15--EXPECT--
16bcpowmod(): Argument #3 ($modulus) cannot have a fractional part
17