get_current_user

(PHP 4, PHP 5, PHP 7, PHP 8)

get_current_userGets the name of the owner of the current PHP script

Descrição

get_current_user(): string

Returns the name of the owner of the current PHP script.

Parâmetros

Esta função não possui parâmetros.

Valor Retornado

Returns the username as a string.

Exemplos

Exemplo #1 get_current_user() example

<?php
echo 'Current script owner: ' . get_current_user();
?>

O exemplo acima produzirá algo semelhante a:

Current script owner: SYSTEM

Veja Também

  • getmyuid() - Obtém o UID do proprietário do script PHP
  • getmygid() - Obtém o GID do proprietário do script PHP
  • getmypid() - Obtém o ID do processo PHP
  • getmyinode() - Gets the inode of the current script
  • getlastmod() - Obtém o horário da última modificação na página
To Top