I’m a newbie using a book to learn the Yii php framework. It has this line of code and the book explains that they have taken the time to format the date for better readability
$lastLogin = strtotime($user->last_login_time);
However, from looking at the manual, I thought that the output of strtotime is a unix timestamp. If that’s correct, how could that be better readability?
Am I missing something?
You are correct.
Their stance on readability is that the time is stored internally as readable.
Go on and try
print_r($user);and see what happens 🙂