--TEST-- testing the behavior of string offsets --FILE-- getMessage() . \PHP_EOL; } var_dump(isset($string["foo"]["bar"])); ?> --EXPECT-- string(1) "B" string(1) "f" string(1) "o" bool(true) bool(true) Cannot access offset of type string on string bool(false)