1--TEST--
2testing the behavior of string offsets
3--INI--
4error_reporting=E_ALL | E_DEPRECATED
5--FILE--
6<?php
7$string = "foobar";
8var_dump($string[0]);
9var_dump($string[1]);
10var_dump(isset($string[0]));
11var_dump(isset($string[0][0]));
12var_dump($string["foo"]);
13var_dump(isset($string["foo"]["bar"]));
14var_dump($string{0});
15var_dump($string{1});
16var_dump(isset($string{0}));
17var_dump(isset($string{0}{0}));
18var_dump($string{"foo"});
19var_dump(isset($string{"foo"}{"bar"}));
20?>
21--EXPECT--
22string(1) "f"
23string(1) "o"
24bool(true)
25bool(false)
26string(1) "f"
27bool(false)
28string(1) "f"
29string(1) "o"
30bool(true)
31bool(false)
32string(1) "f"
33bool(false)
34