Category Archives: PHP

Computer Algorithms: Binary Search

Overview The binary search is perhaps the most famous and best suitable search algorithm for sorted arrays. Indeed when the array is sorted it is useless to check every single item against the desired value. Of course a better approach … Continue reading

Posted in algorithms, PHP | Tagged , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Computer Algorithms: Jump Search

Overview In my previous article I discussed how the sequential (linear) search can be used on an ordered lists, but then we were limited by the specific features of the given task. Obviously the sequential search on an ordered list … Continue reading

Posted in algorithms, PHP | Tagged , , , , , , , , , , , , , , | 2 Comments

Computer Algorithms: Linear Search in Sorted Lists

Overview The expression “linear search in sorted lists” itself sounds strange. Why should we use this algorithm for sorted lists when there are lots of other algorithms that are far more effective? As I mentioned in my previous post the … Continue reading

Posted in algorithms, PHP | Tagged , , , , , , , , , , , , , | Leave a comment

Computer Algorithms: Sequential Search

Overview This is the easiest to implement and the most frequently used search algorithm in practice. Unfortunately the sequential search is also the most ineffective searching algorithm. However, it is so commonly used that it is appropriate to consider several … Continue reading

Posted in algorithms, PHP | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

PHP: Don’t Call the Destructor Explicitly

“PHP 5 introduces a destructor concept similar to that of other object-oriented languages, such as C++”[1] says the documentation for destructors, but let’s see the following class. class A { public function __construct() { echo ‘building an object’; }   … Continue reading

Posted in micro tutorial, PHP | Tagged , , , , , , , , , | 7 Comments