3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dataTime = '2016-01-22 15:07:23'; $lastJobDateTime = DateTime::createFromFormat('Y-m-d H:i:s', $dataTime); $lastJobDate = DateTime::createFromFormat('Y-m-d', $lastJobDateTime->format('Y-m-d')); echo $lastJobDateTime->format('Y-m-d H:i:s')." "; echo $lastJobDate->format('Y-m-d H:i:s');
based on JBj3Y
Output for 5.6.28, 7.0.20 - 7.2.0
2016-01-22 15:07:23 2016-01-22 21:29:51
Output for 7.0.6
2016-01-22 15:07:23 2016-01-22 14:20:35
Output for 7.0.5
2016-01-22 15:07:23 2016-01-22 10:13:01
Output for 7.0.4
2016-01-22 15:07:23 2016-01-22 22:21:45
Output for 7.0.3
2016-01-22 15:07:23 2016-01-22 23:57:31
Output for 7.0.2
2016-01-22 15:07:23 2016-01-22 06:04:36
Output for 7.0.1
2016-01-22 15:07:23 2016-01-22 09:06:39
Output for 7.0.0
2016-01-22 15:07:23 2016-01-22 10:57:50
Output for 5.6.21
2016-01-22 15:07:23 2016-01-22 17:08:03
Output for 5.6.20
2016-01-22 15:07:23 2016-01-22 09:15:02
Output for 5.6.19
2016-01-22 15:07:23 2016-01-22 06:31:07
Output for 5.6.18
2016-01-22 15:07:23 2016-01-22 15:31:28
Output for 5.6.17
2016-01-22 15:07:23 2016-01-22 03:09:31
Output for 5.6.16
2016-01-22 15:07:23 2016-01-22 11:47:38
Output for 5.6.15
2016-01-22 15:07:23 2016-01-22 12:37:25
Output for 5.6.14
2016-01-22 15:07:23 2016-01-22 18:20:23
Output for 5.6.13
2016-01-22 15:07:23 2016-01-22 18:59:27
Output for 5.6.12
2016-01-22 15:07:23 2016-01-22 09:30:35
Output for 5.6.11
2016-01-22 15:07:23 2016-01-22 15:56:34
Output for 5.6.10
2016-01-22 15:07:23 2016-01-22 18:01:56
Output for 5.6.9
2016-01-22 15:07:23 2016-01-22 23:30:55
Output for 5.6.8
2016-01-22 15:07:23 2016-01-22 07:56:51
Output for 5.5.35
2016-01-22 15:07:23 2016-01-22 03:22:49
Output for 5.5.34
2016-01-22 15:07:23 2016-01-22 11:29:28
Output for 5.5.33
2016-01-22 15:07:23 2016-01-22 09:36:26
Output for 5.5.32
2016-01-22 15:07:23 2016-01-22 19:31:46
Output for 5.5.31
2016-01-22 15:07:23 2016-01-22 06:19:18
Output for 5.5.30
2016-01-22 15:07:23 2016-01-22 14:28:18
Output for 5.5.29
2016-01-22 15:07:23 2016-01-22 09:16:43
Output for 5.5.28
2016-01-22 15:07:23 2016-01-22 12:50:44
Output for 5.5.27
2016-01-22 15:07:23 2016-01-22 14:26:54
Output for 5.5.26
2016-01-22 15:07:23 2016-01-22 20:44:05
Output for 5.5.25
2016-01-22 15:07:23 2016-01-22 04:11:52
Output for 5.5.24
2016-01-22 15:07:23 2016-01-22 10:42:22
Output for 5.4.45
2016-01-22 15:07:23 2016-01-22 21:29:53
Output for 5.4.44
2016-01-22 15:07:23 2016-01-22 21:29:54
Output for 5.4.41 - 5.4.43
2016-01-22 15:07:23 2016-01-22 21:29:55
Output for 5.4.40
2016-01-22 15:07:23 2016-01-22 21:29:56
Output for 5.4.38 - 5.4.39
2016-01-22 15:07:23 2016-01-22 21:29:57
Output for 5.4.36 - 5.4.37
2016-01-22 15:07:23 2016-01-22 21:29:58
Output for 5.4.34 - 5.4.35
2016-01-22 15:07:23 2016-01-22 21:29:59
Output for 5.3.29, 5.4.30 - 5.4.32
2016-01-22 15:07:23 2016-01-22 21:30:00
Output for 5.4.27 - 5.4.29
2016-01-22 15:07:23 2016-01-22 21:30:01
Output for 5.4.25 - 5.4.26
2016-01-22 15:07:23 2016-01-22 21:30:02
Output for 5.3.28, 5.4.22 - 5.4.24
2016-01-22 15:07:23 2016-01-22 21:30:03
Output for 5.4.18 - 5.4.21
2016-01-22 15:07:23 2016-01-22 21:30:04
Output for 5.3.26 - 5.3.27, 5.4.16 - 5.4.17
2016-01-22 15:07:23 2016-01-22 21:30:05
Output for 5.3.22 - 5.3.25, 5.4.12 - 5.4.15
2016-01-22 15:07:23 2016-01-22 21:30:06