1--TEST-- 2Directory class behaviour. 3--FILE-- 4<?php 5/* 6 * Description: Directory class with properties, handle and class and methods read, rewind and close 7 * Class is defined in ext/standard/dir.c 8 */ 9 10echo "Structure of Directory class:\n"; 11$rc = new ReflectionClass("Directory"); 12echo $rc; 13 14echo "Cannot instantiate a valid Directory directly:\n"; 15$d = new Directory(getcwd()); 16var_dump($d); 17 18try { 19 var_dump($d->read()); 20} catch (\Error $e) { 21 echo $e->getMessage() . "\n"; 22} 23 24?> 25--EXPECTF-- 26Structure of Directory class: 27Class [ <internal%s> class Directory ] { 28 29 - Constants [0] { 30 } 31 32 - Static properties [0] { 33 } 34 35 - Static methods [0] { 36 } 37 38 - Properties [0] { 39 } 40 41 - Methods [3] { 42 Method [ <internal:standard> public method close ] { 43 44 - Parameters [0] { 45 } 46 } 47 48 Method [ <internal:standard> public method rewind ] { 49 50 - Parameters [0] { 51 } 52 } 53 54 Method [ <internal:standard> public method read ] { 55 56 - Parameters [0] { 57 } 58 } 59 } 60} 61Cannot instantiate a valid Directory directly: 62object(Directory)#%d (0) { 63} 64Unable to find my handle property 65