Roland asked:
I am having troubles to learn Actionscript 3 so I was wondering if I learn PHP first that will help me understand programming. OOP etc.. I am a newbie. Thx.
I am having troubles to learn Actionscript 3 so I was wondering if I learn PHP first that will help me understand programming. OOP etc.. I am a newbie. Thx.


5 Comments to 'I wonder if PHP is a good language to learn OOP?'
October 27, 2008
A language like C# or C is good for learning Object Oriented Programming (OOP)
October 28, 2008
it is a matter of opinion. It is the same thing as asking “What is the best programming language”. I do PHP and it is straight forward and there are allot of references out there and the community is willing to help.
You will end up learning procedural 1st then move on to OOP. Procedural is the basis. Class structure is easy to understand. PHP pretty much acts like one big function. Here is an example:
class Something{
function Something($name=$_GET['name']){ //this is the constructor
if($name==0){
$this->GetName($name);//Calling a function into the Something
}
}
function GetName($name){
echo “my name is” . $name;
}
}
this is how you call a class
$Something=new Something($name);
because I have something in the constructor (in the class) it will find $_GET['name']; this is just an example. You will find many people fighting on both sides of the fence about procedural vs OOP. I run with both to minimize processing time.
October 30, 2008
PHP is free and pretty easy to pick up, there are a ton of resources onle to help you also, most with working examples
November 1, 2008
PHP has a lot of resources online to help you also, most with working examples so better it’s much better.
November 3, 2008
PHP is a great language, and it’s a good companion to ActionScript.
It does support object-oriented programming, but honestly most PHP code doesn’t use OOP style. The nature of most basic programs makes the older procedural style a bit easier.
If you really want to learn object-oriented programming in actionscript, do it in actionscript.
AS has a somewhat odd form of OOP, but it’s still pretty decent.
You might want to look at my book:
I do cover OOP in that book, but I’m using AS 2.0. The examples still work fine.
If you want to see OOP in PHP, I did a book about that, too. See chapter 7 of my PHP book:
If you have other questions, please stop by my web site and drop me a line.
Leave a comment