mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Update to PHP-Parser 5.5.0 and add support for attributes on constants in stubs. For now, I have only migrated over E_STRICT, once the support is in place I'll do a larger migration of the existing deprecated constants. In the process, fix the logic in `copy_zend_constant()` for copying attributes when a constant is copied; just increase the reference count for the attributes table rather than trying to duplicate the contents.
18 lines
325 B
PHP
18 lines
325 B
PHP
--TEST--
|
|
ReflectionConstant::getAttributes() with attribute (internal constant)
|
|
--FILE--
|
|
<?php
|
|
|
|
$reflectionConstant = new ReflectionConstant('E_STRICT');
|
|
var_dump($reflectionConstant->getAttributes());
|
|
|
|
?>
|
|
--EXPECTF--
|
|
array(1) {
|
|
[0]=>
|
|
object(ReflectionAttribute)#%d (1) {
|
|
["name"]=>
|
|
string(10) "Deprecated"
|
|
}
|
|
}
|