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($now->sub(date_interval_create_from_date_string('3286 days 9 hours 15 minutes 43 seconds'))); 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
DateTime Object ( [date] => 2004-11-26 23:59:59.000000 [timezone_type] => 3 [timezone] => 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:
43.13 ms | 401 KiB | 8 Q