3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date = DateTime::setDate('first day of +3 month'); echo $date->format('d-m-Y');
based on aZWNG
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Non-static method DateTime::setDate() cannot be called statically in /in/Sk3Rl:3 Stack trace: #0 {main} thrown in /in/Sk3Rl on line 3
Process exited with code 255.
Output for hhvm-3.17.3
Fatal error: Uncaught Error: Non-static method DateTime::setDate() cannot be called statically in /in/Sk3Rl:3 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.1 - 3.15.4
Warning: DateTime::setDate() expects exactly 3 parameters, 1 given in /in/Sk3Rl on line 3 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function format() on a non-object (null)' in /in/Sk3Rl:5 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.4.0 - 5.6.30
Fatal error: Non-static method DateTime::setDate() cannot be called statically in /in/Sk3Rl on line 3
Process exited with code 255.