array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'splfixedarray.offsetexists.php', 1 => 'SplFixedArray::offsetExists', 2 => 'Returns whether the requested index exists', ), 'up' => array ( 0 => 'class.splfixedarray.php', 1 => 'SplFixedArray', ), 'prev' => array ( 0 => 'splfixedarray.next.php', 1 => 'SplFixedArray::next', ), 'next' => array ( 0 => 'splfixedarray.offsetget.php', 1 => 'SplFixedArray::offsetGet', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/spl/splfixedarray/offsetexists.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

SplFixedArray::offsetExists

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

SplFixedArray::offsetExistsReturns whether the requested index exists

说明

public SplFixedArray::offsetExists(int $index): bool

Checks whether the requested index index exists.

参数

index

The index being checked.

返回值

true if the requested index exists, otherwise false