Tag Archives: Software engineering

JavaScript Performance: for vs. while

JavaScript Loops If you have read some preformance tests on JavaScript loops, you may have heard that “while” is faster than “for”. However the question is how faster is “while”? Here are some results, but first let’s take a look … Continue reading

Posted in javascript | Tagged , , , , , , , , , , | 3 Comments

Object Cloning and Passing by Reference in PHP

In PHP everything’s a reference! I’ve heard it so many times in my practice. No, these words are too strong! Let’s see some examples. Passing Parameters by Reference Clearly when we pass parameters to a function it’s not by reference. … Continue reading

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

Does JavaScript undefined Equals undefined?

Weird JS As you know sometimes JavaScript can be weird. Let’s see the following example and let’s try to answer the question: does “undefined” equals “undefined”. What do I mean? First take a look at the following code. var a; … Continue reading

Posted in javascript | Tagged , , , , , , , , , , , , , | 6 Comments

Some Notes on the Object-oriented Model of PHP

PHP 5 introduces interfaces and abstract classes. To become a little clearer, let us see their definitions. Interfaces Object interfaces allow you to create code which specifies which methods a class must implement, without having to define how these methods … Continue reading

Posted in PHP | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , | 5 Comments

Powerful PHP: Less Known String Manipulation

Yet another thing that’s great in PHP is the power you have when doing some string manipulation/operation. Here’s something that is really useful, but I think it remains a bit unknown. Let’s imagine you need to take the first (or … Continue reading

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