PHP Optimization / using getters and setters with type safety
<p>I'm going to be working on a project here shortly that will require fast response times and next to no latency. It will be a SOAP server built in PHP (preferably).</p>

<p>I was doing my research on optimization tips and found that Google said using getters and setters more than doubles execution size. I was floored because I use them all the time to enforce type safety.</p>

<p>My question to you, SO, is:</p>

<p>Should I care about types at all? Should I give up on PHP and go to something like Java (yuck)? I'm looking for guidance on the general rule of thumb when it comes to type safety in PHP while keeping optimization in mind.</p>

<p>I do realize, the actual noticeable time for a normal application (especially a small SOAP server) won't be noticeable at all, and the required calls would have to be massive, greater than that of a normal PHP application. With that being said, I still want clarification on the best practices.</p>

<p>Thanks in advance!
Kyle</p>
