3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = strtotime("now"); $b = (new DateTime())->getTimestamp(); echo $a . "\n"; echo $b . "\n"; echo ($a - $b) . "\n";
Output for 5.6.28, 7.0.14 - 7.1.0
1404391490 1404391490 0
Output for 7.0.6
1462285785 1462285785 0
Output for 7.0.5
1459652445 1459652445 0
Output for 7.0.4
1457624168 1457624168 0
Output for 7.0.3
1458317946 1458317946 0
Output for 7.0.2
1458685560 1458685560 0
Output for 7.0.1
1458787111 1458787111 0
Output for 7.0.0
1459049729 1459049729 0
Output for 5.6.21
1462182004 1462182004 0
Output for 5.6.20
1460253514 1460253514 0
Output for 5.6.19
1457392991 1457392991 0
Output for 5.6.18
1458029739 1458029739 0
Output for 5.6.17
1458418098 1458418098 0
Output for 5.6.16
1459139011 1459139011 0
Output for 5.6.15
1459228488 1459228488 0
Output for 5.6.14
1459581136 1459581136 0
Output for 5.6.13
1460719708 1460719708 0
Output for 5.6.12
1461117202 1461117202 0
Output for 5.6.11
1461399900 1461399900 0
Output for 5.6.10
1461579580 1461579580 0
Output for 5.6.9
1461770838 1461770838 0
Output for 5.6.8
1461975107 1461975107 0
Output for 5.5.35
1463929202 1463929202 0
Output for 5.5.34
1460347973 1460347973 0
Output for 5.5.33
1457490240 1457490240 0
Output for 5.5.32
1458215846 1458215846 0
Output for 5.5.31
1458514582 1458514582 0
Output for 5.5.30
1459494514 1459494514 0
Output for 5.5.29
1460857883 1460857883 0
Output for 5.5.28
1461215081 1461215081 0
Output for 5.5.27
1461308431 1461308431 0
Output for 5.5.26
1461675614 1461675614 0
Output for 5.5.25
1461872921 1461872921 0
Output for 5.5.24
1464057301 1464057301 0
Output for 5.4.45
1441430464 1441430464 0
Output for 5.4.44
1439713305 1439713305 0
Output for 5.4.43
1439713301 1439713301 0
Output for 5.4.42
1439713299 1439713299 0
Output for 5.4.41
1439713297 1439713297 0
Output for 5.4.39 - 5.4.40
1439713293 1439713293 0
Output for 5.4.38
1425474871 1425474871 0
Output for 5.4.37
1425474864 1425474864 0
Output for 5.4.34 - 5.4.36
1425474863 1425474863 0
Output for 5.4.32
1410599311 1410599311 0
Output for 5.4.31
1410599310 1410599310 0
Output for 5.4.25 - 5.4.30
1404391495 1404391495 0
Output for 5.4.10 - 5.4.24
1404391496 1404391496 0
Output for 5.4.0 - 5.4.9
1404391497 1404391497 0
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/5KAFo on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/5KAFo on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/5KAFo on line 4
Process exited with code 255.