mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
14 lines
387 B
PHP
14 lines
387 B
PHP
--TEST--
|
|
Check that SplDoublyLinkedList::add throws an exception with an invalid offset argument
|
|
--FILE--
|
|
<?php
|
|
try {
|
|
$dll = new SplDoublyLinkedList();
|
|
var_dump($dll->add(12,'Offset 12 should not exist'));
|
|
} catch (OutOfRangeException $e) {
|
|
echo "Exception: ".$e->getMessage()."\n";
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Exception: SplDoublyLinkedList::add(): Argument #1 ($index) is out of range
|