The next in the "Develop Rock Solid Code in PHP" series that Zend has been publishing, the latest installment, Part 3 is now posted.
Welcome back. In Part 1 of this series, we discussed some basic PHP design rules, and covered how to write secure, simple, platform-independent, speedy code. In Part 2, we explored the world of variables and discussed their usage - both good and bad - in PHP coding. In this article we'll deal with how to use functions in PHP wisely. Every high-level programming language allows the programmer to define functions. PHP is no different.
They start off covering design techniques for your function names - cases, arguments, and optimization. The author then goes on to different design patterns you can follow in your function structure, and using references and reduced variable passing to help keep your code clean and simple. Top it all off with some dynamic function calls and you never know what you can reduce in your code!




