- var_dump: documentation ( source)
<?php
$expected_array_got_string = 'somestring';
var_dump(empty($expected_array_got_string['some_key']));
var_dump(empty($expected_array_got_string[0]));
var_dump(empty($expected_array_got_string['0']));
var_dump(empty($expected_array_got_string[0.5]));
var_dump(empty($expected_array_got_string['0.5']));
var_dump(empty($expected_array_got_string['0 Mostel']));
echo (array)$expected_array_got_string['some_key'];
echo $expected_array_got_string[0];
echo $expected_array_got_string['0'];
echo $expected_array_got_string[0.6];
echo $expected_array_got_string['0.5'];
echo $expected_array_got_string['0 Mostel'];