PHPマニュアル/PEARマニュアル | ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot

SyncSharedMemory::first - Check to see if the object is the first instance system-wide of named shared memory | JavaScript入門&応用&リファレンスなら「JavaScriptist」

  

SyncSharedMemory::first

(PECL sync >= 1.1.0)

SyncSharedMemory::firstCheck to see if the object is the first instance system-wide of named shared memory

説明

public bool SyncSharedMemory::first ( void )

Retrieves the system-wide first instance status of a SyncSharedMemory object.

パラメータ

この関数にはパラメータはありません。

返り値

A boolean of TRUE if the object is the first instance system-wide, FALSE otherwise.

例1 SyncSharedMemory::first() example

<?php
$mem 
= new SyncSharedMemory("AppReportName"1024);
if (
$mem->first())
{
    
// Do first time initialization work here.
}

var_dump($mem->first());

$mem2 = new SyncSharedMemory("AppReportName"1024);

var_dump($mem2->first());
?>

上の例の出力は、 たとえば以下のようになります。

bool(true)
bool(false)

参考


忘却曲線を使ってこの知識を確実に記憶に残す

フォーラムで「SyncSharedMemory::first - Check to see if the object is the first instance system-wide of named shared memory」について話す
各種マニュアル: PHPマニュアル | PEARマニュアル | Smarty(英語)マニュアル | PHP-GTKマニュアル | SyncSharedMemory::first - Check to see if the object is the first instance system-wide of named shared memory」をGoogle検索
copyright © 1997-2024 PHP ドキュメント作成グループ(ライセンス). provided by php spot. マニュアル: