dis-bench / src /php /php-src /ext /bcmath /tests /number /properties_unknown.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
598 Bytes
--TEST--
BcMath\Number properties unknown
--EXTENSIONS--
bcmath
--FILE--
<?php
$num = new BcMath\Number(1);
var_dump($num->foo);
try {
$num->foo = 1;
} catch (Error $e) {
echo $e->getMessage() . "\n";
}
var_dump($num->foo);
try {
$num->bar = 1;
} catch (Error $e) {
echo $e->getMessage() . "\n";
}
var_dump(isset($num->foo));
?>
--EXPECTF--
Warning: Undefined property: BcMath\Number::$foo in %s
NULL
Cannot create dynamic property BcMath\Number::$foo
Warning: Undefined property: BcMath\Number::$foo in %s
NULL
Cannot create dynamic property BcMath\Number::$bar
bool(false)