3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $dt = new DateTime('2000-01-01 13:12:12.129817'); echo $dt->getTimestamp() * 1000; $date = new DateTime(); echo $date->getTimestamp() * 1000;
Output for 5.6.28, 7.0.14 - 7.1.0
9467287320001394508418000
Output for 7.0.6
9467287320001462234355000
Output for 7.0.5
9467287320001459603667000
Output for 7.0.4
9467287320001457567764000
Output for 7.0.3
9467287320001458259700000
Output for 7.0.2
9467287320001458557005000
Output for 7.0.1
9467287320001458730508000
Output for 7.0.0
9467287320001458998789000
Output for hhvm-3.12.0
9467287320001457670580000
Output for hhvm-3.10.0
9467287320001459272158000
Output for 5.6.21
9467287320001462130095000
Output for 5.6.20
9467287320001460191355000
Output for 5.6.19
9467287320001457302285000
Output for 5.6.18
9467287320001457949116000
Output for 5.6.17
9467287320001458362236000
Output for 5.6.16
9467287320001459087892000
Output for 5.6.15
9467287320001459177507000
Output for 5.6.14
9467287320001459532618000
Output for 5.6.13
9467287320001460669494000
Output for 5.6.12
9467287320001461062390000
Output for 5.6.11
9467287320001461347765000
Output for 5.6.10
9467287320001461526557000
Output for 5.6.9
9467287320001461717905000
Output for 5.6.8
9467287320001461918017000
Output for 5.6.7
9467287320001464116451000
Output for 5.5.35
9467287320001463870115000
Output for 5.5.34
9467287320001460299095000
Output for 5.5.33
9467287320001457434213000
Output for 5.5.32
9467287320001458145853000
Output for 5.5.31
9467287320001458459015000
Output for 5.5.30
9467287320001459443994000
Output for 5.5.29
9467287320001460806696000
Output for 5.5.28
9467287320001461160452000
Output for 5.5.27
9467287320001461256060000
Output for 5.5.26
9467287320001461621197000
Output for 5.5.25
9467287320001461816090000
Output for 5.5.24
9467287320001462015966000
Output for 5.4.45
9467287320001442197386000
Output for 5.4.44
9467287320001442197384000
Output for 5.4.43
9467287320001442197380000
Output for 5.4.42
9467287320001442197379000
Output for 5.4.41
9467287320001442197377000
Output for 5.4.40
9467287320001431270406000
Output for 5.4.39
9467287320001431270405000
Output for 5.4.38
9467287320001425300386000
Output for 5.4.37
9467287320001423385096000
Output for 5.4.34 - 5.4.36
9467287320001423385095000
Output for 5.4.32
9467287320001410074393000
Output for 5.4.31
9467287320001410074389000
Output for 5.3.29, 5.4.29 - 5.4.30
9467287320001410074385000
Output for 5.4.28
9467287320001410074384000
Output for 5.4.27
9467287320001410074390000
Output for 5.4.24 - 5.4.26
9467287320001394508419000
Output for 5.4.5 - 5.4.23
9467287320001394508420000
Output for 5.3.16 - 5.3.28, 5.4.0 - 5.4.4
9467287320001394508421000
Output for 5.3.0 - 5.3.15
9467287320001394508422000
Output for 5.2.0 - 5.2.17
Fatal error: Call to undefined method DateTime::getTimestamp() in /in/1Leg5 on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTime' not found in /in/1Leg5 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetime in /in/1Leg5 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetime in /in/1Leg5 on line 2