When I first started on the php system I was a junior c# and didn't know the first thing about how to setup a php environment or what php was capable of. So the best way to get going is just to jump straight in.
At that time we had a perl based system which was failing up to 7 times a day and the c# replacement project that I had been part of had failed due to mis-management. The directors happened to see my php clone of the current perl system although it was in its starting phase with lots of messy classes two more juniors were hired to help me complete this php project and a decent length of time later we were ready, in our eyes that is, to go live. Messy code and all we managed to go live but now we were left with a totally non scalable code base.
So what is the first step to making coding quick, easy and clean in php?
Frameworks yes but which ones as the are so many to choose from. So our sister company currently uses symfony 2. One of our team members happen end to know symfony well so I gave him the go ahead to integrate symfony plus doctrine into our system. Once it had been integrated with a bit of hassle I asked him to run a few speed tests.
We ran four tests and I list them in their speed order
Legacy with doctrine
Legacy with pdo
Symfony with doctrine apc cache
Symfony with pdo and apc cache
Symfony with doctrine
Symfony with pdo
The results were amazing.
The fastest as listed above was between 8-10x faster then the slowest and this is not a hello world benchmark. It was a simple db query on a no load db. The memory usage on symfony was also massive. So where do we go from here? To be continued.....
PS I will send a link to the full tests later.