3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date = new DateTime('2013-01-31'); $date->modify('end of month')->modify('+ 2 days')->modify('end of month'); echo $date->format('Y-m-d');
Output for 7.0.0 - 7.1.0
Warning: DateTime::modify(): Failed to parse time string (end of month) at position 0 (e): The timezone could not be found in the database in /in/kBq9I on line 3 Fatal error: Uncaught Error: Call to a member function modify() on boolean in /in/kBq9I:3 Stack trace: #0 {main} thrown in /in/kBq9I on line 3
Process exited with code 255.
Output for hhvm-3.12.0
Warning: DateTime::modify(): Failed to parse time string (end of month) at position 0 (e): The timezone could not be found in the database in /in/kBq9I on line 3 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function modify() on a non-object (boolean)' in /in/kBq9I:3 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
2013-02-02
Output for 5.6.7 - 5.6.28
Warning: DateTime::modify(): Failed to parse time string (end of month) at position 0 (e): The timezone could not be found in the database in /in/kBq9I on line 3 Fatal error: Call to a member function modify() on boolean in /in/kBq9I on line 3
Process exited with code 255.
Output for 5.2.14 - 5.5.35
Warning: DateTime::modify(): Failed to parse time string (end of month) at position 0 (e): The timezone could not be found in the database in /in/kBq9I on line 3 Fatal error: Call to a member function modify() on a non-object in /in/kBq9I on line 3
Process exited with code 255.