mirror of
https://github.com/php/php-src.git
synced 2026-10-28 17:56:50 +08:00
23 lines
393 B
PHP
23 lines
393 B
PHP
--TEST--
|
|
DOMXPath: Cloning a DOMXPath object
|
|
--EXTENSIONS--
|
|
dom
|
|
--SKIPIF--
|
|
<?php
|
|
if (!class_exists('DOMXPath')) die('skip no xpath support');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$dom = new DOMDocument;
|
|
$xpath = new DOMXPath($dom);
|
|
try {
|
|
clone $xpath;
|
|
} catch (Throwable $e) {
|
|
echo $e::class, ': ', $e->getMessage(), "\n";
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Error: Trying to clone an uncloneable object of class DOMXPath
|