I don't know what PHP version you're using, but that code is invalid.
There is no date literal syntax.
This'll work in most newer versions:
PHP Code:
$timein = strtotime('09:10:00');
$timeout = strtotime('22:20:00');
$workhrs = strftime('%I:%M:%S', $timeout - $timein);
echo $workhrs;
Note that PHP versions 5.1.0 and above running in strict standards mode will throw a warning if no default time zone is set before using any of the date/time functions. You can set this in php.ini, or using the
date_default_timezone_set function.