3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array( 'foo' => null, 'bar' => '', 'baz' => FALSE, ); echo 'foo: ' . (string) empty($array['foo']); echo "\n"; echo 'bar: ' . (string) empty($array['bar']); echo "\n"; echo 'baz: ' . (string) empty($array['baz']); echo "\n"; echo 'fizz: ' . (string) empty($array['fizz']);
Output for 4.3.0 - 7.1.0
foo: 1 bar: 1 baz: 1 fizz: 1