1--TEST-- 2ReflectionObject::__toString() : very basic test with dynamic properties 3--FILE-- 4<?php 5 6#[AllowDynamicProperties] 7class Foo { 8 public $bar = 1; 9} 10$f = new foo; 11$f->dynProp = 'hello'; 12$f->dynProp2 = 'hello again'; 13echo new ReflectionObject($f); 14 15?> 16--EXPECTF-- 17Object of class [ <user> class Foo ] { 18 @@ %s 19 20 - Constants [0] { 21 } 22 23 - Static properties [0] { 24 } 25 26 - Static methods [0] { 27 } 28 29 - Properties [1] { 30 Property [ public $bar = 1 ] 31 } 32 33 - Dynamic properties [2] { 34 Property [ <dynamic> public $dynProp ] 35 Property [ <dynamic> public $dynProp2 ] 36 } 37 38 - Methods [0] { 39 } 40} 41