3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $expire = new DateTime('now'); $expire->add(new DateInterval('P01Y')); // Support sold seperately has 1 year expire time print $expire->getTimestamp();
based on KZUV8
Output for 7.0.14 - 7.1.0
1438452266
Output for 7.0.6
1493825504
Output for 7.0.5
1491191989
Output for 7.0.4
1489164102
Output for 7.0.3
1489858184
Output for 7.0.2
1490226754
Output for 7.0.1
1490326835
Output for 7.0.0
1490589436
Output for hhvm-3.12.0
1489376550
Output for hhvm-3.10.0
1490911438
Output for 5.6.21
1493721709
Output for 5.6.20
1491793111
Output for 5.6.19
1488934265
Output for 5.6.18
1489569916
Output for 5.6.17
1489958125
Output for 5.6.16
1490678671
Output for 5.6.15
1490768135
Output for 5.6.14
1491120600
Output for 5.6.13
1492259420
Output for 5.6.12
1492657083
Output for 5.6.11
1493025185
Output for 5.6.10
1493119435
Output for 5.6.9
1493310779
Output for 5.6.8
1493515542
Output for 5.5.35
1495471738
Output for 5.5.34
1491887515
Output for 5.5.33
1489030151
Output for 5.5.32
1489756048
Output for 5.5.31
1490055142
Output for 5.5.30
1491034138
Output for 5.5.29
1492397696
Output for 5.5.28
1492755040
Output for 5.5.27
1492848065
Output for 5.5.26
1493215566
Output for 5.5.25
1493413018
Output for 5.5.24
1495596914
Output for 5.4.45
1473459076
Output for 5.4.44
1472503221
Output for 5.4.43
1472503218
Output for 5.4.42
1472503217
Output for 5.4.41
1465303432
Output for 5.4.39 - 5.4.40
1463210551
Output for 5.4.38
1456618540
Output for 5.4.36 - 5.4.37
1454548376
Output for 5.4.35
1447508918
Output for 5.4.34
1447461675
Output for 5.4.32
1440769529
Output for 5.4.13 - 5.4.31
1438452271
Output for 5.3.20 - 5.3.28, 5.4.0 - 5.4.12
1438452272
Output for 5.3.29
1440769528
Output for 5.3.0 - 5.3.19
1438452273
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::add() in /in/9RMJl on line 4
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/9RMJl on line 3
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/9RMJl on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/9RMJl on line 3