Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Python OOP compare to PHP OOP?

I'm basically wondering if Python has any OOP shortcomings like PHP does. PHP has been developing their OOP practices for the last few versions. It's getting better in PHP but it's still not perfect. I'm new to Python and I'm just wondering if Python's OOP support is better or just comparable.

If there are some issues in Python OOP which don't follow proper OOP practices I would definitely like to know those. PHP for instance, doesn't allow for multiple inheritance as far as I'm aware.

Thanks Everyone!

Edit: How about support for Public and Private? or support of variable types. I think these are important regarding building OOP software.

like image 488
Thomas Schultz Avatar asked May 27 '09 17:05

Thomas Schultz


1 Answers

I would say that Python's OOP support is much better given the fact that it was introduced into the language in its infancy as opposed to PHP which bolted OOP onto an existing procedural model.

like image 91
Andrew Hare Avatar answered Sep 30 '22 02:09

Andrew Hare