Posted on October 21st, 2018 in PhP by George

Here is an example of PHP Reflection api and class inheritance. This example will cover a lot of things like getDocComment() method of reflection api and insanceof plus other things. In order to make sense of the code read the comments. Caveats: getDocComment will return only comments declared on the global scope of the namesapce/document in case. The comment must start in this form with double asterix /** and end */;
Read more...
Posted on October 3rd, 2018 in PhP by George

Example of Overloading in PHP.
Read more...
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...
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...
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...