Sometimes when defining a function in PHP, you find that there may be cases where you do not want to specify all the possible parameters when calling it. This could be because you want it to use a default value, or that in certain cases it does not logically apply. If you find yourself in [...]
Beginners’ Corner: Learning Object-Oriented PHP
I often see PHP newbies (and even not-so-newbies) who are confused by the world of object-oriented programming (OOP). At least part of this confusion results from the vast majority of introductory books and tutorials for PHP beginning by teaching procedural programming techniques, treating OOP as an “advanced” subject with a chapter or two at the [...]
Book List Project: Using the “Template” Pattern
As part of my Book List project I am making use of the Template design pattern for my CodeIgniter database table models. The idea is that an abstract class contains the common processing needed by each class that will extend it, and it will have some number of abstract methods which essentially force each child [...]
Komodo Edit 5.2.0 Released
The 5.2.0 version of Komodo Edit has just been released. In addition to some bug fixes and UI features, the release notes indicate that support for PHP 5.3.0 has been added, including code completions for name spaces and syntax coloring of latest keywords (“namespace”, “use”, “as”, etc…).
(FYI, this is the editor I’m currently using, but [...]
Upgrade WordPress to Avoid Potential Exploit
If you run any WordPress blogs, be sure to upgrade your software to the latest version (2.8.4 as of this writing) to avoid an exploit which may place your blog or web site at risk. See the article at “Lorelle on WordPress” for more info. Either use the upgrade link on your WordPress blog’s control [...]
Komodo Editor: PHP Code Beautifier
So I’ve been playing around with Komodo Edit (the free editor available from the people who make the not-free Komodo IDE), and one thing I found missing was a code beautifier (or automatic formatting, if you prefer). It’s not a feature I use a lot, but can be really useful when importing code from someone [...]
Strip Comments and White-Space from PHP File
Inspired by a number of web forum “conversations,” I decided to make a little tool for stripping PHP comments from files as well as blank lines and leading white-space. This is for any of you who feel you need to save a few nano-seconds when processing PHP files, or maybe want to do a little [...]