xref: /PHP-5.4/ext/xmlreader/tests/bug51936.phpt (revision dc3d360a)
1--TEST--
2Bug #51936 (Crash with clone XMLReader)
3--SKIPIF--
4<?php
5extension_loaded("xmlreader") or die("skip requires xmlreader");
6?>
7--FILE--
8<?php
9echo "Test\n";
10
11$xmlreader = new XMLReader();
12$xmlreader->xml("<a><b/></a>");
13
14$xmlreader->next();
15$xmlreader2 = clone $xmlreader;
16$xmlreader2->next();
17?>
18Done
19--EXPECTF--
20Test
21
22Fatal error: Trying to clone an uncloneable object of class XMLReader in %s on line %d
23