3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set("Europe/London"); $dt = new DateTime("first day of this month"); var_dump($dt); $dt->modify("-5 month"); var_dump($dt); echo date('m/Y', strtotime("-5 month", strtotime("first day of this month")));
Output for git.master
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-07-01 21:37:09.003682" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/London" } object(DateTime)#1 (3) { ["date"]=> string(26) "2014-02-01 21:37:09.003682" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/London" } 02/2014
Output for git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-07-01 21:37:09.003768" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/London" } object(DateTime)#1 (3) { ["date"]=> string(26) "2014-02-01 21:37:09.003768" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/London" } 02/2014
Output for rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2014-07-01 21:37:09.003729" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/London" } object(DateTime)#1 (3) { ["date"]=> string(26) "2014-02-01 21:37:09.003729" ["timezone_type"]=> int(3) ["timezone"]=> string(13) "Europe/London" } 02/2014

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:
38.87 ms | 401 KiB | 8 Q