3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = new DateTimeImmutable(); $y = new DateTimeImmutable(); $y = $y->add(new DateInterval("P1D")); var_dump((true ? $x : $y)->format('U'));
based on 65Lgb
Output for 7.0.20 - 7.2.0
string(10) "1446998775"
Output for 7.0.6
string(10) "1462293051"
Output for 7.0.5
string(10) "1459659356"
Output for 7.0.4
string(10) "1457631773"
Output for 7.0.3
string(10) "1458327094"
Output for 7.0.2
string(10) "1458694736"
Output for 7.0.1
string(10) "1458794295"
Output for 7.0.0
string(10) "1459056861"
Output for 5.4.9 - 5.6.28
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/vcgLq on line 8
Process exited with code 255.
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/vcgLq on line 8
Process exited with code 255.