PhP

Showing 4 posts.

php Overloading example

Posted on October 3rd, 2018 in PhP by George

Example of Overloading in PHP.

Read more...

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.

Read more...

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.

 

Read more...

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.

Read more...

Categories