SplDoublyLinkedList::isEmpty

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

SplDoublyLinkedList::isEmptyVérifie si la liste est vide

Description

public SplDoublyLinkedList::isEmpty(): bool

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Retourne si la liste est vide, ou non.

add a note

User Contributed Notes 1 note

up
0
lincoln dot du dot j at gmail dot com
8 years ago
//isEmpty is a method of SplDoublyLinkedList $obj = new SplDoublyLinkedList();// Check wither linked list is emptyif ($obj->isEmpty()){    $obj->push(2);    $obj->unshift(10);}print_r($obj);//Output like thisSplDoublyLinkedList Object(    [flags:SplDoublyLinkedList:private] => 0    [dllist:SplDoublyLinkedList:private] => Array        (            [0] => 10            [1] => 2        ))
To Top