PHP Development: Which Operating System do you use? [closed]
I often hear that Linux for PHP development should be better as on Windows. Is that really true? I'm interested in which OS do 开发者_开发知识库you use. So, what do you think about PHP development on Linux vs Windows or vs Mac? Which operating system supports which benefits in contrast to the other operating systems?
I would prefer Linux over Windows any day, and not just for web hosting. It's much easier to support and manage, and things are much more predictable. There's a reason why the "LAMP stack" (Linux + Apache + MySQL + PHP) got so popular; it just works! You can build an application with these components and reasonably expect to deploy it with a minimum of fuss at any hosting provider. A fresh installation of a Linux system is almost certain to include all of these components, working and ready to use immediately.
In contrast, PHP on Windows is not quite as smooth. Your choice of web server (usually Apache or IIS) will affect how you install PHP, and each choice has its own quirks. PHP+IIS by no means a trivial ride. Eschewing IIS means using Apache, another not-quite-native-to-Windows application, though it's fairly easy to get up and running.
We'd argue that there's no choice to be made, and that you should always use Linux. Insofar as it concerns us, the quality of support we can give you for PHP on Linux is far better; a Good Thing. PHP was made for Linux, so it works best there. The only times to consider Windows is if part of your application uses something Windows-specific (eg. COM).
Considerations
Assuming you need to use Windows, what next?
IIS
* IIS is included with Windows, so it should mostly "just work"
* With IIS you can (easily enough) run PHP via ISAPI, FastCGI or CGI
* It's the only choice if you also need to run .NET or other Windows-specific stuff
* Can integrate access-control with Windows accounts
* Limited mod_rewrite and proxypass support
Apache
* Fairly easy to install
* Uses mod_php, also easy enough to use CGI, and probably FastCGI
* No ability to use ASP or other .NET stuff
* Fully-functional mod_rewrite!
* htaccess files for access control and tweaking
* May be easier to support/deploy some applications
If your question is only for the dev environment, it really doesn't matter as Piskvor said.
You'd better choose the environment where you feel better.
Yet, if you want to execute locally your website, you'd better choose the same environment as your users (Linux, Windows), especially if you want to build an IE-compatible website (even if possible, it would be harder to test on Linux).
PHP development does not require a high tech IDE to build quality applications. There are a number of version available on all platforms and the difference will be minimal.
Hosting the server software is in exactly the same situation.
The difference is minimal.
精彩评论