Answer the question
In order to leave comments, you need to log in
How to access a property of a PHP object?
Please tell me, some unexpected problem arose:
$db = new DB\Mongo('mongodb://localhost:27017', 'test');
$sessions = new DB\Mongo\Mapper($db,'sessions');
$sessionsList = $sessions->find(array("sid"=>$sid));
var_dump($sessionsList[0]->expired);
object(MongoDate)#17 (2) {
["sec"]=>
int(1438577420)
["usec"]=>
int(0)
}
$sec = $sessionsList[0]->expired;
var_dump($sec);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question