diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-21 10:50:29 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-21 10:50:29 +0200 |
| commit | 2bf2cede8933586bb5be2fd77af650a23fcc936e (patch) | |
| tree | d74d8514a9fec89dd8f5ef3f1de616c790085abc /Zend/tests/attributes | |
| parent | 48e9181519c54877e3e5ea7cd8a7653a90402056 (diff) | |
| download | php-git-2bf2cede8933586bb5be2fd77af650a23fcc936e.tar.gz | |
Initialize attributes for internal functions
Fixes a crash in Symfony SecurityBundle tests.
Diffstat (limited to 'Zend/tests/attributes')
| -rw-r--r-- | Zend/tests/attributes/029_reflect_internal_symbols.phpt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Zend/tests/attributes/029_reflect_internal_symbols.phpt b/Zend/tests/attributes/029_reflect_internal_symbols.phpt new file mode 100644 index 0000000000..d4dc29a0bb --- /dev/null +++ b/Zend/tests/attributes/029_reflect_internal_symbols.phpt @@ -0,0 +1,32 @@ +--TEST-- +Reflect attributes on different kinds of internal symbols +--FILE-- +<?php + +$rf = new ReflectionFunction('unserialize'); +var_dump($rf->getAttributes()); + +$rc = new ReflectionClass('DateTime'); +var_dump($rc->getAttributes()); + +$rm = $rc->getMethod('__construct'); +var_dump($rm->getAttributes()); + +$rcc = $rc->getReflectionConstant('ATOM'); +var_dump($rcc->getAttributes()); + +$rp = new ReflectionProperty('Exception', 'message'); +var_dump($rp->getAttributes()); + +?> +--EXPECT-- +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} +array(0) { +} |
