3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo (new DateTime())->format('Ymd His'); echo "\n"; echo (new DateTime())->add(new DateInterval('PT300S'))->format('Ymd His');
based on 28bvU
Output for 5.6.28, 7.0.20 - 7.2.0
20151229 013703 20151229 014203
Output for 7.0.6
20160521 130752 20160521 131252
Output for 7.0.5
20160403 091134 20160403 091634
Output for 7.0.4
20160310 211731 20160310 212231
Output for 7.0.3
20160318 223937 20160318 224437
Output for 7.0.2
20160323 045304 20160323 045804
Output for 7.0.1
20160324 080146 20160324 080646
Output for 7.0.0
20160327 095507 20160327 100007
Output for 5.6.21
20160502 160404 20160502 160904
Output for 5.6.20
20160410 081322 20160410 081822
Output for 5.6.19
20160308 052501 20160308 053001
Output for 5.6.18
20160315 142100 20160315 142600
Output for 5.6.17
20160320 015308 20160320 015808
Output for 5.6.16
20160328 104439 20160328 104939
Output for 5.6.15
20160329 113337 20160329 113837
Output for 5.6.14
20160414 171601 20160414 172101
Output for 5.6.13
20160415 175458 20160415 175958
Output for 5.6.12
20160420 082403 20160420 082903
Output for 5.6.11
20160424 144944 20160424 145444
Output for 5.6.10
20160425 165523 20160425 170023
Output for 5.6.9
20160427 221247 20160427 221747
Output for 5.6.8
20160430 065223 20160430 065723
Output for 5.5.35
20160523 013932 20160523 014432
Output for 5.5.34
20160411 102655 20160411 103155
Output for 5.5.33
20160309 082409 20160309 082909
Output for 5.5.32
20160317 181656 20160317 182156
Output for 5.5.31
20160321 050142 20160321 050642
Output for 5.5.30
20160401 132603 20160401 133103
Output for 5.5.29
20160417 081255 20160417 081755
Output for 5.5.28
20160421 114217 20160421 114717
Output for 5.5.27
20160422 132141 20160422 132641
Output for 5.5.26
20160426 193601 20160426 194101
Output for 5.5.25
20160429 030011 20160429 030511
Output for 5.5.24
20160524 092530 20160524 093030
Output for 5.4.45
20151229 013707 20151229 014207
Output for 5.4.44
20151229 013708 20151229 014208
Output for 5.4.41 - 5.4.43
20151229 013709 20151229 014209
Output for 5.4.40
20151229 013710 20151229 014210
Output for 5.4.38 - 5.4.39
20151229 013711 20151229 014211
Output for 5.4.36 - 5.4.37
20151229 013712 20151229 014212
Output for 5.4.34 - 5.4.35
20151229 013713 20151229 014213
Output for 5.4.31 - 5.4.32
20151229 013714 20151229 014214
Output for 5.4.26 - 5.4.30
20151229 013715 20151229 014215
Output for 5.4.24 - 5.4.25
20151229 013716 20151229 014216
Output for 5.4.21 - 5.4.23
20151229 013717 20151229 014217
Output for 5.4.18 - 5.4.20
20151229 013718 20151229 014218
Output for 5.4.14 - 5.4.17
20151229 013719 20151229 014219
Output for 5.4.11 - 5.4.13
20151229 013720 20151229 014220
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/ibnKl on line 2
Process exited with code 255.