Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Paul Gregg's Blog:
PHP algorithms: Determining if an IP is within a specific range.
Apr 28, 2009 @ 14:25:39

Paul Gregg has shared a method he's come up with to determine if a given IP is within a selected range.

Unfortunately although people usually understand that an IP address is simply an unsigned 32 bit integer, and is easily determined, usually with $_SERVER['REMOTE_ADDR'], where the real challenge is - is in specifying the range within which they wish to check that IP address. IP ranges are usually specified in three common ways (in increasing complexity): wildcard, start-end range, classless inter-domain routing.

He looks at each method and includes descriptions and code examples as well as a link to the source code and a live demo of it in action.

tagged: algorithms ip address specific range three method wildcard cidr startend

Link:

ImprovedSource.com:
PHP v5.2 vs PHP v5.1
Nov 14, 2006 @ 19:14:36

As part of a project he was working up, Cory Rauch has created some statistics comparing the performance of the latest PHP 5 series release, PHP 5.2, with the previous version, PHP 5.1.

I can't say the results of the benchmarks are surprising, but it does give a good idea of where, speed-wise, they really improved things in this new release. There are some stats, though, that didn't make that much of a jump. Those seem to be ones dealing with objects and their handling, though - so there's not that much of a jump there anyway.

He tested all sorts of operations, including working with binary data, string and array functionality, looping (for, foreach, etc), and operators. For each statistic, he provides what the test is doing and what the results are. Testing was done with the PHPLens benchmark suite.

tagged: benchmark test php52 php51 phplens suite algorithms benchmark test php52 php51 phplens suite algorithms

Link:

ImprovedSource.com:
PHP v5.2 vs PHP v5.1
Nov 14, 2006 @ 19:14:36

As part of a project he was working up, Cory Rauch has created some statistics comparing the performance of the latest PHP 5 series release, PHP 5.2, with the previous version, PHP 5.1.

I can't say the results of the benchmarks are surprising, but it does give a good idea of where, speed-wise, they really improved things in this new release. There are some stats, though, that didn't make that much of a jump. Those seem to be ones dealing with objects and their handling, though - so there's not that much of a jump there anyway.

He tested all sorts of operations, including working with binary data, string and array functionality, looping (for, foreach, etc), and operators. For each statistic, he provides what the test is doing and what the results are. Testing was done with the PHPLens benchmark suite.

tagged: benchmark test php52 php51 phplens suite algorithms benchmark test php52 php51 phplens suite algorithms

Link:


Trending Topics: