3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('Europe/Lisbon'); $a = (new \DateTime('26-02-2016 11:06:48'))->format('d-m-Y H:i:s'); echo (new \DateTime())->format('d-m-Y H:i:s'); echo "\n"; echo $a;
based on COEHb
Output for 5.6.28, 7.0.20 - 7.3.0rc3
29-03-2016 10:21:45 26-02-2016 11:06:48
Output for 7.0.6
21-05-2016 17:38:08 26-02-2016 11:06:48
Output for 7.0.5
14-04-2016 14:55:42 26-02-2016 11:06:48
Output for 5.5.31 - 5.5.33, 5.6.17 - 5.6.19, 7.0.3 - 7.0.4
29-03-2016 10:21:46 26-02-2016 11:06:48
Output for 5.6.15 - 5.6.16, 7.0.0 - 7.0.2
29-03-2016 10:21:47 26-02-2016 11:06:48
Output for 5.6.21
02-05-2016 19:53:33 26-02-2016 11:06:48
Output for 5.6.20
10-04-2016 11:53:29 26-02-2016 11:06:48
Output for 5.5.29 - 5.5.30, 5.6.12 - 5.6.14
29-03-2016 10:21:48 26-02-2016 11:06:48
Output for 5.5.25 - 5.5.28, 5.6.9 - 5.6.11
29-03-2016 10:21:49 26-02-2016 11:06:48
Output for 5.5.19 - 5.5.24, 5.6.3 - 5.6.8
29-03-2016 10:21:50 26-02-2016 11:06:48
Output for 5.5.9 - 5.5.18, 5.6.0 - 5.6.2
29-03-2016 10:21:51 26-02-2016 11:06:48
Output for 5.5.35
23-05-2016 08:37:23 26-02-2016 11:06:48
Output for 5.5.34
11-04-2016 14:09:56 26-02-2016 11:06:48
Output for 5.5.0 - 5.5.8
29-03-2016 10:21:52 26-02-2016 11:06:48