1--TEST-- 2XMLWriter::toStream() - custom constructor error 3--EXTENSIONS-- 4xmlwriter 5--FILE-- 6<?php 7 8class CustomXMLWriter extends XMLWriter { 9 public function __construct() { 10 throw new Error('nope'); 11 } 12} 13 14$h = fopen("php://output", "w"); 15 16try { 17 CustomXMLWriter::toStream($h); 18} catch (Throwable $e) { 19 echo $e->getMessage(), "\n"; 20} 21 22?> 23--EXPECT-- 24nope 25