<?php class Person { public $name; public $sex; public function __construct($name,$sex=1) { $this->name = $name; $this->sex = $sex; } public function getName() { return $this->name; } } $reflect = new ReflectionClass('Person'); $constructor = $reflect->getConstructor (); $res = $reflect->newInstanceArgs(['name'=>'wang']) ; var_dump($res->getName()); ?>