Files
php-src/ext/xmlreader/tests/bug51936.phpt
Nikita Popov 39131219e8 Migrate more SKIPIF -> EXTENSIONS (#7139)
This is a mix of more automated and manual migration. It should remove all applicable extension_loaded() checks outside of skipif.inc files.
2021-06-11 12:58:44 +02:00

24 lines
411 B
PHP

--TEST--
Bug #51936 (Crash with clone XMLReader)
--EXTENSIONS--
xmlreader
--FILE--
<?php
echo "Test\n";
$xmlreader = new XMLReader();
$xmlreader->xml("<a><b/></a>");
$xmlreader->next();
$xmlreader2 = clone $xmlreader;
$xmlreader2->next();
?>
Done
--EXPECTF--
Test
Fatal error: Uncaught Error: Trying to clone an uncloneable object of class XMLReader in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d