3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $now = new DateTime('now'); $date = DateTime::createFromFormat('YmdHis', '2004' . $now->format('md') . '235959'); print($now, $date); die; $diff = $date->diff($now, true); printf( 'Got %s and expected %s', $now->sub($diff)->format(DateTime::ISO8601), $date->format(DateTime::ISO8601) );
Output for 5.3.0 - 5.3.4, 5.3.6 - 5.4.22
Parse error: syntax error, unexpected ',' in /in/pHulJ on line 6
Process exited with code 255.
Output for 5.3.5

Process exited with code 143.