mirror of
https://github.com/php/php-src.git
synced 2026-04-29 03:03:26 +02:00
23 lines
369 B
PHP
23 lines
369 B
PHP
--TEST--
|
|
GH-15968 BCMath\Number operators may typecast operand
|
|
--EXTENSIONS--
|
|
bcmath
|
|
--FILE--
|
|
<?php
|
|
class MyString {
|
|
function __toString() {
|
|
return "2";
|
|
}
|
|
}
|
|
|
|
$a = new BCMath\Number("1");
|
|
$b = new MyString();
|
|
try {
|
|
var_dump($a + $b);
|
|
} catch (Error $e) {
|
|
echo $e->getMessage();
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Unsupported operand types: BcMath\Number + MyString
|