array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.stream-supports-lock.php', 1 => 'stream_supports_lock', 2 => 'Tells whether the stream supports locking', ), 'up' => array ( 0 => 'ref.stream.php', 1 => 'Stream 函数', ), 'prev' => array ( 0 => 'function.stream-socket-shutdown.php', 1 => 'stream_socket_shutdown', ), 'next' => array ( 0 => 'function.stream-wrapper-register.php', 1 => 'stream_wrapper_register', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/stream/functions/stream-supports-lock.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

stream_supports_lock

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

stream_supports_lockTells whether the stream supports locking

说明

stream_supports_lock(resource $stream): bool

Tells whether the stream supports locking through flock().

参数

stream

The stream to check.

返回值

成功时返回 true, 或者在失败时返回 false

参见