/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/bcmath/tests/number/operators/calc_array.phpt
52 строки
936 B
Saki Takamachi
[RFC] Support object types in BCMath (#13741)
04 сен 2024, 05:12
Не верифицирован
04 сен 2024, 05:12
fad899e
Код
Авторство
О чём код?
--TEST-- BcMath\Number calc array by operator --EXTENSIONS-- bcmath --FILE-- <?php $num = new BcMath\Number(100); $array = [1]; try { $num + $array; } catch (Error $e) { echo $e->getMessage() . "\n"; } try { $num - $array; } catch (Error $e) { echo $e->getMessage() . "\n"; } try { $num * $array; } catch (Error $e) { echo $e->getMessage() . "\n"; } try { $num / $array; } catch (Error $e) { echo $e->getMessage() . "\n"; } try { $num % $array; } catch (Error $e) { echo $e->getMessage() . "\n"; } try { $num ** $array; } catch (Error $e) { echo $e->getMessage() . "\n"; } ?> --EXPECT-- Unsupported operand types: BcMath\Number + array Unsupported operand types: BcMath\Number - array Unsupported operand types: BcMath\Number * array Unsupported operand types: BcMath\Number / array Unsupported operand types: BcMath\Number % array Unsupported operand types: BcMath\Number ** array