3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start_time = "2017-03-20 16:30:00"; $start_mid_night = date_create_from_format("Y-m-d",explode(" ",$start_time)[0]); var_dump($start_mid_night,explode($start_time," ")[0]); $end_time = "2017-03-22 16:00:00"; $diff = strtotime(str_replace('-','/',$end_time)) - strtotime(str_replace('-','/',$start_time)); print_r( ceil(($diff)/(24*60*60)) ); echo PHP_EOL; print_r( (($diff)/(24*60*60)) );
Output for git.master, git.master_jit, rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2017-03-20 12:13:36.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } string(1) " " 2 1.9791666666667

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
56.79 ms | 401 KiB | 8 Q