3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $date_test = '13-10-31'; $date = datetime::createFromFormat('Y-m-d', $date_test); echo $date->format('d-m-Y'), PHP_EOL, $date->format('U');
Output for 7.1.0RC3 - 7.1.0
31-10-0013 -61730668890
Output for 7.0.6
31-10-0013 -61730664389
Output for 7.0.5
31-10-0013 -61730705905
Output for 7.0.4
31-10-0013 -61730663786
Output for 7.0.3
31-10-0013 -61730660901
Output for 7.0.2
31-10-0013 -61730724325
Output for 7.0.1
31-10-0013 -61730710655
Output for 7.0.0
31-10-0013 -61730703656
Output for hhvm-3.12.0
31-10-0013 -61730709711
Output for hhvm-3.10.0
31-10-0013 -61730727211
Output for 5.6.21
31-10-0013 -61730681784
Output for 5.6.20
31-10-0013 -61730709577
Output for 5.6.19
31-10-0013 -61730720811
Output for 5.6.18
31-10-0013 -61730689966
Output for 5.6.17
31-10-0013 -61730647358
Output for 5.6.16
31-10-0013 -61730700818
Output for 5.6.15
31-10-0013 -61730697755
Output for 5.6.14
31-10-0013 -61730690896
Output for 5.6.13
31-10-0013 -61730675275
Output for 5.6.12
31-10-0013 -61730709618
Output for 5.6.11
31-10-0013 -61730687099
Output for 5.6.10
31-10-0013 -61730679255
Output for 5.6.9
31-10-0013 -61730660709
Output for 5.6.8
31-10-0013 -61730715160
Output for 5.5.35
31-10-0013 -61730659725
Output for 5.5.34
31-10-0013 -61730701576
Output for 5.5.33
31-10-0013 -61730711332
Output for 5.5.32
31-10-0013 -61730676629
Output for 5.5.31
31-10-0013 -61730723137
Output for 5.5.30
31-10-0013 -61730690951
Output for 5.5.29
31-10-0013 -61730709797
Output for 5.5.28
31-10-0013 -61730698060
Output for 5.5.27
31-10-0013 -61730691435
Output for 5.5.26
31-10-0013 -61730669532
Output for 5.5.25
31-10-0013 -61730644884
Output for 5.5.24
31-10-0013 -61730707391
Output for 5.4.44 - 5.4.45
31-10-0013 -61730682343
Output for 5.4.42 - 5.4.43
31-10-0013 -61730682342
Output for 5.4.41
31-10-0013 -61730682341
Output for 5.4.39 - 5.4.40
31-10-0013 -61730682340
Output for 5.4.36 - 5.4.38
31-10-0013 -61730682339
Output for 5.4.34 - 5.4.35
31-10-0013 -61730682338
Output for 5.3.29, 5.4.31 - 5.4.32
31-10-0013 -61730682337
Output for 5.4.27 - 5.4.30
31-10-0013 -61730682336
Output for 5.4.23 - 5.4.26
31-10-0013 -61730682335
Output for 5.3.28, 5.4.20 - 5.4.22
31-10-0013 -61730682334
Output for 5.3.27, 5.4.18 - 5.4.19
31-10-0013 -61730682333
Output for 5.3.25 - 5.3.26, 5.4.14 - 5.4.17
31-10-0013 -61730682332
Output for 5.3.20 - 5.3.24, 5.4.11 - 5.4.13
31-10-0013 -61730682331
Output for 5.3.16 - 5.3.19, 5.4.6 - 5.4.10
31-10-0013 -61730682330
Output for 5.3.11 - 5.3.15, 5.4.1 - 5.4.5
31-10-0013 -61730682329
Output for 5.3.5 - 5.3.10, 5.4.0
31-10-0013 -61730682328
Output for 5.3.1 - 5.3.4
31-10-0013 -61730682327
Output for 5.3.0
31-10-0013 -61730682326
Output for 5.2.10 - 5.2.17
Fatal error: Call to undefined method DateTime::createFromFormat() in /in/lc1Zl 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/lc1Zl on line 5
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'datetime' not found in /in/lc1Zl on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Undefined class name 'datetime' in /in/lc1Zl on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Undefined class name 'datetime' in /in/lc1Zl on line 5