1--TEST--
2BcMath\Number calc undefined var by operator
3--EXTENSIONS--
4bcmath
5--FILE--
6<?php
7$num = new BcMath\Number(100);
8
9try {
10    $num + $undef;
11} catch (Error $e) {
12    echo $e->getMessage() . "\n";
13}
14
15try {
16    $num - $undef;
17} catch (Error $e) {
18    echo $e->getMessage() . "\n";
19}
20
21try {
22    $num * $undef;
23} catch (Error $e) {
24    echo $e->getMessage() . "\n";
25}
26
27try {
28    $num / $undef;
29} catch (Error $e) {
30    echo $e->getMessage() . "\n";
31}
32
33try {
34    $num % $undef;
35} catch (Error $e) {
36    echo $e->getMessage() . "\n";
37}
38
39try {
40    $num ** $undef;
41} catch (Error $e) {
42    echo $e->getMessage() . "\n";
43}
44?>
45--EXPECTF--
46Warning: Undefined variable $undef in %s
47Unsupported operand types: BcMath\Number + null
48
49Warning: Undefined variable $undef in %s
50Unsupported operand types: BcMath\Number - null
51
52Warning: Undefined variable $undef in %s
53Unsupported operand types: BcMath\Number * null
54
55Warning: Undefined variable $undef in %s
56Unsupported operand types: BcMath\Number / null
57
58Warning: Undefined variable $undef in %s
59Unsupported operand types: BcMath\Number % null
60
61Warning: Undefined variable $undef in %s
62Unsupported operand types: BcMath\Number ** null
63