Skip to content

BcMath\Number is not unsupported operand type #17048

@BraisedFish

Description

@BraisedFish

Description

BcMath/Number is not allowed in Zend/tests/operator_unsupported_types.phpt.

<?php
use BcMath\Number;

$num1 = new Number('0.12345');
$num2 = new Number('2');
$result = $num1 + $num2;

echo $result; // '2.12345'
var_dump($num1 > $num2); // false

Warning from IDE: Unsupported operand types in '\BcMath\Number + \BcMath\Number' will cause a PHP 8 TypeError

PHP Version

PHP 8.4

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions