env

env shows environment, server and request values visible to the current PHP process while masking fields that look like credentials or secrets.

DiagnosticsVersion 1.1.4Stable
lil-terminal

Overview

Use env to answer a precise question about what reached PHP: an environment value, a $_SERVER field or a request parameter. There is no raw-secret mode.

What the current PHP request can see

The environment exposed to PHP is not the same thing as an interactive shell environment. Shared hosting, the web server and PHP SAPI decide which values exist. env therefore reports the current request context and masks credential-like values instead of trying to expose everything.

Syntax

lil-terminal
env [env|server|request] [<name>]

Reference

env

show environment variables

env <name>

show variable <name>

env server [<name>]

show values from $_SERVER

env request [<name>]

show values from $_REQUEST

Interactive sandbox preview

Run the prepared examples directly on the page. Their results are prebuilt and shown in the browser; no terminal command is executed on the server.

Compare server and environment values

Install and manage

Install the current compatible version. Choose Base for the complete feature set or Minimum for the reduced package; use upgrade to update a module that is already installed.

Base and Minimum are two packages of the same current module release, not separate command versions.

Base package

Install the complete package with local command reference and every published mode.

install env
Minimum package

Install the reduced package. Local reference is omitted; help <cmd> -i opens the current server reference.

install env -m
Exact public version

Install exactly this published version.

install env -v 1.1.4
Check or update

Ask upgrade to check compatibility and replace the installed block only when needed.

upgrade env
Remove module

Remove the extension block while leaving the core and unrelated modules intact.

install env -u

Examples

Examples are copyable command lines, not actions executed by this website. Review paths, permissions and destructive flags before running them on a real project.

Compare server and environment values
pwd | env server SERVER_ADDR | env TMP
sandbox

SERVER_ADDR  203.0.113.10

TMP  /tmp
Env · all
env
APP_ENV      production
PATH         /usr/local/bin:/usr/bin:/bin
TMP          /tmp
API_TOKEN    [hidden]
Env · value
env TMP
TMP  /tmp
Env · server
env server SERVER_ADDR
SERVER_ADDR  203.0.113.10
Env · request
env request
page    docs
filter  development
Handle a missing variable
env LIL_DOES_NOT_EXIST
Variable not found

File used in this example: sandbox/config/.env.example

The example uses a file or directory from the protected /sandbox/ documentation workspace.

APP_ENV=development
APP_DEBUG=1
DB_HOST=localhost
DB_NAME=lil_sandbox
DB_USER=example
DB_PASSWORD=replace_me

Related documentation

Current public release

v1.1.42026-08-08

Normalized variable name

Uses <name> consistently for environment, server and request lookups.