cli_set_process_title

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

cli_set_process_titleSets the process title

Beschreibung

cli_set_process_title(string $title): bool

Sets the process title visible in tools such as top and ps. This function is available only in CLI mode.

Parameter-Liste

title

The new title.

Rückgabewerte

Gibt bei Erfolg true zurück. Bei einem Fehler wird false zurückgegeben.

Fehler/Exceptions

An E_WARNING will be generated if the operating system is unsupported.

Beispiele

Beispiel #1 cli_set_process_title() example

<?php
$title 
"My Amazing PHP Script";
$pid getmypid(); // you can use this to see your process title in ps

if (!cli_set_process_title($title)) {
    echo 
"Unable to set process title for PID $pid...\n";
    exit(
1);
} else {
    echo 
"The process title '$title' for PID $pid has been set for your process!\n";
    
sleep(5);
}
?>

Siehe auch

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Grundlagen von Views in MySQL

Views in einer MySQL-Datenbank bieten die Möglichkeit, eine virtuelle Tabelle basierend auf dem Ergebnis einer SQL-Abfrage zu erstellen. ...

admin

Autor : admin
Kategorie: mySQL-Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Mehrere Aufträge im Hintergrund ausführen

Gute Idee... ... aber was ist das Problem?

Geschrieben von reddighamburg am 31.01.2025 22:42:25
Forum: PHP Developer Forum
Mehrere Aufträge im Hintergrund ausführen

Hat jemand das Folgende geschrieben? Ich möchte eine Webseite, auf der ich eine Funktion 8 bis 12 Mal aufrufe. Die Funktion braucht 1,5 Sekunden ...

Geschrieben von SFI am 30.01.2025 13:26:59
Forum: PHP Developer Forum
[Wichtig] Anmeldung im Forum

Find all the latest apps at upcomingweb site (https://upcomingweb.com)

Geschrieben von upcomingweb am 28.01.2025 14:35:05
Forum: Fragen/Vorschläge zum Forum
xml for php processing

Hello everyone,,, I would like to further process the following value from this xml file: ext-id ext ...

Geschrieben von upcomingweb am 28.01.2025 14:29:03
Forum: XML