PHP Topics | Latest Features | Lesser known Facts | Important for Entrance Exams
PHP Topics | Latest Features | Lesser known Facts | Important for Entrance Exams In this post, I am going to add my other personal projects that I have worked on in various technologies Reflection in PHP5 $class = new \ReflectionClass(MyClass’); $method = new \ReflectionMethod('MyClass',’method’); $args = array(); $method->invoke($method->getDeclaringClass()->newInstanceArgs($args)); Traits in PHP A Trait is similar to a class, but only intended to group functionality in a fine-grained and consistent way. It is not possible to instantiate a Trait on its own. It is an addition to traditional inheritance and enables horizontal composition of behavior; that is, the application of class members without requiring inheritance. Avoids the problems of Multiple inheritance. Is a parent constructor called implicitly in PHP? When a constructor is defined for a class in PHP, the parent construct...