mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
20 lines
354 B
PHP
20 lines
354 B
PHP
--TEST--
|
|
XMLReader::fromString() - custom constructor with error
|
|
--EXTENSIONS--
|
|
xmlreader
|
|
--FILE--
|
|
<?php
|
|
class CustomXMLReader extends XMLReader {
|
|
public function __construct() {
|
|
throw new Error('nope');
|
|
}
|
|
}
|
|
|
|
try {
|
|
CustomXMLReader::fromString("<root/>");
|
|
} catch (Throwable $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
nope
|