<?php

define( 'MINUTE_IN_SECONDS', 60 );
define( 'HOUR_IN_SECONDS',   60 * MINUTE_IN_SECONDS );
define( 'DAY_IN_SECONDS',    24 * HOUR_IN_SECONDS   );
define( 'WEEK_IN_SECONDS',    7 * DAY_IN_SECONDS    );
define( 'YEAR_IN_SECONDS',  365 * DAY_IN_SECONDS    );

function current_time($type, $gmt = 0){
	switch($type){
		case 'mysql':
			return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( null * HOUR_IN_SECONDS ) ) );
		case 'timestamp':
			return ( $gmt ) ? time() : time() + ( null * HOUR_IN_SECONDS );
	}
}

$diff = strtotime('2014-10-10 14:49:33') - strtotime(current_time('mysql'));
$hours = $diff / (60 * 60);

echo 'Expected: ';
echo $hours;

echo PHP_EOL;

$diff = strtotime('2014-10-10 14:49:33') - strtotime(current_time('Y-m-d H:i:s'));
$hours = $diff / (60 * 60);

echo 'Received: ';
echo $hours;