3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $collection = array(new \DateTime()); echo $collection[0]->getTimestamp();
Output for 5.6.28, 7.0.14 - 7.1.0
1402057539
Output for 7.0.6
1462245320
Output for 7.0.5
1459614178
Output for 7.0.4
1457579701
Output for 7.0.3
1458272103
Output for 7.0.2
1458568971
Output for 7.0.1
1458744016
Output for 7.0.0
1459009788
Output for 5.6.21
1462141154
Output for 5.6.20
1460201860
Output for 5.6.19
1457319502
Output for 5.6.18
1457972133
Output for 5.6.17
1458374370
Output for 5.6.16
1459098964
Output for 5.6.15
1459188551
Output for 5.6.14
1459543222
Output for 5.6.13
1460680852
Output for 5.6.12
1461074337
Output for 5.6.11
1461359138
Output for 5.6.10
1461537853
Output for 5.6.9
1461729409
Output for 5.6.8
1461930308
Output for 5.6.7
1464136802
Output for 5.5.35
1463882826
Output for 5.5.34
1460309734
Output for 5.5.33
1457446272
Output for 5.5.32
1458158373
Output for 5.5.31
1458471052
Output for 5.5.30
1459455026
Output for 5.5.29
1460817945
Output for 5.5.28
1461172224
Output for 5.5.27
1461267073
Output for 5.5.26
1461633564
Output for 5.5.25
1461827797
Output for 5.5.24
1464012590
Output for 5.4.45
1442019176
Output for 5.4.44
1442019173
Output for 5.4.43
1442019170
Output for 5.4.42
1436372148
Output for 5.4.41
1432614000
Output for 5.4.40
1430543644
Output for 5.4.39
1430543643
Output for 5.4.38
1425157708
Output for 5.4.37
1423126757
Output for 5.4.36
1423126756
Output for 5.4.35
1416109912
Output for 5.4.34
1416109911
Output for 5.4.32
1409784068
Output for 5.4.31
1409784066
Output for 5.4.30
1409784062
Output for 5.4.12 - 5.4.29
1402057541
Output for 5.3.23 - 5.3.28, 5.4.0 - 5.4.11
1402057542
Output for 5.3.29
1409784063
Output for 5.3.3 - 5.3.22
1402057543
Output for 5.3.0 - 5.3.2
1402057544
Output for 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/KsLfO on line 2 Fatal error: Call to undefined method DateTime::getTimestamp() in /in/KsLfO on line 3
Process exited with code 255.
Output for 5.0.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/KsLfO on line 2 Fatal error: Class 'DateTime' not found in /in/KsLfO on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/KsLfO on line 2 Fatal error: Cannot instantiate non-existent class: datetime in /in/KsLfO on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/KsLfO on line 2 Fatal error: Cannot instantiate non-existent class: datetime in /in/KsLfO on line 2