php-src/ext/reflection/tests/bug53366.phpt
Christoph M. Becker dabc28d182 Fix #78880: Spelling error report
We fix the most often occuring typos according to a recent codespell
report[1] in tests, code comments and documentation.

[1] <https://fossies.org/linux/test/php-src-master-f8f48ce.191129.tar.gz/codespell.html>.
2019-12-21 11:58:00 +01:00

26 lines
446 B
PHP

--TEST--
Bug #53366 (Reflection doesn't get dynamic property value from getProperty())
--FILE--
<?php
class UserClass {
}
$myClass = new UserClass;
$myClass->id = 1000;
$reflect = new ReflectionObject($myClass);
var_dump($reflect->getProperty('id'));
var_dump($reflect->getProperty('id')->getValue($myClass));
?>
--EXPECTF--
object(ReflectionProperty)#%d (2) {
["name"]=>
string(2) "id"
["class"]=>
string(9) "UserClass"
}
int(1000)