- var_dump: documentation ( source)
<?php
var_dump(empty($undefined));
$expected_array_got_string = 'somestring';
if (empty($expected_array_got_string['some_key'])) {
echo 'foo';
}
if (@$expected_array_got_string['some_key']) {
echo 'bar';
}