How can timestamps be converted and manipulated effectively in PHP to calculate time spans accurately?

When working with timestamps in PHP, it's important to use the correct functions to convert and manipulate them accurately. One common approach is to use the `strtotime()` function to convert date/time strings into timestamps, and then use functions like `date_diff()` or `strtotime()` again to calculate time spans between two timestamps.

// Example: Convert date/time strings to timestamps and calculate time span
$startTime = strtotime('2022-01-01 12:00:00');
$endTime = strtotime('2022-01-01 14:30:00');

// Calculate time span in seconds
$timeSpan = $endTime - $startTime;

// Convert time span to hours and minutes
$hours = floor($timeSpan / 3600);
$minutes = ($timeSpan % 3600) / 60;

echo "Time span: $hours hours $minutes minutes";