3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo (new DateTime())->format('Ymd His'); echo "\n"; echo (new DateTime('now +300s'))->format('Ymd His');
based on o5gvj
Output for 5.6.28, 7.0.20 - 7.2.0
20151229 013211 20151229 013211
Output for 7.0.6
20160521 130753 20160521 130753
Output for 7.0.5
20160403 091135 20160403 091135
Output for 7.0.4
20160310 211732 20160310 211732
Output for 7.0.3
20160318 223938 20160318 223938
Output for 7.0.2
20160323 045305 20160323 045305
Output for 7.0.1
20160324 080147 20160324 080147
Output for 7.0.0
20160327 095508 20160327 095508
Output for 5.6.21
20160502 160405 20160502 160405
Output for 5.6.20
20160410 081323 20160410 081323
Output for 5.6.19
20160308 052502 20160308 052502
Output for 5.6.18
20160315 142101 20160315 142101
Output for 5.6.17
20160320 015309 20160320 015309
Output for 5.6.16
20160328 104439 20160328 104439
Output for 5.6.15
20160329 113338 20160329 113338
Output for 5.6.14
20160414 171601 20160414 171601
Output for 5.6.13
20160415 175459 20160415 175459
Output for 5.6.12
20160420 082403 20160420 082403
Output for 5.6.11
20160424 144945 20160424 144945
Output for 5.6.10
20160425 165524 20160425 165524
Output for 5.6.9
20160427 221247 20160427 221247
Output for 5.6.8
20160430 065223 20160430 065223
Output for 5.5.35
20160523 013933 20160523 013933
Output for 5.5.34
20160411 102656 20160411 102656
Output for 5.5.33
20160309 082410 20160309 082410
Output for 5.5.32
20160317 181658 20160317 181658
Output for 5.5.31
20160321 050143 20160321 050143
Output for 5.5.30
20160401 132604 20160401 132604
Output for 5.5.29
20160417 081256 20160417 081256
Output for 5.5.28
20160421 114218 20160421 114218
Output for 5.5.27
20160422 132142 20160422 132142
Output for 5.5.26
20160426 193602 20160426 193602
Output for 5.5.25
20160429 030012 20160429 030012
Output for 5.5.24
20160524 164955 20160524 164955
Output for 5.4.44 - 5.4.45
20151229 013215 20151229 013215
Output for 5.4.42 - 5.4.43
20151229 013217 20151229 013217
Output for 5.4.40 - 5.4.41
20151229 013218 20151229 013218
Output for 5.4.38 - 5.4.39
20151229 013219 20151229 013219
Output for 5.4.35 - 5.4.37
20151229 013220 20151229 013220
Output for 5.4.34
20151229 013221 20151229 013221
Output for 5.4.29 - 5.4.32
20151229 013222 20151229 013222
Output for 5.4.25 - 5.4.28
20151229 013223 20151229 013223
Output for 5.4.23 - 5.4.24
20151229 013224 20151229 013224
Output for 5.4.19 - 5.4.22
20151229 013225 20151229 013225
Output for 5.4.16 - 5.4.18
20151229 013226 20151229 013226
Output for 5.4.12 - 5.4.15
20151229 013227 20151229 013227
Output for 5.4.11
20151229 013228 20151229 013228
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR, expecting ',' or ';' in /in/Ph3Rf on line 2
Process exited with code 255.