PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
A period of time (eg 2 hours) is not a date. So you can't use the date functions with it.
If you have two timestamps however you can simply subtract the smaller one from the bigger one to get the number of seconds difference, and once you have that it's pretty easy to convert seconds into other time values. For example, divide by 60 for minutes, by 3600 for hours, by 86400 for days and so on.
You'll need to do a bit of coding if you want a mixed format (eg hours, minutes and seconds).