<?php
class A
{
public function call()
{
echo "hello world";
}
}
$ref = new ReflectionClass('A');
$inst = $ref->newInstanceArgs();
$inst->call();
输出: hello world
<?php
class A
{
public function call()
{
echo "hello world";
}
}
$ref = new ReflectionClass('A');
$inst = $ref->newInstanceArgs();
$inst->call();
输出: hello world