1--TEST--
2Tests without running the constructor
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8foreach (['DOM\HTMLDocument', 'DOM\XMLDocument'] as $class) {
9    try {
10        $rc = new ReflectionClass($class);
11        $rc->newInstanceWithoutConstructor();
12    } catch (ReflectionException $e) {
13        echo $e->getMessage(), "\n";
14    }
15}
16
17?>
18--EXPECT--
19Class DOM\HTMLDocument is an internal class marked as final that cannot be instantiated without invoking its constructor
20Class DOM\XMLDocument is an internal class marked as final that cannot be instantiated without invoking its constructor
21