Jump to content

Archived

This topic is now archived and is closed to further replies.

jadenrose

old versions of php

Recommended Posts

Hi.  I'm kind of fairly new to php.  I've been reading a php book and well, looking at some other code..alot of stuff I am seeing is not matching up.  Does anyone know how I can find out how to view old versions of php?

Share this post


Link to post
Share on other sites
There are diferent approaches that produce the same/similar results. For example, a lot of newer code you will see will likely take a more Object Oriented approach (Good thing). My suggestion to you, is you take a look at http://www.php.net and do some reading. Learn the very basics first.

Share this post


Link to post
Share on other sites
yes i agree with Caesar. It's most likely the approach that aren't matching up more than the version, unless you're reading  a php 3 book.

Share this post


Link to post
Share on other sites
For example, using a series of if/else statements can produce the same result as using switch/case. You can also put the functionality into classes...or maybe functions within classes and use objects to optimize overall performance and ease execution.

Share this post


Link to post
Share on other sites
The book I am reading covers PHP 4 and 5.  what I am getting lost on is stuff like this:

$this->other stuff here.

That is an example of what is confusing me.

It could very well be that this code is advanced since the book does not go into the advanced aspects of PHP. 

Share this post


Link to post
Share on other sites
the code you are pionting out is basic class php format ok.

Share this post


Link to post
Share on other sites
[quote author=jadenrose link=topic=102621.msg407583#msg407583 date=1154468181]
The book I am reading covers PHP 4 and 5.  what I am getting lost on is stuff like this:

$this->other stuff here.

That is an example of what is confusing me.

It could very well be that this code is advanced since the book does not go into the advanced aspects of PHP. 
[/quote]

[CODE]<?php

class foo {

function bar() {

$this->variable = 'value';

}
}

?>[/CODE]

Is something used within classes. I suggest before trying to figure out the small components, you first figure out what a class is, does, and then break it down. I'm sure your book covers it.

Share this post


Link to post
Share on other sites
yeah the code is object oriented.. which isn't too "advance" but a bit harder and confusing for newcomers. you may want to read up on object oriented programming and php classes. it might be in the later chapters of the book if it covers php5.

Share this post


Link to post
Share on other sites
I figured it was probably something I just missed.  I'll go back and look.  Thanks!  You guys have been extremely helpful!

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.