summaryrefslogtreecommitdiff
path: root/tests/strings/offsets_chaining_5.phpt
blob: 42cb1f272187d19d9ce5e5c5c96601534ea21a77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
testing the behavior of string offset chaining
--FILE--
<?php
$array = array('expected_array' => "foobar");
var_dump(isset($array['expected_array']));
var_dump($array['expected_array']);
var_dump(isset($array['expected_array']['foo']));
var_dump($array['expected_array']['foo']);
var_dump(isset($array['expected_array']['foo']['bar']));
var_dump($array['expected_array']['foo']['bar']);
?>
--EXPECTF--
bool(true)
string(6) "foobar"
bool(false)

Warning: Illegal string offset "foo" in %s on line %d
string(1) "f"
bool(false)

Warning: Illegal string offset "foo" in %s on line %d

Warning: Illegal string offset "bar" in %s on line %d
string(1) "f"