3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $foo = '01234567890'; $d1 = \DateTime::createFromFormat('U', $foo); $d2 = \DateTime::createFromFormat('U', (string) $foo); var_dump($d1); var_dump($d2); var_dump($d1->format('U') === $d2->format('U'));
based on idhuh
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.1.0 - 7.3.0alpha1
object(DateTime)#1 (3) { ["date"]=> string(26) "2009-02-13 23:31:30.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+00:00" } object(DateTime)#2 (3) { ["date"]=> string(26) "2009-02-13 23:31:30.000000" ["timezone_type"]=> int(1) ["timezone"]=> string(6) "+00:00" } bool(true)