3v4l.org

run code in 300+ PHP versions simultaneously
<?php // indicate the start date here $startdate = '2010-01-01'; // indicate the end date here $enddate = '2011-05-27'; $timestamp_start = strtotime($startdate); $timestamp_end = strtotime($enddate); $difference = abs($timestamp_end - $timestamp_start); // that's it! echo 'Seconds: '.$difference;

preferences:
31.66 ms | 402 KiB | 5 Q