CakeFest 2024: The Official CakePHP Conference

cli_get_process_title

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

cli_get_process_titleGeçerli sürecin başlığını döndürür

Açıklama

cli_get_process_title(): ?string

Geçerli sürece cli_set_process_title() tarafından atanmış başlığı döndürür. Dikkat, kullanılan işletim sistemine bağlı olarak ps veya top çıktısında gösterilenle tam olarak eşleşmeyebilir.

Bu işlev sadece CLI kipinde kullanılabilir.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

Geçerli sürecin başlığını içeren bir dizge veya hata durumunda null döndürür.

Hatalar/İstisnalar

İşletim sistemi desteklenmiyorsa bir E_WARNING üretilir.

Örnekler

Örnek 1 - cli_get_process_title() örneği

<?php
echo "Process title: " . cli_get_process_title() . "\n";
?>

Ayrıca Bakınız

add a note

User Contributed Notes 1 note

up
0
pgl at yoyo dot org
10 years ago
For versions of PHP < 5.5.0, you can get the name of the script from $argv[0]: http://www.php.net/manual/en/reserved.variables.argv.php
To Top