- Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.22
- Parse error: syntax error, unexpected ';' in /in/FHinq on line 7
Process exited with code 255.
<?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 09:15:43'));
die;
printf(
'Got %s and expected %s',
$now->sub($diff)->format(DateTime::ISO8601),
$date->format(DateTime::ISO8601)
);