Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Test inserting data into a DOMComment basic test --CREDITS-- Andrew Larssen <al@l..
Decoded Output download
--TEST--
Test inserting data into a DOMComment basic test
--CREDITS--
Andrew Larssen <[email protected]>
London TestFest 2008
--EXTENSIONS--
dom
--FILE--
<?php
//offset to large
$dom = new DomDocument();
$comment = $dom->createComment('test-comment');
try {
$comment->insertData(999,'-inserted');
} catch (DOMException $e ) {
if ($e->getMessage() == 'Index Size Error'){
echo "Throws DOMException for offset too large
";
}
}
?>
--EXPECT--
Throws DOMException for offset too large
Did this file decode correctly?
Original Code
--TEST--
Test inserting data into a DOMComment basic test
--CREDITS--
Andrew Larssen <[email protected]>
London TestFest 2008
--EXTENSIONS--
dom
--FILE--
<?php
//offset to large
$dom = new DomDocument();
$comment = $dom->createComment('test-comment');
try {
$comment->insertData(999,'-inserted');
} catch (DOMException $e ) {
if ($e->getMessage() == 'Index Size Error'){
echo "Throws DOMException for offset too large\n";
}
}
?>
--EXPECT--
Throws DOMException for offset too large
Function Calls
None |
Stats
MD5 | 86e99837611a82768c16ba15d4571c07 |
Eval Count | 0 |
Decode Time | 86 ms |