<?php
class X {
public function toString()
{
echo time();
}
}
$object = new ReflectionClass('X');
// echo $object->getName();
// var_dump($object);
$reflectClass = $object->newInstance();
$reflectClass->toString();
<?php
class X {
public function toString()
{
echo time();
}
}
$object = new ReflectionClass('X');
// echo $object->getName();
// var_dump($object);
$reflectClass = $object->newInstance();
$reflectClass->toString();
本文标题:2019-08-05-反射-ReflectionClass
本文链接:https://www.haomeiwen.com/subject/klmpdctx.html
网友评论