So, I have been learning PHP for the past while, I feel like I am comfortable with most of the procedural language and want to move on.
I was wondering when you think it is a good idea to start learning OOP for PHP? and where to learn it from?
I am also reading about frameworks like cakePHP and codeigniter and wondering if it's best just to learn a framework or if OOP is still necessary?
First off there are many really good coders that never use OOP, so you will not necessarily be a better programmer by learning OOP, and in fact, many people that use 'OOP style' rarely leverage the power of OOP so they may be better to use procedural programming.
PHP has always been limited as a 'full' object oriented language compared to other languages; however don't be put off by this as your applications can still benefit from using OOP methodology. The main concepts for OOP are Abstraction, Encapsulation, Modularity, Poymorphism, Inheritance and Composition. Recently with the release of PHP 5.4 has improved on these OOP handlers.
Start learning as soon as possible as it will help you decide what framework you want to use. When looking at a framework don't forget to also look at Symphony. As far as it goes Symphony has some of the best use of OOP programming under the hood - good to study how they do it.
Frameworks have taken a lot of the 'thinking' out of it for programmers, but truly it is nice to not get limited just because you choose to use a framework for some of your projects.
From my experience, i started to learn OOP after I have learned to work with variables, constants, arrays and functions.
Look on the net for "free php course", "php classes tutorial", and you'll find resources to learn.