1. In PHP, if the variable value is a class name, you can directly new the variable, which is equivalent to the new class
$obj = new $class_name($aff_id,$this);
2. Traditional writing method
$obj = new LinkFeed($aff_id,$this);
Recommended tutorial: PHP video tutorial
The above is the detailed content of How to create a new object in php. For more information, please follow other related articles on the PHP Chinese website!