3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $datetime1 = new DateTime(); $datetime2 = new DateTime('2014-01-2 20:24:55'); $interval = $datetime1->diff($datetime2); echo $interval->days
Output for 5.4.0 - 5.4.24
Parse error: syntax error, unexpected end of file, expecting ',' or ';' in /in/XSQdW on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected $end, expecting ',' or ';' in /in/XSQdW on line 5
Process exited with code 255.