3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = new DateTime('now'); $date = DateTime::createFromFormat('YmdHis', '2004' . $now->format('md') . '235959'); var_dump($now, $date); die; $diff = $date->diff($now, true); printf( 'Got %s and expected %s', $now->sub($diff)->format(DateTime::ISO8601), $date->format(DateTime::ISO8601) );
Output for git.master
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-11-26 09:13:09.003948" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2004-11-26 23:59:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for git.master_jit
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-11-26 09:13:09.003818" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2004-11-26 23:59:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }
Output for rfc.property-hooks
object(DateTime)#1 (3) { ["date"]=> string(26) "2013-11-26 09:13:09.003776" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" } object(DateTime)#2 (3) { ["date"]=> string(26) "2004-11-26 23:59:59.000000" ["timezone_type"]=> int(3) ["timezone"]=> string(16) "Europe/Amsterdam" }

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.73 ms | 401 KiB | 8 Q