3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tests = array("400 seconds", "400.1 seconds", "400.12 seconds", "400.123 seconds"); foreach ($tests as $index => $test) { var_dump(DateInterval->createFromDateString($test)->format("%Hh, %im, %ss")); var_dump(parse_date($test)); }
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/jbB7k on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/jbB7k on line 5
Process exited with code 255.