I'm familiar with advanced OOP features like interfaces
, abstractions
, enums
, generics
, public , private , static
keywords, exceptions
, etc from Java. However, I'd like to know how all these things translate to PHP.
Specifically I'd like one tutorial or website which goes through all the advanced OOP features of PHP which were added in PHP 5 (I'm mostly familiar with everything from PHP 4) and also things which aren't directly related to OOP like the throw
keyword and the try/catch
blocks. Any suggestions?
PHP - What is OOP? From PHP5, you can also write PHP code in an object-oriented style. Object-Oriented programming is faster and easier to execute.
Object-oriented programming in PHP helps developers build reusable and complex web applications. Object-oriented programming is a programming style that refers to the association of various components and revolves around the inheritance, polymorphism, encapsulation, and abstraction concepts.
There's a decent and free e-book called "PHP 5 Power Programming" (~5 MiB PDF) that I would recommend. It goes into the more advanced aspects of OOP in PHP and explains some common design patterns.
Assuming you haven't been there already, the php.net documentation is pretty good. Here is the section on PHP5's objects. There also is a section on migrating from PHP4 to PHP5.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With