1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 09:42:22 +01:00
Files
archived-php-src/ext/reflection/tests/bug39001.phpt
Gabriel Caruso ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00

28 lines
502 B
PHP

--TEST--
Bug #39001 (ReflectionProperty returns incorrect declaring class for protected properties)
--FILE--
<?php
class Meta {
}
class CParent extends Meta {
public $publicVar;
protected $protectedVar;
}
class Child extends CParent {
}
$r = new ReflectionClass('Child');
var_dump($r->getProperty('publicVar')->getDeclaringClass()->getName());
var_dump($r->getProperty('protectedVar')->getDeclaringClass()->getName());
echo "Done\n";
?>
--EXPECT--
string(7) "CParent"
string(7) "CParent"
Done