1--TEST-- 2BcMath\Number calc other class by operator 3--EXTENSIONS-- 4bcmath 5--FILE-- 6<?php 7$num = new BcMath\Number(100); 8$other = new stdClass(); 9 10try { 11 $num + $other; 12} catch (Error $e) { 13 echo $e->getMessage() . "\n"; 14} 15 16try { 17 $num - $other; 18} catch (Error $e) { 19 echo $e->getMessage() . "\n"; 20} 21 22try { 23 $num * $other; 24} catch (Error $e) { 25 echo $e->getMessage() . "\n"; 26} 27 28try { 29 $num / $other; 30} catch (Error $e) { 31 echo $e->getMessage() . "\n"; 32} 33 34try { 35 $num % $other; 36} catch (Error $e) { 37 echo $e->getMessage() . "\n"; 38} 39 40try { 41 $num ** $other; 42} catch (Error $e) { 43 echo $e->getMessage() . "\n"; 44} 45?> 46--EXPECT-- 47Unsupported operand types: BcMath\Number + stdClass 48Unsupported operand types: BcMath\Number - stdClass 49Unsupported operand types: BcMath\Number * stdClass 50Unsupported operand types: BcMath\Number / stdClass 51Unsupported operand types: BcMath\Number % stdClass 52Unsupported operand types: BcMath\Number ** stdClass 53