3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new DateTimeImmutable('-3 days'); $b = new DateTimeImmutable('now'); var_dump($a->format('Y-m-d H:i:s')); var_dump($b->format('Y-m-d H:i:s'));
Output for 7.0.20 - 7.2.0
string(19) "2015-11-15 11:44:46" string(19) "2015-11-18 11:44:46"
Output for 7.0.6
string(19) "2016-04-30 18:59:18" string(19) "2016-05-03 18:59:18"
Output for 7.0.5
string(19) "2016-03-31 07:23:14" string(19) "2016-04-03 07:23:14"
Output for 7.0.4
string(19) "2016-03-07 19:12:53" string(19) "2016-03-10 19:12:53"
Output for 7.0.3
string(19) "2016-03-15 20:26:13" string(19) "2016-03-18 20:26:13"
Output for 7.0.2
string(19) "2016-03-20 02:33:51" string(19) "2016-03-23 02:33:51"
Output for 7.0.1
string(19) "2016-03-21 06:06:40" string(19) "2016-03-24 06:06:40"
Output for 7.0.0
string(19) "2016-03-24 08:02:12" string(19) "2016-03-27 08:02:12"
Output for 5.6.21
string(19) "2016-04-29 14:08:14" string(19) "2016-05-02 14:08:14"
Output for 5.6.20
string(19) "2016-04-07 06:22:45" string(19) "2016-04-10 06:22:45"
Output for 5.6.19
string(19) "2016-03-05 03:24:16" string(19) "2016-03-08 03:24:16"
Output for 5.6.18
string(19) "2016-03-12 12:11:05" string(19) "2016-03-15 12:11:05"
Output for 5.6.17
string(19) "2016-03-16 23:47:18" string(19) "2016-03-19 23:47:18"
Output for 5.6.16
string(19) "2016-03-25 08:49:27" string(19) "2016-03-28 08:49:27"
Output for 5.6.15
string(19) "2016-03-26 09:40:02" string(19) "2016-03-29 09:40:02"
Output for 5.6.14
string(19) "2016-03-30 11:29:32" string(19) "2016-04-02 11:29:32"
Output for 5.6.13
string(19) "2016-04-12 15:58:03" string(19) "2016-04-15 15:58:03"
Output for 5.6.12
string(19) "2016-04-17 06:26:37" string(19) "2016-04-20 06:26:37"
Output for 5.6.11
string(19) "2016-04-21 12:49:56" string(19) "2016-04-24 12:49:56"
Output for 5.6.10
string(19) "2016-04-22 14:51:41" string(19) "2016-04-25 14:51:41"
Output for 5.6.9
string(19) "2016-04-24 20:01:59" string(19) "2016-04-27 20:01:59"
Output for 5.6.8
string(19) "2016-04-27 04:54:31" string(19) "2016-04-30 04:54:31"
Output for 5.5.35
string(19) "2016-05-19 22:13:08" string(19) "2016-05-22 22:13:08"
Output for 5.5.34
string(19) "2016-04-08 08:34:17" string(19) "2016-04-11 08:34:17"
Output for 5.5.33
string(19) "2016-03-06 06:11:23" string(19) "2016-03-09 06:11:23"
Output for 5.5.32
string(19) "2016-03-14 16:04:05" string(19) "2016-03-17 16:04:05"
Output for 5.5.31
string(19) "2016-03-18 02:50:57" string(19) "2016-03-21 02:50:57"
Output for 5.5.30
string(19) "2016-03-29 11:33:42" string(19) "2016-04-01 11:33:42"
Output for 5.5.29
string(19) "2016-04-14 06:19:26" string(19) "2016-04-17 06:19:26"
Output for 5.5.28
string(19) "2016-04-18 09:40:58" string(19) "2016-04-21 09:40:58"
Output for 5.5.27
string(19) "2016-04-19 11:26:06" string(19) "2016-04-22 11:26:06"
Output for 5.5.26
string(19) "2016-04-23 17:34:50" string(19) "2016-04-26 17:34:50"
Output for 5.5.25
string(19) "2016-04-26 00:33:12" string(19) "2016-04-29 00:33:12"
Output for 5.5.24
string(19) "2016-05-21 06:59:35" string(19) "2016-05-24 06:59:35"
Output for 5.3.19 - 5.4.45
Fatal error: Class 'DateTimeImmutable' not found in /in/YYkDS on line 3
Process exited with code 255.