3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(-1); $null = null; $arr = array(); $str = ''; $int = 0; $dbl = 0.0; $bool = false; $obj = (object) null; var_dump( empty($null), empty($arr), empty($str), empty($int), empty($dbl), empty($bool), empty($obj) );
Output for 5.0.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(false)
Output for 4.3.0 - 4.4.9
bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true)