Download src/php/php-src/ext/bcmath/tests/number/properties_unknown.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 598 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/bcmath/tests/number/properties_unknown.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/bcmath/tests/number/properties_unknown.phpt
-
curl -L -o properties_unknown.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/bcmath/tests/number/properties_unknown.phpt
598 Bytes
| --TEST-- | |
| BcMath\Number properties unknown | |
| --EXTENSIONS-- | |
| bcmath | |
| --FILE-- | |
| $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) | |