Why it's not that bad to code PHP on Windows

Notice: This is a guest post by Oliver Hermanni (you can visit his website or follow him on Twitter). He suggested to reply to my older post about PHP/Windows environment, so here's his answer in an article form.
Some days ago Povilas wrote a post why it's bad to code PHP on Windows. He got quite a lot of comments there and on Twitter - and to be honest, not all of them where nice. Unfortunately this is a regular problem - Apple users tend to overreact when it's about Windows. I'm not sure, if most of them ever worked with Windows or why it's still cool to hate it. On the other hand, Windows users do the same. I've worked on all 3 major operating systems in the past - they all suck one way or another. I don't want to get in detail, because this is not about which OS is the best. But I'd like to show that web development on Windows is not as bad as people (especially non-Windows users) think.

Tools

Let's begin with the tools. People say, that you can't use the same ones. But which really important tools should that be? I don't see a single one where this is true for a regular PHP web developer. Yes, the standard cmd is nothing compared to a shell. But then you can use Git Bash or Cygwin, which both give you (almost) a full featured shell. Also there are great FTP clients (WinSCP), MySQL administration tools (most are even multiplatform), IDEs (ever heard of PHPStorm? ;) ), etc. Secondly - although this still is beta - now with Windows 10 Anniversary Update there's "Bash on Ubuntu on Windows", an Ubuntu overlay for Windows. As said, it's beta and for me it's not a real replacement to Git Bash yet, as gulp doesn’t work because of its internal structure. And as macOS/OSX is based on BSD Unix - not all commands work like they do on Linux. Also the filesystem is case insensitive (unless you enable it, which can be a problem with some software, like from Adobe). So basically it’s not that different from Windows.

Server architecture

Then there is server architecture. Everything macOS/OSX users have with MAMP I can do with XAMPP or EasyPHP (there are even more, but I haven’t used them). And they're all free and full-featured. Why do people pay 39€ for MAMP Pro? All it does for most of you is to change 2 files – the vhost configuration of Apache and the hosts file. With a little bit of help from Google you can do this by yourself. Some macOS/OSX users also say, that working on a Macbook is closer to a real server. Well, in the end the project probably lands on a Linux server, whose hardware architecture is as close to Apple hardware as it is to a standard PC. And that could become a bigger problem than directory structure. For my currently biggest Laravel project I use Forge on Digitalocean with just one tiny problem I had to fix: in the .env file of my dev environment I use an absolute path to a folder, where I store avatar images.

Look&feel

MacBooks look cool and they´re probably built for eternity. Some days ago I saw a girl using an old white MacBook. These things aren’t built anymore since 2011 and they're still out there in the wild. On the other hand, PC laptops might be crap. Or so they say... Please don’t compare a 400€ laptop to a 1.200€ MacBook Pro. The competitors here are Ultrabooks and they get better every year. Check out a Dell XPS13 or the new Lenovo Ideapad 710s. Their build quality is at least on par with any MacBook (Pro) available – maybe even better, as they use newer hardware. My Thinkpad Edge E330 from 2012 (then it costed around 450€) still is a good working companion, all I did exchange during the past years was a SSD and the battery (good luck with that on a MBP). I soon will replace it with one of the upper mentioned devices, because it runs my beloved Skyrim with only 14 to 20 fps. Let´s not talk about how much Windows crashes. I had the same experience with my last MacBook Pro at work. Sometimes twice a week it crashed all services and I had to enter my admin password 25 times for each service to make it work again. Yes, it might have been a hardware problem. But that´s the main reason for many Windows crashes also. ;)

Conclusion

In the end it’s not so bad to develop on Windows. Yes, you have to install some workarounds and you might have to check out one thing or two. But it’s not that different from any other system. The hatred on Windows tends to get old – literally. Because it’s probably based on experiences with very old or bad versions of Windows (like XP or Vista) or with a lack of knowledge about computers at all (which in my experience is a serious problem with trainees and young developers). Don’t forget: it’s not a bad OS, which writes terrible code – it’s a bad developer. A shiny metal box doesn’t make you a great developer, years of hard work and experience do.

No comments or questions yet...

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 59 courses (1056 lessons, total 44 h 09 min)
  • 78 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord

Recent Premium Tutorials