Windows, Mac and even Linux are great operating systems, but out of them all one for me has topped the list as the best for writing PHP code. That operating system is Mac OS, keep reading to find out why I think it’s the best operating system out there, specifically for writing PHP.
But before I do, please you must understand that before using my MacBook Pro 15 Inch, I’d never purchased an apple product in my entire life. I was the anti apple person, I’d moan about them every time someone mentioned them.
I’d start with the price, oh I loved to talk about them being an over priced pile of junk.
Then I’d talk about the spec, the lower processor power them a PC equivalent, the reduced memory, so on and so on.
Finally, I’d hype on the fact you can’t customise them easily.
I was hating on apple without really giving them a chance…
And then one day, I decided to just buy a MacBook Pro 15 Inch
As a devout PC fan, most of my family thought I’d gone crazy, I got comments like.
Are you feeling okay???
Have you gone insane???
Yes, I shelled out £2,500 (Yes, I’m British) on my first Apple product, so you could call me a little mad. But I am the type of person who doesn’t mess around.
I’m a Senior PHP Web Developer.
Why does being a Senior PHP Web Developer matter so much that I bought a MacBook Pro??
Well, keep reading and I’ll explain…
Programming PHP on Linux (Ubuntu)
Ubuntu is the BEST operating system to write PHP.
Wait wait, I thought this article was about Mac being the best!!??
It is, but bare with me and I’ll explain…
Ubuntu might be the best for specifically PHP but Mac is only a little behind on its capability.
However Ubuntu falls short on a lot of things that Mac does not.
It all boils down to the industry and what the industry supports, most companies will support Windows and Mac, but very few also include Linux based operating systems as part of what they will support.
Microsoft is a HUGE example, they do NOT support Linux, you can’t get any office applications on Linux, no Word, no Excel and a big one, no Skype for Business.
The number of times I had to pull out my phone just to have a business meeting because my laptop does not support Skype for Business was irritating, to say the least.
The worst part was the embarrassment of not being able to share my screen and having to explain that in a meeting of 20 very high up executives…
Not my best moment.
Adobe is another huge issue on Linux, it’s just not supported either!
Imagine as a web developer and not being able to use Adobe Photoshop…
This is devastating for anyone in the industry!
Perhaps there are Linux compatible alternatives but I argue this…
When most companies you will work with, use Adobe products and you don’t.
It will cause huge issues.
Photoshop is the industry standard photo editing software, period.
Imagine a client you’re working with, sends you a PSD file (Photoshop file) and you can’t open it.
You have to call them back and ask for it to be sent in a different version…
- It’s embarrassing
- It wastes time
- Annoys the client
- Potentially loses a client
All this because you’re using Linux and can’t install Adobe Photoshop.
Custom VPN clients.
The worst one is Custom VPN clients.
You might think, who uses custom VPN clients, we’ll…
On my last contract they did, I needed to do some emergency work and had to remote in to fix the problem.
At the time I was using an Ubuntu operating system because I felt it was the BEST operating system to write PHP.
I came across my biggest barrier when I couldn’t create a VPN connection because the client’s VPN used something that was only supported on Windows or Mac operating systems.
Suffice to say, this made me seriously reconsider my operating system choice after I had to borrow my girlfriends laptop, install a bunch of tools and use it fix the critical live bug.
Programming PHP on Windows
For the longest time, I wrote ALL of my code on a Windows machine, starting with 98, then XP, then 7 and finally 10.
As you can tell I avoided the painful operating systems such as Vista or 8, I like clean and functional operating systems, not the pile of rubbish Microsoft put out those years.
PHP is not BAD on a windows machine, but it’s irritating, annoying and often time consuming to solve issues.
LF -> CRLF
One issue you only get on a windows machine is the on so annoying CRLF issue.
For those who don’t know, this is the line endings for text files, including your code.
You might not think this is an issue until you start working in a team who use a variety of operating systems.
The big issue is file comparison when you want to compare two files and figure out what is different between the two it can be a nightmare if you have some files with CRLF in and the others using LF.
Just imagine some code in a 4000 line file, now you want to compare it against a slightly older version and you can’t use version control for some reason.
The simply way is to just compare the files using a diff, BUT when every damn line is different because one is LF and the other is CRLF, it’s freaking annoying to have to convert them.
This takes time and resources, sometimes you can’t even solve the damn issue.
If you do end up converting every file, you will undoubtable update all the time-stamps which can cause a number of other issues I won’t get into right now.
Plain and simple, the CRLF issue is a plague that was only introduced by Microsoft.
Things just work differently
Windows has a thing about doing everything slightly differently to the rest of the world.
I don’t know why but when I try to write code on windows operating systems, little things just don’t work.
Years ago, I downloaded some code from a LIVE server to fix a bug.
Obviously this was a Linux based LAMP stack because as I’m a PHP developer, that’s all I mainly working with.
I needed to test the code, and I had at the time a PHP server running on my laptop, using IIS.
Naturally I copied the code into the directory where the website was running and loaded the website.
It threw over 300 errors!
My PHP version was different, all the modules were different and obviously the web server configuration was completely different because the LIVE server was using apache and I was locally using IIS.
Suffice to say, this was not going to work, and I gave up.
I ended up installing a Virtual Machine and running vagrant environment to imitate the LIVE system as closely as possible.
I felt this was a hack which is WHY; I recommend use invest some time into docker (read more about docker here).
Programming PHP on Mac
Imagine an operating system that has all the advantages of both Linux (Ubuntu) AND Windows.
One that has all the support you could ever ask for.
Adobe Photoshop works on it, Microsoft Office, Skype for Business yet doesn’t have all the little issues you get when programming on a Windows machine.
That operating system is OS X (Mac).
OS X / Mac
OS X is the operating system built for Mac and it is wonderful to write PHP code on.
Mac does not have the issues that plague both Windows and Linux.
The lack of support that comes with Linux, everything just working differently on Windows, you getting 300 errors on a chunk of code that only had 1 error.
Some applications are actually better suited on a Mac.
Photoshop for starters is mostly used by apple users, you go into any design studio and you will see Mac’s everywhere.
Because Mac’s perform better, because the developers who build applications for Mac’s, don’t need to account for 1000’s of different variations of the machine in question.
Mac only has a handful of different variations.
Skype for Business is fully supported and works wonderfully on Mac.
And that infamous custom VPN client my previous client used that works just fine on my Mac I bought.
But here is the catch!
Mac has all the advantages that Ubuntu has in the sense that it is Unix based, it has terminal, not CRLF issues, the way Mac works is similar, so similar that it’s far more compatible than Windows.
Mac is the sweet spot for operating systems.
When you use a Mac, you’re using the same commands you’d use on the server running your website.
Things just work, I’ve never had an issue with my Mac since I bought it.
Yet every time I need to work with someone who is using Windows, oh we have to change things.
The only drawback with Mac is the price tag, I mentioned before about me shelling out £2,500 for my Mac Book Pro.
Everything with Mac is expensive so you have to keep that in mind
I hope you liked this article, it’s my first one so don’t hate me too much if it’s missing a few things.
Let me know in the comments (coming soon) what you think and if you think I should add anything to the article.
Until next time.