In contrast with other open source languages like Perl and Python, PHP lacks a robust community effort to develop a math library.
One reason for this state of affairs may the abundance of existing
sophisticated math tools that might dwarf any home-grown PHP effort.
For example, a powerful tool that I've been researching, the S System,
has an impressive array of statistical libraries designed for analyzing
datasets and was awarded an ACM Award in 1998 for its language design.
If S or its opensource cousin R is merely an
call away, why bother implementing the same statistical computing
functionality in PHP? For more on the S System, its ACM Award, or R,
After all, isn't this a waste of developer effort? If the motivations for developing a PHP math library are bounded by concerns for conserving developer effort and using the best tool for the job, then PHP's present course makes sense.
On the other hand, educational motivations might inspire the development of a PHP math library. For about 10 percent of the population, mathematics is an interesting topic to explore. For those who are also fluent in PHP, the development of a PHP math library can reinforce the mathematics learning process -- in other words, don't just read a chapter on T tests, implement a class that computes the relevant intermediate values and displays them in a standard format.
With guidance and coaching, I hope to demonstrate that developing
PHP math libraries is not a difficult task and may represent an
interesting technical and learning challenge. In this article, I'll
provide an example of a PHP math library called
that demonstrates a general approach that can be used to develop PHP
math libraries. Let's begin by discussing some general principles that
guided my development of this