1--TEST--
2XMLReader::fromString() - custom constructor with error
3--EXTENSIONS--
4xmlreader
5--FILE--
6<?php
7class CustomXMLReader extends XMLReader {
8    public function __construct() {
9        throw new Error('nope');
10    }
11}
12
13try {
14    CustomXMLReader::fromString("<root/>");
15} catch (Throwable $e) {
16    echo $e->getMessage(), "\n";
17}
18?>
19--EXPECT--
20nope
21