Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good resources for learning advanced OOP features in PHP 5? [closed]

Tags:

oop

php

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?

like image 715
Ali Avatar asked Oct 06 '09 16:10

Ali


People also ask

Can you implement OOP in PHP?

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.

What are the object oriented concepts in PHP classes?

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.


2 Answers

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.

like image 111
slikts Avatar answered Sep 21 '22 22:09

slikts


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.

like image 38
Daniel Vandersluis Avatar answered Sep 20 '22 22:09

Daniel Vandersluis