Jump to content


Photo

old versions of php


  • Please log in to reply
9 replies to this topic

#1 jadenrose

jadenrose
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 01 August 2006 - 09:01 PM

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?

#2 ChambeRFienD

ChambeRFienD
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 01 August 2006 - 09:18 PM

First off, what version of PHP is the book teaching you? Also, what exactly isn't matching up?

#3 Caesar

Caesar
  • Members
  • PipPipPip
  • Advanced Member
  • 1,025 posts

Posted 01 August 2006 - 09:19 PM

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.
PHP Ninja

#4 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 01 August 2006 - 09:21 PM

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.
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#5 Caesar

Caesar
  • Members
  • PipPipPip
  • Advanced Member
  • 1,025 posts

Posted 01 August 2006 - 09:23 PM

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.
PHP Ninja

#6 jadenrose

jadenrose
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 01 August 2006 - 09:36 PM

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. 

#7 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 01 August 2006 - 09:39 PM

the code you are pionting out is basic class php format ok.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#8 Caesar

Caesar
  • Members
  • PipPipPip
  • Advanced Member
  • 1,025 posts

Posted 01 August 2006 - 09:42 PM

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. 


<?php

class foo {

function bar() {

$this->variable = 'value';

}
}

?>

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.
PHP Ninja

#9 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 01 August 2006 - 09:44 PM

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.
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#10 jadenrose

jadenrose
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 01 August 2006 - 09:55 PM

I figured it was probably something I just missed.  I'll go back and look.  Thanks!  You guys have been extremely helpful!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users