3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dt = new \DateTime(); $dt->add(new DateInterval('PT5M')); var_dump($dt->format('U'));
Output for 5.6.28, 7.0.14 - 7.1.0
string(10) "1380313995"
Output for 7.0.6
string(10) "1462247772"
Output for 7.0.5
string(10) "1459616439"
Output for 7.0.4
string(10) "1457582298"
Output for 7.0.3
string(10) "1458274841"
Output for 7.0.2
string(10) "1458571655"
Output for 7.0.1
string(10) "1458746615"
Output for 7.0.0
string(10) "1459012181"
Output for 5.6.21
string(10) "1462143657"
Output for 5.6.20
string(10) "1460204226"
Output for 5.6.19
string(10) "1457323378"
Output for 5.6.18
string(10) "1457974839"
Output for 5.6.17
string(10) "1458377026"
Output for 5.6.16
string(10) "1459101332"
Output for 5.6.15
string(10) "1459190894"
Output for 5.6.14
string(10) "1459545534"
Output for 5.6.13
string(10) "1460683237"
Output for 5.6.12
string(10) "1461077371"
Output for 5.6.11
string(10) "1461361483"
Output for 5.6.10
string(10) "1461541049"
Output for 5.6.9
string(10) "1461731892"
Output for 5.6.8
string(10) "1461932984"
Output for 5.6.7
string(10) "1464143490"
Output for 5.5.35
string(10) "1463885272"
Output for 5.5.34
string(10) "1460312056"
Output for 5.5.33
string(10) "1457448835"
Output for 5.5.32
string(10) "1458161344"
Output for 5.5.31
string(10) "1458473668"
Output for 5.5.30
string(10) "1459457367"
Output for 5.5.29
string(10) "1460820365"
Output for 5.5.28
string(10) "1461174723"
Output for 5.5.27
string(10) "1461269426"
Output for 5.5.26
string(10) "1461636076"
Output for 5.5.25
string(10) "1461830358"
Output for 5.5.24
string(10) "1464015181"
Output for 5.4.45
string(10) "1442557975"
Output for 5.4.44
string(10) "1440796603"
Output for 5.4.43
string(10) "1440796600"
Output for 5.4.42
string(10) "1440796598"
Output for 5.4.41
string(10) "1440796596"
Output for 5.4.39 - 5.4.40
string(10) "1440796593"
Output for 5.4.38
string(10) "1425394573"
Output for 5.4.35 - 5.4.37
string(10) "1425394566"
Output for 5.4.34
string(10) "1425394565"
Output for 5.4.32
string(10) "1410498130"
Output for 5.4.31
string(10) "1410498126"
Output for 5.3.29, 5.4.29 - 5.4.30
string(10) "1410498124"
Output for 5.3.28, 5.4.22 - 5.4.23, 5.4.28
string(10) "1410498123"
Output for 5.4.27
string(10) "1410498128"
Output for 5.4.24 - 5.4.26
string(10) "1410498127"
Output for 5.4.20 - 5.4.21
string(10) "1410498122"
Output for 5.4.17 - 5.4.19
string(10) "1380313996"
Output for 5.4.6 - 5.4.16
string(10) "1380313997"
Output for 5.3.23 - 5.3.27, 5.4.0 - 5.4.5
string(10) "1380313998"
Output for 5.3.12 - 5.3.22
string(10) "1380313999"
Output for 5.3.0 - 5.3.11
string(10) "1380314000"
Output for 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/VLXRi on line 3 Fatal error: Call to undefined method DateTime::add() in /in/VLXRi on line 5
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/VLXRi on line 3 Fatal error: Class 'DateTime' not found in /in/VLXRi on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/VLXRi on line 3 Fatal error: Cannot instantiate non-existent class: datetime in /in/VLXRi on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/VLXRi on line 3 Fatal error: Cannot instantiate non-existent class: datetime in /in/VLXRi on line 3