1--TEST--
2Dereferencing operations on an encapsed string
3--FILE--
4<?php
5
6$bar = "bar";
7var_dump("foo$bar"[0]);
8var_dump("foo$bar"->prop);
9try {
10    var_dump("foo$bar"->method());
11} catch (Error $e) {
12    echo $e->getMessage(), "\n";
13}
14
15class FooBar { public static $prop = 42; }
16var_dump("foo$bar"::$prop);
17
18function foobar() { return 42; }
19var_dump("foo$bar"());
20
21?>
22--EXPECTF--
23string(1) "f"
24
25Warning: Attempt to read property "prop" on string in %s on line %d
26NULL
27Call to a member function method() on string
28int(42)
29int(42)
30