473,387 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Can I learn PHP 5 with PHP 4 book?

Hi

I would like to learn PHP and I know we are at version 5. A friend
let me use 2 of his books but they cover PHP 4. Is that ok for
starting to learn the language? Or should I go straight with a PHP 5
book ?

Thanks a lot

Patrick

Sep 3 '07 #1
15 2080
varois83 wrote:
Hi

I would like to learn PHP and I know we are at version 5. A friend
let me use 2 of his books but they cover PHP 4. Is that ok for
starting to learn the language? Or should I go straight with a PHP 5
book ?

Thanks a lot

Patrick
I'd recommend going straight for a PHP 5 book. While virtually
everything in PHP4 works in PHP5, it's better to learn the new features
such as better OO support available in PHP5.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 3 '07 #2
varois83 wrote:
Hi

I would like to learn PHP and I know we are at version 5. A friend
let me use 2 of his books but they cover PHP 4. Is that ok for
starting to learn the language? Or should I go straight with a PHP 5
book ?

Thanks a lot

Patrick
Hi

Not really,

there are significant differences in PHP5 compared to 4, especially the
OOP class use, but also differences between mysql and mysqli are not
shown in a PHP4 book, simply as mysqli has only been introduced with PHP5.

Achim
Sep 3 '07 #3
AchimR wrote:
varois83 wrote:
>Hi

I would like to learn PHP and I know we are at version 5. A friend
let me use 2 of his books but they cover PHP 4. Is that ok for
starting to learn the language? Or should I go straight with a PHP 5
book ?

Thanks a lot

Patrick
Hi

Not really,

there are significant differences in PHP5 compared to 4, especially the
OOP class use, but also differences between mysql and mysqli are not
shown in a PHP4 book, simply as mysqli has only been introduced with PHP5.

Achim
mysqli was introduced in PHP 4.1.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 3 '07 #4
varois83 wrote:
Hi

I would like to learn PHP and I know we are at version 5. A friend
let me use 2 of his books but they cover PHP 4. Is that ok for
starting to learn the language? Or should I go straight with a PHP 5
book ?
That's what I did - and it worked for me.
I've been on PHP4 since before the turn of the century.

Finally I switched IPP's and my new provider lets me toggle between PHP4
and PHP5 through a radio button on an HTML form. I finally made that
change about a week ago, even though PHP5's been around for a long time.

Best yet - all of my old PHP4 stuff still works, and what I learned
about the older version remains useful in the newer version.

The only learning curve I'm finding is that there's a whole bunch of new
stuff that you can do with classes and objects that you couldn't do
before.
Sep 3 '07 #5
On Mon, 03 Sep 2007 17:38:45 -0400, Jerry Stuckle <js*******@attglobal.net>
wrote:
>>mysqli has only been introduced with PHP5.

mysqli was introduced in PHP 4.1.
No it wasn't.
--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Sep 3 '07 #6
Jerry Stuckle wrote:
AchimR wrote:
>varois83 wrote:
>>Hi

I would like to learn PHP and I know we are at version 5. A friend
let me use 2 of his books but they cover PHP 4. Is that ok for
starting to learn the language? Or should I go straight with a PHP 5
book ?

Thanks a lot

Patrick
Hi

Not really,

there are significant differences in PHP5 compared to 4, especially
the OOP class use, but also differences between mysql and mysqli are
not shown in a PHP4 book, simply as mysqli has only been introduced
with PHP5.

Achim

mysqli was introduced in PHP 4.1.
mysqli is a PHP5 introduction.
you might've confused it with mySQL 4.1, as mysqli was designed to work
with more functions of mysql coming with v. 4.1+

