1--TEST-- 2Testing reading properties and calling functions 3--EXTENSIONS-- 4com_dotnet 5--FILE-- 6<?php 7class MyClass { 8 public $foo = "property"; 9 public $bar = "bar"; 10 public function foo() { 11 return "method"; 12 } 13 public function stdClass() { 14 return new stdclass(); 15 } 16} 17 18$o = new MyClass(); 19$v = new variant($o); 20var_dump($v->foo); 21var_dump($v->foo()); 22var_dump($v->bar); 23var_dump($v->bar()); 24var_dump($v->stdclass); 25var_dump($v->stdclass()); 26try { 27 var_dump($v->qux); 28} catch (com_exception $ex) { 29 echo $ex->getMessage(), "\n"; 30} 31?> 32--EXPECTF-- 33string(6) "method" 34string(6) "method" 35string(3) "bar" 36string(3) "bar" 37object(variant)#%d (0) { 38} 39object(variant)#%d (0) { 40} 41Unable to lookup `qux': %s 42