Home arrow PHP arrow Writing Clean and Efficient PHP Code

Writing Clean and Efficient PHP Code

If you've ever had to go back to an application you wrote after an extended period of time, you already know the value of clean, well documented and efficient code. But how can you make your code better? Here are some tips that'll help you speed up and clean up your development cycle.

  1. Writing Clean and Efficient PHP Code
  2. Loops
  3. Objects
  4. Code Reusability
By: David Fells
Rating: starstarstarstarstar / 140
May 26, 2004

print this article




Articles preaching the virtues of writing clean code are abundant with good reason: some things bare repeating. Like any topic covering such an esoteric subject, there are a wide range of opinions as to what exactly defines "clean code". At the end of the day, there are two criterion for clean code:

  1. Efficiency: Does the code run as quickly and efficiently as possible? Does the code make the most of it's objects and variables with maximum reuse and minimal waste?

  2. Maintainability: Is the code easy to understand for other developers? Is it well planned, logical, properly documented, and easy to update?

This article will discuss the various elements comprising these two broad points regarding clean code, and provide examples in everyones favorite open source language: PHP. The target audience here is the beginner PHP programmer, although other levels of PHP programmers may find some useful information within.

>>> More PHP Articles          >>> More By David Fells

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: