# A little confusing thing when try to get something from a string using multi dim offset

- Thread: https://externals.io/message/74224
- Original archive: https://news-web.php.net/php.internals/74224
- Started by \\R\\N on 2014-05-15T13:10:26+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #74224 — \\R\\N — 2014-05-15T13:10:26+00:00

URL: https://externals.io/message/74224#74224

Hi guys,

    I posted a topic on php.general when I had some problem on getting 
something from a string using multi dim offset here: 
http://news.php.net/php.general/323297.

    Here is a TL;Summary version:

    $data = 'here\'s some data';

    In PHP 5.5 it will be:
    var_dump(isset($data['string'])); === false
    var_dump(isset($data['string'][0])); === true

    Other bright people in php.general already explained how it happens, and 
I get it. But before get use to it, I think I should post this to do some 
... complain ... if you will.

    It's confusing, I have to say. Because the isset($data['check']) is 
false, so the isset($data['check'][0]) should be false too, theoretically, 
but it's not.

    Is any chance to get
    var_dump(isset($data['string'])); === false
    var_dump(isset($data['string'][0])); === false <--
    ?

    Because it will be more intuitively right and make PHP more user 
friendly.


    Thank you.
