Jump to content


Photo

Learning PHP - a couple questions...


  • Please log in to reply
14 replies to this topic

#1 Eiolon

Eiolon
  • Members
  • PipPipPip
  • Advanced Member
  • 357 posts

Posted 13 July 2006 - 02:10 AM

I hope this is the appropriate forum for this:

1. Should I start with PHP4 or 5?  I know this question seems strange but I didn't know if PHP5 was new and not fully developed or not.  I notice lots of people still using PHP4.

2. I have Dreamweaver 8.  I know it has built-in PHP functions.  I know that using them doesn't teach me PHP but if I were to use them as examples of code, would that be a good idea?  I was once told by someone the PHP functions may not be secure the way they are coded, regardless if they work or not.

Thanks!

#2 hvle

hvle
  • Members
  • PipPipPip
  • Advanced Member
  • 667 posts
  • Locationmelbourne, Australia

Posted 13 July 2006 - 02:12 AM

use  a stable version of php4
Life's too short for arguing.

#3 gewthen

gewthen
  • Members
  • PipPip
  • Member
  • 11 posts

Posted 13 July 2006 - 02:59 AM

I hope this is the appropriate forum for this:

1. Should I start with PHP4 or 5?  I know this question seems strange but I didn't know if PHP5 was new and not fully developed or not.  I notice lots of people still using PHP4.


You should learn PHP5. It is much better for object oriented programing. Object oriented programing is easier to learn for many people that procedural programing, which PHP4 is better for than PHP5. If you plan on to use your scripts or system on a live website you will find it difficult to find hosting companies supporting PHP5 (for whatever reason this seems due to the slow adoption of some control pannels supporting PHP5). If you are learning PHP purely for the sake of learning it, then you would be a fool not to learn PHP5. If you do any serious programing in PHP4 you will have to know PHP5 well so that your scripts do not break when (and not if) PHP4 becomes obsolete.

#4 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 13 July 2006 - 03:41 AM

You should learn PHP -- either 4 or 5. Right now it's easier to find hosts that run PHP4 than hosts that run PHP5. You don't have to write OOP code to use PHP5. I write perfectly good scripts using PHP5 which are backwards compatible to PHP4. I'm just very careful to only use those functions that are in the version of PHP that I will be running on the live server. I do most of my coding on my laptop (xampp with PHP v5.05). The production machines are running either 4.3.10 or 4.3.9 depending on the host.

Don't let the OOP style of programming scare you away from PHP5.

For some of us "old-timers", the OOP style is hard to learn (although it is getting easier).

Ken
(started programming professionally over 30 years ago!)

#5 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 13 July 2006 - 07:47 AM

but if I were to use them as examples of code, would that be a good idea?

No... Dreamweaver creates some of the worst examples of php code I have ever seen.

#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 13 July 2006 - 02:26 PM

but if I were to use them as examples of code, would that be a good idea?

No... Dreamweaver creates some of the worst examples of php code I have ever seen.

I would have to agree with that! You should not use Dreamweaver for PHP coding. To get the best out of PHP you should get an app that is specificly designed to help your develop your PHP scripts, such as an IDE. There are many of them out of there free or paid.

Also it doesnt matter which version you use. The big difference between PHP4 and PHP5 is the OOP side og things, you can still do OOP coding for PHP4 but is limited. Also with PHP there are a few functions that only work with PHP5.

Alot of hosts use PHP4, but it doesnt matter if your host doesnt have PHP5 as your script will still run, accept if you are using PHP5 only function, which there are very few. Also keep in mind many hosts tend to have a setting called register_globals enabled which can break your scripts! So before your start coding away creating your uber perfect PHP app ask your host whether they have a setting called register_globals enabled.

#7 brown2005

brown2005
  • Members
  • PipPipPip
  • Advanced Member
  • 943 posts

Posted 13 July 2006 - 02:27 PM

whats oop people?

#8 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 13 July 2006 - 02:32 PM

Object Oriented Programming.

PHP4 OOP
PHP5 OOP

#9 Eiolon

Eiolon
  • Members
  • PipPipPip
  • Advanced Member
  • 357 posts

Posted 14 July 2006 - 10:22 PM

Thanks for your help everyone.  I forgot to ask.  I have access to CodeCharge Studio 3.  Is that any good for PHP examples?

#10 pixy

pixy
  • Members
  • PipPipPip
  • Advanced Member
  • 295 posts

Posted 14 July 2006 - 10:26 PM

I have no idea what CodeCharge is, but Dreamweaver is GREAT for php coding because the syntax coloring helps you see when you forget semi-colons or commas, etc. And you can keep track of your {} much easier.

www.daydreamgraphics.com has lots of easy PHP tutorials that explain everything and help you learn to write your own scripts.

For me, I bought a PHP/mySQL book and I used it non-stop. It's so helpful, and it's how I learned to write PHP code.

Also, you should download the latest PHP manual. It lists all sorts of helpful functions and lots of user-submitted functions.

This is a .44 Caliber Loveletter straight through my heart.

Tabulas + Threadless + Hire Me!


#11 Eiolon

Eiolon
  • Members
  • PipPipPip
  • Advanced Member
  • 357 posts

Posted 14 July 2006 - 10:30 PM

May I ask which book you are using?  I am going to Borders tonight to get a couple.

EDIT: Wow, that site you linked to is really simple and informative on its tutorials.  I am sure I will learn a lot from it.

#12 pixy

pixy
  • Members
  • PipPipPip
  • Advanced Member
  • 295 posts

Posted 14 July 2006 - 10:39 PM

^ Yep! The girl that runs it, Snow White, also has a forum there with lots of helpful people. They're all really nice, too. :) The tutorials are simple, and that's where I started learning from, too.

I'm learning Visual QuickPro (not quickstart) guide to PHP & MySQL by Larry Ullman. It has complete examples in it like making shopping carts, content management, user log in--plus it's all explained step by step. It's only like $25 and was worth EVERY penny.

This is a .44 Caliber Loveletter straight through my heart.

Tabulas + Threadless + Hire Me!


#13 redarrow

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

Posted 15 July 2006 - 12:06 AM

Dont use dreamweaver for php programming as i am learning php and all the code gets all confuesing in page view.

Take the above advice.

I use notepad it's free and it also false me to learn properly.

good luck. 
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

#14 hvle

hvle
  • Members
  • PipPipPip
  • Advanced Member
  • 667 posts
  • Locationmelbourne, Australia

Posted 15 July 2006 - 12:20 AM

Snow White, Sleeping Beauty, and Pocahontas used Dream Weaver too.  It was soooo prettty.
Life's too short for arguing.

#15 redarrow

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

Posted 15 July 2006 - 12:38 AM

pmsl

lol........................................


if(!$a['dreamweaver']){
echo" sorry but your lazy get a life !";
}else{
echo"use notpad";
}
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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users