Can I learn PHP 5 with PHP 4 book?

Can I learn PHP 5 with PHP 4 book?

am 03.09.2007 22:04:00 von varois83

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

Re: Can I learn PHP 5 with PHP 4 book?

am 03.09.2007 22:05:09 von Jerry Stuckle

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.
jstucklex@attglobal.net
==================

Re: Can I learn PHP 5 with PHP 4 book?

am 03.09.2007 23:17:03 von AchimR

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

Re: Can I learn PHP 5 with PHP 4 book?

am 03.09.2007 23:38:45 von Jerry Stuckle

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.
jstucklex@attglobal.net
==================

Re: Can I learn PHP 5 with PHP 4 book?

am 04.09.2007 00:19:27 von Bucky Kaufman

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.

Re: Can I learn PHP 5 with PHP 4 book?

am 04.09.2007 00:59:21 von Andy Hassall

On Mon, 03 Sep 2007 17:38:45 -0400, Jerry Stuckle
wrote:

>>mysqli has only been introduced with PHP5.
>
>mysqli was introduced in PHP 4.1.

No it wasn't.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

Re: Can I learn PHP 5 with PHP 4 book?

am 04.09.2007 01:48:10 von AchimR

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

Re: Can I learn PHP 5 with PHP 4 book?

am 04.09.2007 02:28:36 von Jerry Stuckle

Andy Hassall wrote:
> On Mon, 03 Sep 2007 17:38:45 -0400, Jerry Stuckle
> 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.
jstucklex@attglobal.net
==================

Re: Can I learn PHP 5 with PHP 4 book?

am 04.09.2007 02:29:40 von Jerry Stuckle

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.
jstucklex@attglobal.net
==================

Re: Can I learn PHP 5 with PHP 4 book?

am 04.09.2007 02:51:52 von Anonymous

Jerry Stuckle wrote:
>
> Andy Hassall wrote:
> > On Mon, 03 Sep 2007 17:38:45 -0400, Jerry Stuckle
> > 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!

Re: Can I learn PHP 5 with PHP 4 book?

am 04.09.2007 03:01:33 von Michael Fesser

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

Re: Can I learn PHP 5 with PHP 4 book?

am 04.09.2007 03:16:03 von Jerry Stuckle

Anonymous wrote:
> Jerry Stuckle wrote:
>> Andy Hassall wrote:
>>> On Mon, 03 Sep 2007 17:38:45 -0400, Jerry Stuckle
>>> 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.
jstucklex@attglobal.net
==================

Re: Can I learn PHP 5 with PHP 4 book?

am 04.09.2007 03:16:33 von Jerry Stuckle

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.
jstucklex@attglobal.net
==================

Re: Can I learn PHP 5 with PHP 4 book?

am 04.09.2007 10:05:17 von Toby A Inkster

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/08/19/trivial-encoder/

Re: Can I learn PHP 5 with PHP 4 book?

am 04.09.2007 13:10:24 von Jerry Stuckle

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.
jstucklex@attglobal.net
==================

Re: Can I learn PHP 5 with PHP 4 book?

am 05.09.2007 02:53:12 von varois83

Sanders, Jerry and Achim thanks for your help I will get a new PHP 5
book.

Best regards

Patrick