3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(0); $date = new DateTime('yesterday'); $dati = new DateTimeImmutable(); $null = null; var_dump($date < $null); var_dump($date > $null); var_dump($null < $date); var_dump($null > $date); var_dump($dati < $date); var_dump($dati > $date); var_dump($null < $dati); var_dump($null > $dati);
Output for 5.5.24 - 7.1.0
bool(false) bool(true) bool(true) bool(false) bool(false) bool(true) bool(true) bool(false)
Output for 4.3.2 - 5.4.45

Process exited with code 255.
Output for 4.3.0 - 4.3.1