mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00

For rationale, see https://github.com/php/php-src/pull/6787 Make extension checks lowercase, add a special case for opcache that has internal name not matching .so filename. Extensions migrated in part 2: * dom * exif * fileinfo * ffi
24 lines
480 B
PHP
24 lines
480 B
PHP
--TEST--
|
|
Test replacing data into a DOMComment basic test
|
|
--CREDITS--
|
|
Andrew Larssen <al@larssen.org>
|
|
London TestFest 2008
|
|
--EXTENSIONS--
|
|
dom
|
|
--FILE--
|
|
<?php
|
|
|
|
//Negative offset
|
|
$dom = new DomDocument();
|
|
$comment = $dom->createComment('test-comment');
|
|
try {
|
|
$comment->replaceData(-1,4,'-inserted');
|
|
} catch (DOMException $e ) {
|
|
if ($e->getMessage() == 'Index Size Error'){
|
|
echo "Throws DOMException for -ve offset\n";
|
|
}
|
|
}
|
|
|
|
?>
|
|
--EXPECT--
|
|
Throws DOMException for -ve offset
|