How to Reuse PHP Code Effectively - Introduction to PHP traits

Posted by linuxer on Jun 27, 2019 12:43 AM EDT
linuxconfig.org; By Egidio Docile
Mail this story
Print this story

Originally developed by Rasmus Lerdorf in 1994, PHP is one of the most used general-purpose programming languages. Originally born as a template language, during the years it evolved into a fully-featured language with proper OOP (Object Oriented Programming) support. Its latest incarnation, 7.x, introduced new features like return type declaration for functions and huge performance improvements. PHP is a single inheritance language: this means that a class can inherit only for one parent or base class. To overcome this problem a feature was introduced in the language: traits. In this article we will see how to use it and how it works.

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Developer, PHP

« Return to the newswire homepage

This topic does not have any threads posted yet!

You cannot post until you login.