3v4l.org

run code in 300+ PHP versions simultaneously
<?php $now = unserialize('O:8:"DateTime":3:{s:4:"date";s:19:"2013-11-26 09:15:42";s:13:"timezone_type";i:3;s:8:"timezone";s:16:"Europe/Amsterdam";}'); $date = DateTime::createFromFormat('YmdHis', '2004' . $now->format('md') . '235959'); $diff = $date->diff($now, true); print_r($diff); die; printf( 'Got %s and expected %s', $now->sub($diff)->format(DateTime::ISO8601), $date->format(DateTime::ISO8601) );
Output for git.master, git.master_jit, rfc.property-hooks
DateInterval Object ( [y] => 8 [m] => 11 [d] => 30 [h] => 9 [i] => 15 [s] => 43 [f] => 0 [invert] => 0 [days] => 3286 [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:
36.33 ms | 401 KiB | 8 Q