Jump to content

Recommended Posts

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!
Link to comment
https://forums.phpfreaks.com/topic/14436-learning-php-a-couple-questions/
Share on other sites

[quote author=Eiolon link=topic=100379.msg396083#msg396083 date=1152756631]
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.
[/quote]

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.
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!)
[quote author=thorpe link=topic=100379.msg396165#msg396165 date=1152776831]
[quote]but if I were to use them as examples of code, would that be a good idea?[/quote]
No... Dreamweaver creates some of the worst examples of php code I have ever seen.
[/quote]
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 [url=http://uk2.php.net/register_globals]register_globals[/url] enabled.
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.
^ 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 thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.