3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $start = (new \DateTime('02 Feb 2014 14:34'))->getTimestamp(); $now = (new \DateTime())->getTimestamp(); var_dump(['start' => $start, 'now' => $now]);
Output for 5.5.0 - 7.1.7, 7.1.9 - 7.3.1
array(2) { ["start"]=> int(1391348040) ["now"]=> int(1446808694) }
Output for 7.1.8
array(2) { ["start"]=> int(1391348040) ["now"]=> int(1446808695) }
Output for 5.4.41 - 5.4.45
array(2) { ["start"]=> int(1391348040) ["now"]=> int(1446808704) }
Output for 5.4.34 - 5.4.40
array(2) { ["start"]=> int(1391348040) ["now"]=> int(1446808705) }
Output for 5.4.26 - 5.4.32
array(2) { ["start"]=> int(1391348040) ["now"]=> int(1446808706) }
Output for 5.4.18 - 5.4.25
array(2) { ["start"]=> int(1391348040) ["now"]=> int(1446808707) }
Output for 5.4.11 - 5.4.17
array(2) { ["start"]=> int(1391348040) ["now"]=> int(1446808708) }
Output for 5.4.3 - 5.4.10
array(2) { ["start"]=> int(1391348040) ["now"]=> int(1446808709) }
Output for 5.4.0 - 5.4.2
array(2) { ["start"]=> int(1391348040) ["now"]=> int(1446808710) }
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/7HI2a on line 3
Process exited with code 255.