Validates the check digit in UPC and EAN-13 bar codes.
Binary search is perhaps the fastest technique for locating information in an array. Here I present both the iterative and recursive versions which I have ported to PHP from popular C code widely available on the web.
This is a simple example demonstrating how to calculate compound interest using PHP.
This code is a port of some JavaScript I saw somewhere on the net some time ago. I thought it might be a fun excercise to port it to PHP. Enjoy!
A simple function which tells you if your code is executing on a little or big-endian system.
This is an old function I wrote back in the days of PHP3. I have used it quite a bit in the past and so here it is for your downloading pleasure.
This handy snippet will let your script read all of that juicy information from a local MP3 file's ID3 tag. Very useful for webpages or scripts which must process a large number of MP3 files.
ISO3166 Country codes, in CSV and PHP (array) formats. Useful for creating a pull-down list of countries in forms.
Simple function to format an interval of seconds to a human-readable representation of days, hours, minutes and seconds.
This is a reference implentation of a Tic-Tac-Toe game implented in pure PHP. It is intended as a platform for developers and students; and although the reference implentation does not include any AI, it is an excellent starting point for learning about game trees. This version supports arbitrarily large grids and any number of players, both of which are restricted only by common sense.
This script is intended as a supporting application for the Wheel of Fortune board game. It is intended to be used on a computer connected to a television, and greatly simplifies portions of the game play. Unique answer files can be loaded depending on the audience to provide for a unique or customized playing experience.