No, this isn't correct. For error handling, the strtotime is a tricky beast.
strtotime will return false as of 5.1.0, and prior it will return -1. -1 is not ideal since it is technically a valid timestamp, so you need to check that its return time and compare it to the version before continuing.
PHP Code:
$timestamp = strtotime($lastActivity);
if ($timestamp !== false)
{
// so far its okay
if ($timestamp == -1 && version_compare(PHP_VERSION, '5.1.0') < 0)
{
// this one is no good, so respond accordingly.
}
else
{
// all conditions are good
}
}
else
{
// no good
}
Instead you could use the DateTime class which you can try/catch. Although if you don't care about a specific version of PHP, then strtotime is fine as well and just check it for false.
Move the doc comment before the function signature otherwise it won't be a part of the reflection. Also don't call the parameter DateTime as that would indicate it is a DateTime object and an IDE may interpret it as such. Call it as it is, a string.