3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $lead = array('date_created' => '04/07/23'); $date = DateTime::createFromFormat('y/m/d', $lead['date_created']); echo $date->format('Y-m-d H-i');
Output for 5.3.0 - 5.3.28, 5.4.0 - 5.4.29, 5.6.28, 7.0.14 - 7.1.0
2004-07-23 13-02
Output for 7.0.6
2004-07-23 16-07
Output for 7.0.5
2004-07-23 04-40
Output for 7.0.4
2004-07-23 16-12
Output for 7.0.3
2004-07-23 16-53
Output for 7.0.2
2004-07-23 23-00
Output for 7.0.1
2004-07-23 03-16
Output for 7.0.0
2004-07-23 05-13
Output for 5.6.21
2004-07-23 11-18
Output for 5.6.20
2004-07-23 03-37
Output for 5.6.19
2004-07-23 23-53
Output for 5.6.18
2004-07-23 08-50
Output for 5.6.17
2004-07-23 20-44
Output for 5.6.16
2004-07-23 06-01
Output for 5.6.15
2004-07-23 06-53
Output for 5.6.14
2004-07-23 08-52
Output for 5.6.13
2004-07-23 13-07
Output for 5.6.12
2004-07-23 03-30
Output for 5.6.11
2004-07-23 10-02
Output for 5.6.10
2004-07-23 11-56
Output for 5.6.9
2004-07-23 17-04
Output for 5.6.8
2004-07-23 01-44
Output for 5.5.35
2004-07-23 16-14
Output for 5.5.34
2004-07-23 05-51
Output for 5.5.33
2004-07-23 02-59
Output for 5.5.32
2004-07-23 12-30
Output for 5.5.31
2004-07-23 23-29
Output for 5.5.30
2004-07-23 08-46
Output for 5.5.29
2004-07-23 03-28
Output for 5.5.28
2004-07-23 06-41
Output for 5.5.27
2004-07-23 08-39
Output for 5.5.26
2004-07-23 14-37
Output for 5.5.25
2004-07-23 21-24
Output for 5.5.24
2004-07-23 04-12
Output for 5.4.39 - 5.4.45
2004-07-23 13-04
Output for 5.4.34 - 5.4.38
2004-07-23 00-49
Output for 5.3.29, 5.4.30 - 5.4.32
2004-07-23 19-22
Output for 5.2.10 - 5.2.17
Fatal error: Call to undefined method DateTime::createFromFormat() in /in/F3mEk on line 5
Process exited with code 255.
Output for 5.2.0 - 5.2.9
Fatal error: Call to undefined method DateTime::createfromformat() in /in/F3mEk on line 5
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/F3mEk on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Undefined class name 'datetime' in /in/F3mEk on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Undefined class name 'datetime' in /in/F3mEk on line 5