new operator and reference error

后端 未结 3 1812
陌清茗
陌清茗 2021-01-28 09:50
 $class_name = \'MDB2_Statement_\'.$this->phptype;
        $statement = null;
        $obj =& new $class_name($this, $statement, $positions, $query, $types, $resu         


        
3条回答
  •  北海茫月
    2021-01-28 10:01

    The only thing PHP is complaining about is this:

    $obj =& new $class_name...
          ^
    

    You do not need and should not use assignment by reference anymore, since objects are always references in PHP 5. Just get rid of the &, and that's it.

提交回复
热议问题