3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = new DateTime('2014-01-07', new DateTimeZone('UTC')); $end = clone $start; $start->sub(new DateInterval('P1M')); // substract one month echo $start->format('r').' - '.$end->format('r'); print_r($end->diff($start)); print_r($start->diff($end));
Output for git.master, git.master_jit, rfc.property-hooks
Sat, 07 Dec 2013 00:00:00 +0000 - Tue, 07 Jan 2014 00:00:00 +0000DateInterval Object ( [y] => 0 [m] => 1 [d] => 0 [h] => 0 [i] => 0 [s] => 0 [f] => 0 [invert] => 1 [days] => 31 [from_string] => ) DateInterval Object ( [y] => 0 [m] => 1 [d] => 0 [h] => 0 [i] => 0 [s] => 0 [f] => 0 [invert] => 0 [days] => 31 [from_string] => )

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.76 ms | 402 KiB | 8 Q