3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = false; var_dump($x !== "" && $x == null); $x = 0; var_dump($x !== "" && $x == null); $x = array(); var_dump($x !== "" && $x == null); $x = 0.0; var_dump($x !== "" && $x == null); $x = null; var_dump($x !== "" && $x == null); // undefined var var_dump($y !== "" && $y == null);
Output for 5.0.4 - 7.1.0
bool(true) bool(true) bool(true) bool(true) bool(true) Notice: Undefined variable: y in /in/532He on line 14 Notice: Undefined variable: y in /in/532He on line 14 bool(true)
Output for 4.3.0 - 5.0.3
bool(true) bool(true) bool(true) bool(true) bool(true) Notice: Undefined variable: y in /in/532He on line 14 Notice: Undefined variable: y in /in/532He on line 14 bool(true)