PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR

前端 未结 3 1519
长情又很酷
长情又很酷 2020-11-28 10:41

I got this error when debugging my code:

PHP Parse error: syntax error, unexpected T_OBJECT_OPERATOR in order.php on line 72

He

3条回答
  •  孤街浪徒
    2020-11-28 10:58

    change to as your syntax was invalid:

    $purchaseOrder = PurchaseOrderFactory::instance();
    $arrOrderDetails = $purchaseOrder->load($customerName);
    

    where presumably instance() creates an instance of the class. You can do this rather than saying new

提交回复
热议问题