Is multiple inheritance supported in PHP?

PHP: Is multiple inheritance supported in PHP?

Nope! You can extend a class only once. You can, however, use traits.

webdevetc profile pic
webdevetc

I am a 29 year old backend web developer from London, mostly focusing on PHP and Laravel lately. This (webdevetc.com) is my blog where I write about some web development topics (PHP, Laravel, Javascript, and some server stuff). contact me here.



More...


Comments and discussion about Is multiple inheritance supported in PHP?

Found this interesting? Maybe you want to read some more in this series?

Or see other topics in the PHP language

Or see other languages/frameworks:
PHP Laravel Composer Apache CentOS and Linux Stuff WordPress General Webdev and Programming Stuff JavaScript
Or see random questions

What are route patterns in Laravel?

How to return an item in Eloquent, or throw a ModelNotFoundException exception if it isn't found?

How to increment a value in the database

How can you check if a variable is alphanum (alphanumeric, letters and numbers only) in PHP?

How to set the timezone to UTC in .htaccess

What are Apache MPMs?

How to pick what array_intersect function to use in PHP?

Force trailing slash (redirect if no trailing slash exists) in .htaccess

How to force non www in htaccess

How to run an artisan command from a controller