Skip to content
Sign upLog in
← Back to Community

What is a different between Php Cli and Web server

Profile icon
DiveshTheReal

What is a difference between Php Cli and Web server just wanna ask like what is a different

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
Profile icon
NekoTheDev
Profile icon
TheDevBest
Profile icon
DiveshTheReal
Comments
hotnewtop
Profile icon
Coder100

php web server is like:

php -S 0.0.0.0:8080 .

and cli:

php index.php

iirc

Profile icon
Baconman321

PHP cli is the command line interface, and the web server basically takes the output from the cli and puts it on a webpage. CLI is for programs that aren't using php for a web server. Web server runs on a certain port of your computer and php computes things and puts it on there.

Profile icon
Coder100

The run command is different

Profile icon
DiveshTheReal

@Coder100
that all

Profile icon
DiveshTheReal

@Coder100
can web run in cli

Profile icon
Coder100
Profile icon
Coder100

without changing some aspect of it

@DiveshTheReal