3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = '2017-2-1'; $start = \DateTime::createFromFormat('Y-m-d', $n); $end = new \DateTime($n . ' 1 month - 1 second'); $b = new \DateTime('2017-1-12'); var_dump($start->format('Y.M.d')); var_dump($end->format('Y.M.d')); var_dump($end->diff($b));
Output for git.master, git.master_jit, rfc.property-hooks
string(11) "2017.Feb.01" string(11) "2017.Feb.28" object(DateInterval)#4 (10) { ["y"]=> int(0) ["m"]=> int(1) ["d"]=> int(16) ["h"]=> int(23) ["i"]=> int(59) ["s"]=> int(59) ["f"]=> float(0) ["invert"]=> int(1) ["days"]=> int(47) ["from_string"]=> bool(false) }

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