Skip to content

Commit 65b5751

Browse files
committed
Merge branch 'PHP-7.2'
* PHP-7.2: Fix bug75178.phpt on Windows
2 parents 8826a56 + 20fe838 commit 65b5751

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
--TEST--
2+
Bug #75178 (bcpowmod() misbehaves for non-integer base or modulus)
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
6+
if (substr(PHP_OS, 0, 3) != 'WIN') {
7+
die('skip valid only for windows');
8+
}
9+
?>
10+
--FILE--
11+
<?php
12+
var_dump(bcpowmod('4.1', '4', '3', 3));
13+
var_dump(bcpowmod('4', '4', '3.1', 3));
14+
?>
15+
===DONE===
16+
--EXPECT--
17+
string(5) "1.000"
18+
string(5) "1.000"
19+
===DONE===
20+
bc math warning: non-zero scale in base
21+
bc math warning: non-zero scale in modulus

ext/bcmath/tests/bug75178.phpt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ Bug #75178 (bcpowmod() misbehaves for non-integer base or modulus)
33
--SKIPIF--
44
<?php
55
if (!extension_loaded('bcmath')) die('skip bcmath extension is not available');
6+
if (substr(PHP_OS, 0, 3) == 'WIN') {
7+
die('skip Not valid for windows');
8+
}
69
?>
710
--FILE--
811
<?php

0 commit comments

Comments
 (0)