1--TEST--
2Cannot use instance of Directory class constructed via Reflection.
3--FILE--
4<?php
5
6$rc = new ReflectionClass("Directory");
7var_dump($rc->isInstantiable());
8try {
9    $d = $rc->newInstanceWithoutConstructor();
10} catch (\Throwable $e) {
11    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
12}
13
14var_dump($d);
15try {
16    var_dump($d->read());
17} catch (\Throwable $e) {
18    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
19}
20
21?>
22--EXPECT--
23bool(true)
24object(Directory)#2 (0) {
25  ["path"]=>
26  uninitialized(string)
27  ["handle"]=>
28  uninitialized(mixed)
29}
30Error: Unable to find my handle property
31