Difference of two Dates in Computed Field fields: (Date to - Date from) = Total Number of Days

How can I compute the total number of days between two dates using Computed Field?
Here is a sample snippet (to be used in Computed Code PHP Block inside of a computed field)

$food_date_value = array_pop(field_get_items($entity_type, $entity, 'field_food_date'));
$food_date = new DateObject($food_date_value['value'], '');
$current_date = new DateObject('now', '', 'm/d/Y');
$entity_field[0]['value'] =$food_date-&gt;difference($current_date, 'days');


field_food_date is a date in the Unix Timestamp format (another field in my content type). DateObject can then be used for doing any date calculations.