3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = strtotime('2015-10-28T08:22:20.458Z'); //$date = new \DateTime(); //$date->setTimestamp($time); $date = new \DateTime::createFromFormat('U.u', $timestamp); echo $date->format('Y-m-d H:i:s.u');
Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.30, 5.6.8 - 5.6.14
Parse error: syntax error, unexpected 'createFromFormat' (T_STRING), expecting variable (T_VARIABLE) or '$' in /in/A2Fth on line 7
Process exited with code 255.

preferences:
183.23 ms | 1400 KiB | 66 Q