PHP is a language of weak typing, which means that the type of variables can be changing during runtime. Since the version 5.0, PHP has enabled the, so called, type hinting. Type hinting means method parameters marking to demand a certain type of data. This allows, to some extent, for data type control. Unfortunately, it works only for objects and arrays, so the possibility to determine either the integer or the string doesn’t exist. There are ways to avoid the problem of weak typing, and one of them is wrapping. Read the full article →