3v4l.org

run code in 300+ PHP versions simultaneously
<?php $today = new DateTime(); $today->setTime(0,0,48); $issued = new DateTime(); $issued->setTime(0,0,0); $issued->sub(new DateInterval('P1D')); $diff = $issued->diff($today); /* $voidable */ /* $voidable */ echo "<pre>"; print_r($today); print_r($issued); var_dump($diff); echo "</pre>"; var_dump(($today->format('Y-m-d') == $issued->format('Y-m-d')) or ($diff->d == 1 and $diff->h < 3));
Output for git.master, git.master_jit, rfc.property-hooks
<pre>DateTime Object ( [date] => 2014-07-04 00:00:48.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) DateTime Object ( [date] => 2014-07-03 00:00:00.000000 [timezone_type] => 3 [timezone] => Europe/Amsterdam ) object(DateInterval)#3 (10) { ["y"]=> int(0) ["m"]=> int(0) ["d"]=> int(1) ["h"]=> int(0) ["i"]=> int(0) ["s"]=> int(48) ["f"]=> float(0) ["invert"]=> int(0) ["days"]=> int(1) ["from_string"]=> bool(false) } </pre>bool(true)

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:
40.44 ms | 402 KiB | 8 Q