3v4l.org

run code in 200+ PHP versions simultaneously
<?php $date_now = new DateTime()->format('Y-m-d H:i:s') echo $date_now; $date2 = new DateTime("01/02/2016"); if ($date_now > $date2) { echo 'greater than'; }else{ echo 'Less than'; }
based on U7Z78
Output for 7.2.0 - 7.4.6
Parse error: syntax error, unexpected '->' (T_OBJECT_OPERATOR) in /in/e8Ph3 on line 2
Process exited with code 255.