3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); $date='1555133436'; $next_date = new DateTime("@$date"); // find out when they can next access the data $next_date->modify('+1 day'); $now = new DateTime(); // now find out how long they must wait $wait = $next_date->diff($now); echo $wait->format("You must wait %h hours and %i minutes to access the data again\n");
Output for 7.1.25, 7.2.0 - 7.2.16, 7.2.29 - 7.2.33, 7.3.16 - 7.3.33, 7.4.4 - 7.4.5, 7.4.7 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.15, 8.5.0
You must wait 21 hours and 25 minutes to access the data again
Output for 7.4.6
You must wait 11 hours and 42 minutes to access the data again
Output for 7.1.26 - 7.1.33, 7.2.17 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0
You must wait 21 hours and 20 minutes to access the data again

preferences:
179.29 ms | 409 KiB | 5 Q