3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date_now = new DateTime(); echo $date_now(); $date2 = new DateTime("01/02/2016"); if ($date_now > $date2) { echo 'greater than'; }else{ echo 'Less than'; }
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Uncaught Error: Object of type DateTime is not callable in /in/PBZkD:3 Stack trace: #0 {main} thrown in /in/PBZkD on line 3
Process exited with code 255.
Output for 7.2.0 - 7.2.31, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught Error: Function name must be a string in /in/PBZkD:3 Stack trace: #0 {main} thrown in /in/PBZkD on line 3
Process exited with code 255.

preferences:
148.27 ms | 402 KiB | 162 Q