Showing 51 to 55 of 55 posts.

php Overloading example

Posted on October 3rd, 2018 in PhP by George

Example of Overloading in PHP.


Singleton class in PhP? The 'why' and 'how'.

Posted on October 2nd, 2018 in PhP by George


PHP Singleton example, the structure and practical example. Useful in order to restrict the number of instances. Estabilishing a connection with a database it is time consuming. Here Singleton can help by providing the same open connection when required instean of instantiating a new one.


How many data types has PHP? PhP vs Javascript primitive data types.

Posted on September 28th, 2018 in PhP by George

You can not be a programmer without properly understandig the data types of the program language you are using. Today we going to talk about data types in PhP and Javascript, enumerate all of them and add a short description/comment for each.


PHP casting and JavaScript coercion

Posted on September 28th, 2018 in PhP, JavaScript by George

PHP and JavaScript do not require explicit type definiton whenever you are creating a variable.The variable type is going to be defined by the context in wich the variable is assigned.Converting a data type using an explicit method it is called casting while converting a data type using an implicit (forced way) it called coercion. But what is PHP casting and what is JavaScript coercion? Are they alike? or are they different ? Read the article to find out what casting and coercion are and the syntax for each of the two languages.



Effective JavaScript Merge sort algorithm

Posted on September 27th, 2018 in JavaScript by George

Merge sort it is very effective sorting algorithm with an Worst Time complexity of  O(n log(n)) being more effective in comparison with Quick sort   O(n^2) and insertion sort   O(n^2) for a hypothetical large data set.