Skip to content

Commit b6188b6

Browse files
Add ReflectionProperty::getMangledName()
1 parent c9249e2 commit b6188b6

File tree

6 files changed

+19
-1
lines changed

6 files changed

+19
-1
lines changed

‎NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ PHP NEWS
187187
zval for uninitialized typed properties). (nielsdos)
188188
. Fixed bug GH-15766 (ReflectionClass::toString() should have better output
189189
for enums). (DanielEScherzer)
190+
. Added ReflectionProperty::getMangledName() method. (alexandre-daubois)
190191

191192
- Session:
192193
. session_start() throws a ValueError on option argument if not a hashmap

‎ext/reflection/php_reflection.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5753,6 +5753,17 @@ ZEND_METHOD(ReflectionProperty, getName)
57535753
}
57545754
/* }}} */
57555755

5756+
ZEND_METHOD(ReflectionProperty, getMangledName)
5757+
{
5758+
reflection_object *intern;
5759+
property_reference *ref;
5760+
5761+
ZEND_PARSE_PARAMETERS_NONE();
5762+
5763+
GET_REFLECTION_OBJECT_PTR(ref);
5764+
RETURN_STR_COPY(ref->prop->name);
5765+
}
5766+
57565767
static void _property_check_flag(INTERNAL_FUNCTION_PARAMETERS, int mask) /* {{{ */
57575768
{
57585769
reflection_object *intern;

‎ext/reflection/php_reflection.stub.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,8 @@ public function __toString(): string {}
482482
/** @tentative-return-type */
483483
public function getName(): string {}
484484

485+
public function getMangledName(): string {}
486+
485487
/** @tentative-return-type */
486488
public function getValue(?object $object = null): mixed {}
487489

‎ext/reflection/php_reflection_arginfo.h

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)