quote php.net
"The mysqli extension allows you to access the functionality provided by
MySQL 4.1 and above"
( http://www.php.net/manual/en/ref.mysqli.php )

Achim
Sep 3 '07 #7
Andy Hassall wrote:
On Mon, 03 Sep 2007 17:38:45 -0400, Jerry Stuckle <js*******@attglobal.net>
wrote:
>>mysqli has only been introduced with PHP5.
mysqli was introduced in PHP 4.1.

No it wasn't.
http://www.php.net/manual/en/ref.mysqli.php

Yes, it was.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 4 '07 #8
AchimR wrote:
Jerry Stuckle wrote:
>AchimR wrote:
>>varois83 wrote:
Hi

I would like to learn PHP and I know we are at version 5. A friend
let me use 2 of his books but they cover PHP 4. Is that ok for
starting to learn the language? Or should I go straight with a PHP 5
book ?

Thanks a lot

Patrick

Hi

Not really,

there are significant differences in PHP5 compared to 4, especially
the OOP class use, but also differences between mysql and mysqli are
not shown in a PHP4 book, simply as mysqli has only been introduced
with PHP5.

Achim

mysqli was introduced in PHP 4.1.
mysqli is a PHP5 introduction.
you might've confused it with mySQL 4.1, as mysqli was designed to work
with more functions of mysql coming with v. 4.1+

quote php.net
"The mysqli extension allows you to access the functionality provided by
MySQL 4.1 and above"
( http://www.php.net/manual/en/ref.mysqli.php )

Achim
Exactly. The functions were available in PHP 4.1.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 4 '07 #9
Jerry Stuckle wrote:
>
Andy Hassall wrote:
On Mon, 03 Sep 2007 17:38:45 -0400, Jerry Stuckle <js*******@attglobal.net>
wrote:
>mysqli has only been introduced with PHP5.
mysqli was introduced in PHP 4.1.
No it wasn't.

http://www.php.net/manual/en/ref.mysqli.php

Yes, it was.
No, it wasn't. Andy is right. Read the link you provided yourself more
closely.

Mysqli requires a minimum *MYSQL* version of 4.1, not a minimum *PHP*
version of 4.1. The minimum PHP version required for mysqli is 5.0.

Everyone makes mistakes sometimes. ;-)

Bye!
Sep 4 '07 #10
..oO(Jerry Stuckle)
>AchimR wrote:
>Jerry Stuckle wrote:
>>>
mysqli was introduced in PHP 4.1.
mysqli is a PHP5 introduction.
you might've confused it with mySQL 4.1, as mysqli was designed to work
with more functions of mysql coming with v. 4.1+

quote php.net
"The mysqli extension allows you to access the functionality provided by
MySQL 4.1 and above"
( http://www.php.net/manual/en/ref.mysqli.php )

Achim

Exactly. The functions were available in PHP 4.1.
Read again. It's about _MySQL_ 4.1, not PHP 4.1. The MySQLi extension
was introduced with PHP 5 in 2004 (or 2003 if it was in beta already).
There's not a single entry about it in the PHP 4 changelog and the
manual clearly states "PHP 5" for all its functions.

Micha
Sep 4 '07 #11
Anonymous wrote:
Jerry Stuckle wrote:
>Andy Hassall wrote:
>>On Mon, 03 Sep 2007 17:38:45 -0400, Jerry Stuckle <js*******@attglobal.net>
wrote:

mysqli has only been introduced with PHP5.
mysqli was introduced in PHP 4.1.
No it wasn't.
http://www.php.net/manual/en/ref.mysqli.php

Yes, it was.

No, it wasn't. Andy is right. Read the link you provided yourself more
closely.

Mysqli requires a minimum *MYSQL* version of 4.1, not a minimum *PHP*
version of 4.1. The minimum PHP version required for mysqli is 5.0.

Everyone makes mistakes sometimes. ;-)

Bye!
Ah, yes, I did misread it. More than once, in fact! Thanks.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 4 '07 #12
Michael Fesser wrote:
.oO(Jerry Stuckle)
>AchimR wrote:
>>Jerry Stuckle wrote:
mysqli was introduced in PHP 4.1.

mysqli is a PHP5 introduction.
you might've confused it with mySQL 4.1, as mysqli was designed to work
with more functions of mysql coming with v. 4.1+

quote php.net
"The mysqli extension allows you to access the functionality provided by
MySQL 4.1 and above"
( http://www.php.net/manual/en/ref.mysqli.php )

Achim
Exactly. The functions were available in PHP 4.1.

Read again. It's about _MySQL_ 4.1, not PHP 4.1. The MySQLi extension
was introduced with PHP 5 in 2004 (or 2003 if it was in beta already).
There's not a single entry about it in the PHP 4 changelog and the
manual clearly states "PHP 5" for all its functions.

Micha
Yes, I did misread this - more than once. Thanks!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 4 '07 #13
Jerry Stuckle wrote:
Ah, yes, I did misread it. More than once, in fact! Thanks.
All this debate, and you should be using PDO anyway!

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 75 days, 11:44.]

TrivialEncoder/0.2
http://tobyinkster.co.uk/blog/2007/0...ivial-encoder/
Sep 4 '07 #14
Toby A Inkster wrote:
Jerry Stuckle wrote:
>Ah, yes, I did misread it. More than once, in fact! Thanks.

All this debate, and you should be using PDO anyway!
Naw, PDO is OK, and fine for others. But I have my own database class
hierarchy I developed before PDO came along.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Sep 4 '07 #15
Sanders, Jerry and Achim thanks for your help I will get a new PHP 5
book.

Best regards

Patrick

Sep 5 '07 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Sebastien Degardin | last post by:
Hello everyone, I just bough a book to learn J2EE (Sam's Learn J2EE in 21 Days) from ebay. This book is based on J2EE 1.3, i'm wondering if it's good to read this book or if it would be better...
55
by: Elijah | last post by:
I have read many of the topics on learning C++ or Java first. It seems like everyone says something different. I would like to know if I should learn C++ or Java. First a little about myself. I...
5
by: News.Individual.NET | last post by:
Books, websites? What did you learn? I'm asking so that I can learn to use this language successfully. Sorry for the new-ness of my programming skill. Evan -- Using M2, Opera's revolutionary...
9
by: Eric | last post by:
I have a few questions: 1. Should I learn C first or VB? 2. Should I get a book or learn from websites? 3. What book or which website is best? 4. Or should I take a course?
9
by: Martin Johansen | last post by:
Hello group I have written this tutorial on the C programming language, named the Elements of C. This C tutorial is different in the way that it tries to state facts once, then build new...
4
by: light_wt | last post by:
Hi I am taking the 2555 class and a lot of the material is over my head. I don't like the MS's book because there is no step-by-step on interacting with the VS.NET Is there good free resource...
85
by: abhi | last post by:
hi everybody am new to this group and help me to learn C
31
by: anand devarajan | last post by:
hi friends, im anand im just a beginner in c learning for the past two weeksnow i can write simple prgs can anyone help me to get well known to c lang so that i should able to write even tough...
40
by: dydx13 | last post by:
Hello, I'm currently attending a university majoring in Computer Science. I took C and C++ at a community college and got an A in both classes. That was three years ago. I have not programmed or...
18
by: Amol | last post by:
Hi, I want to learn Python in less than a month which resources should I use. I prefer to read books . Please give me a list of *recognized* resources. Thank You all
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.