I get the following error Creating default object from empty value...
each time I attempt to add a nested object.
class api {
private $authentication=null;
private $status=null;
private $response=null;
public function __construct($user, $token) {
$this->status->version=2.3;
$this->authentication->user=$user;
$this->authentication->token=$token;
}
}
How can I accomplish this exact thing without getting this error?
I don't want to use arrays for this particular thing.