1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 22:41:20 +02:00
Files
archived-php-src/ext/spl/tests/SplDoublyLinkedList_add_null_offset.phpt
Máté Kocsis f7fbc6333f Add more precise type info for stubs
Closes GH-6005
2020-09-01 16:35:56 +02:00

14 lines
367 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([],2));
} catch (TypeError $e) {
echo "Exception: ".$e->getMessage()."\n";
}
?>
--EXPECT--
Exception: SplDoublyLinkedList::add(): Argument #1 ($index) must be of type int, array given