1--TEST--
2Testing reading and writing of properties
3--EXTENSIONS--
4com_dotnet
5--FILE--
6<?php
7class MyClass {
8    public $foo = "foo";
9    public string $bar = "bar";
10}
11
12$o = new MyClass();
13$v = new variant($o);
14var_dump($v->foo);
15var_dump($v->bar);
16$v->foo = "new foo";
17var_dump($v->foo instanceof variant);
18var_dump((string) $v->foo);
19var_dump($o->foo instanceof variant);
20var_dump((string) $o->foo);
21$v->bar = "new bar";
22var_dump($v->bar);
23var_dump($o->bar);
24?>
25--EXPECT--
26string(3) "foo"
27string(3) "bar"
28bool(true)
29string(7) "new foo"
30bool(true)
31string(7) "new foo"
32string(7) "new bar"
33string(7) "new bar"
34