3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_export((clone new DateTime())->modify('+1 year'));
based on 3JFPV
Output for 7.2.0
DateTime::__set_state(array( 'date' => '2017-01-18 19:32:24.004479', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.1.10
DateTime::__set_state(array( 'date' => '2017-01-18 19:32:24.045183', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.1.7
DateTime::__set_state(array( 'date' => '2017-01-18 19:32:24.002438', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.1.6
DateTime::__set_state(array( 'date' => '2017-01-18 19:32:24.013015', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.1.5
DateTime::__set_state(array( 'date' => '2017-01-18 19:32:24.005664', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.1.0
DateTime::__set_state(array( 'date' => '2017-01-18 19:32:24.004003', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.0.20
DateTime::__set_state(array( 'date' => '2017-01-18 19:32:24.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.0.6
DateTime::__set_state(array( 'date' => '2017-05-21 13:58:47.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.0.5
DateTime::__set_state(array( 'date' => '2017-04-03 09:54:42.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.0.4
DateTime::__set_state(array( 'date' => '2017-03-10 22:02:24.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.0.3
DateTime::__set_state(array( 'date' => '2017-03-18 23:37:01.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.0.2
DateTime::__set_state(array( 'date' => '2017-03-23 05:44:45.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.0.1
DateTime::__set_state(array( 'date' => '2017-03-24 08:47:06.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 7.0.0
DateTime::__set_state(array( 'date' => '2017-03-27 10:39:59.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Amsterdam', ))
Output for 5.4.12 - 5.6.28
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/pevXu on line 3
Process exited with code 255.
Output for 5.3.22 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/pevXu on line 3
Process exited with code 255.