In Lisp or Scheme language, the anonymous function (which is called lambda-style function) is common used. These functions are special because it doesn’t have a name. So it can be only used once. Usually, these functions are very small and simple. (more…)
Archive for the ‘PHP’ Category
Anonymous Function in PHP
Saturday, October 25th, 2008Function Overloading in PHP 5
Tuesday, September 23rd, 2008Function overloading means using one function to do more than one kinds of work. For example, there is a class whose name is “Container”. The container class maintains an array. It has a function called “add”. You can use “add” function to add some items to the class. The argument may be a single object or an array. i.e. $c->add(35) and $c->(add(array(35)) are the same. How to do it in PHP? (more…)
GChart 0.1 Released
Tuesday, September 23rd, 2008GChart is my first open source project. It took me about two weeks. GChart is a PHP library for data charts using Google Chart APIs. What is Google Chart API? According to the Google official document: (more…)
How to Use SimpleTest
Tuesday, September 23rd, 2008SimpleTest is a unit test framework for PHP. As its name, it is simple, easy to use. You can create many test cases with its help. Since I planned to develop a PHP library for Google Chart API. I decide to use SimpleTest to test my program. (more…)
Resizing an Image Using PHP
Tuesday, September 23rd, 2008Many web applications need lots of pictures. For example, an online shop. Every item may need a small image for showing on the font page and a large image. Uploading two images for one item is a dirty work. So why not upload one image and use a program to resize it? (more…)