Re:PHP Built-in web server
by maratd on Monday September 10, 2012 @04:16PM
(#4501986)
> I do agree that this should probably not be in the core php interpreter, though.
It isn't.
From the page:
"As of PHP 5.4.0, the CLI SAPI provides a built-in web server."
It's part of the CLI SAPI. That's the command line interface to the PHP interpreter. Which makes sense, since that's the only place you'll use it. So if you're using CGI, FastCGI, Apache module, or any other SAPI for regular PHP work, that code is not being loaded.
I'm also pretty sure you can turn it off during compilation of PHP, making it easily removable.
It isn't.
From the page:
"As of PHP 5.4.0, the CLI SAPI provides a built-in web server."
It's part of the CLI SAPI. That's the command line interface to the PHP interpreter. Which makes sense, since that's the only place you'll use it. So if you're using CGI, FastCGI, Apache module, or any other SAPI for regular PHP work, that code is not being loaded.
I'm also pretty sure you can turn it off during compilation of PHP, making it easily removable.