Learning php OOP?

I guess you should start with standalone OOP, and not go directly to frameworks. Frameworks usually have well coded classes and functions, and you may not be able to understand exactly what it does Start from the beginning, learn how OOP works, then go to your framework My opinion.

I guess you should start with standalone OOP, and not go directly to frameworks. Frameworks usually have well coded classes and functions, and you may not be able to understand exactly what it does. Start from the beginning, learn how OOP works, then go to your framework.My opinion.

It is always better to start from the basics so my advice is to start with 'standalone' OOP as you call it. Anyway if you want to go further in the OOP you will have to learn some more powerful language to get the real ideas. The php folks may not agree, but I think there is much more PHP must do to become a real OOP language.

Learning OOP "the PHP way" is something I would highly recommend you not to do. PHP has so many quirks and obscurities that it will probably just cloud the issue and make it harder to understand. Learn OOP from a language that is designed with OOP in mind ground up, like Python or Ruby, then read up on how to apply your newly acquired OOP knowledge to PHP.

I had some basic knowledge of OOP, but learnt so much more when I jumped into a framework (a custom framework not dissimilar to CodeIgnighter). So I would say take a look at some of the CodeIgnighter videos / demos / examples and have a play around. Also take special interest in Stack Overflow questions relating to OOP and help others where you can, remember, you learn 90% of what you teach.

In my opinion I think Java might be a better start to learn OOP as PHP has a lot of procedural elements but the documentation is very good and I don't think you will have too much trouble. Of course you would be better off learning the details of the language before getting involved in frameworks but if using a framework encourages you to stay with the language and later get a deeper understanding it might not be too bad. As for codeigniter, tutsplus had a good series for beginners.

Here is the link to part 7 which has references to the other parts: CodeIgniter from Scratch Day 7 Also check out their page on beginning php.

You can use codeigniter (CI) without knowledge of oop but you can't understand why it goes like that way. It'll be hard to use it while you are new to oop. You'll do many mistakes and then learn the rigth way.

But without oop knowledge you never understand why the right way is really right. So: Learn oop and then maybe CI. As others said; php is not a perfect object oriented languale.

Learn OOP first. Then go frameworking. This can be done in many ways, but it's actually not a bad idea to learn it from another language, but you must be prepared for the time when you run into hard walls writing object-oriented PHP because of the implementation.

A good starting point would be Java or C#, these are some of the major OOP languages and have a very large community online. Without basic knowledge about PHP (this means actual experience by doing it, not reading about it) it's quite hard to grasp an object-oriented framework. Also be sure to check out CakePHP.It's another PHP framework with interesting capabilities.

I'd say pick up a framework and learn how to use it. If you're starting from scratch it'll help instill best practices, and the whole point of a framework is to provide a clear and flexible, um, framework; I can't think of a better teaching aid. I doubt you'll feel comfortable looking "under the hood" at first, so start by using the framework as it was intended and build a website or three.As you get more comfortable with PHP + OOP you'll venture further and further into the framework itself... If you're starting from scratch and CodeIgnitor interests you, I'd suggest trying Kohana instead.

It's written in strict OOP and most importantly a PHP 5 offshoot of Codeignitor. The PHP 5 bit is important because pre version 5, PHP didn't have a lot of fairly vital OOP features.CI is built to work with PHP 4 too, and as such contains some "munges" that pull it away from being a truly great starting point for OOP. In response to the "PHP is teh OOP devil" comments; Yes, it is easier to "break" an OOP approach with PHP, but needing self-discipline is a terrible reason not to use it.

Go for java or c# for strong oops knowledge.

What I recommend to do. Read some basic so that you understand what CI is doing. Just one or two days of reading basics.

Dive into CI and learn CI. If you are stuck then read more php OOP.

PHP 5 is very very flexible in accessing member variables and member functions. These access methods maybe look unusual and unnecessary at first glance; but they are very useful sometimes; specially when you work with SimpleXML classes and objects. I have posted a similar comment in SimpleXML function reference section, but this one is more comprehensive.

Important Note: You must surround function name with { and } or PHP would think you are calling a member function of object "foo".

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions