Re: [PHP] the best 1 book for php

2011-04-07 Thread Paul M Foster
On Thu, Apr 07, 2011 at 02:54:45PM -0500, Donovan Brooke wrote:

> Kirk Bailey wrote:
> >If I only had 1 book on php, what would it be?
> 
> 
> I have to disagree with the php.net 'docs' being the best "book".
> 
> Though most of us will have a php.net tab open in your browser every
> time we write code, it's not the same learning that comes with a
> good book IMO. Reading a book can give a more robust understanding
> to a language, perhaps especially when starting out. You get to
> listen in on the author's perceptions of tools, theories of
> practice, etc.. which can help with concepts, reasoning, and
> understanding etc..
> 
> Perhaps you start to get a similar type of learning with a good talk
> list combined with php.net however... perhaps with a bit of spam.
> ;-)
> 
> Anyway, someone mentioned Larry Ullman's books and I'd have to
> second that suggestion.

I agree regarding php.net.

php.net is a great resource for function references. It is less of a
great resource for basic language elements and such, mainly because of
the way it's indexed. It's much harder to find a full explanation of
something like "heredocs" on the site than an explanation of, say the
"date()" function.

However, if you're trying to learn the language, a book is a better
companion than php.net. I'd recommend the O'Reilly book "Programming
PHP" by Lerdorf, Tatroe & MacIntyre. Before I discovered php.net, it was
my bible (not the one Tedd referred to).

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] the best 1 book for php

2011-04-07 Thread Donovan Brooke

Kirk Bailey wrote:

If I only had 1 book on php, what would it be?



I have to disagree with the php.net 'docs' being the best "book".

Though most of us will have a php.net tab open in your browser every 
time we write code, it's not the same learning that comes with a good 
book IMO. Reading a book can give a more robust understanding to a 
language, perhaps especially when starting out. You get to listen in on 
the author's perceptions of tools, theories of practice, etc.. which can 
help with concepts, reasoning, and understanding etc..


Perhaps you start to get a similar type of learning with a good talk 
list combined with php.net however... perhaps with a bit of spam. ;-)


Anyway, someone mentioned Larry Ullman's books and I'd have to second 
that suggestion.


Donovan



--
D Brooke

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Ranges for case statement and a WTF moment.

2011-04-07 Thread David Harkness
On Thu, Apr 7, 2011 at 2:16 AM, Richard Quadling wrote:

> And all this is shown when you ...
>
> php -r "print_r(array_map(function(&$token){if(is_array($token)){$token[0]
> = token_name($token[0]);} return $token;},token_get_all(' 10...19;')));"
>

Woah, that's a very nifty trick! I like PHP more and more each day . . . I
can *almost* overlook the $ now. :p

David


Re: [PHP] the best 1 book for php

2011-04-07 Thread sono-io
On Apr 7, 2011, at 7:19 AM, Marc Guay wrote:

> session_start(); // Genesis
> 
> // do stuff
> 
> session_destroy(); // Revelation

Now THAT'S clever!  =:)

I'm half way though "Beginning PHP 5.3" by Matt Doyle and I like it a 
lot.  Very readable, and up-to-date.

Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] the best 1 book for php

2011-04-07 Thread Negin Nickparsa
introduction 2 PHP and MySql,Larry ullman


Re: [PHP] the best 1 book for php

2011-04-07 Thread Yousif Masoud
On Thu, 2011-04-07 at 00:15 -0400, Kirk Bailey wrote:
> If I only had 1 book on php, what would it be?
> 
> -- 
> end
> 
> Very Truly yours,
>   - Kirk Bailey,
> Largo Florida
> 
> kniht
>+-+
>| BOX |
>+-+
> think
> 
> 

The best answer I can think to your question is: "It depends".

That said, can I suggest "PHP in Action" by Reiersol, Baker and Shiflett

I believe it covers a good variety of topics.

http://books.google.com/books?id=8TnUOQAACAAJ&dq=PHP+in
+action&hl=en&src=bmrr&ei=6cmdTY7eD8Gk8QOyufm2BA&sa=X&oi=book_result&ct=result&resnum=1&ved=0CCgQ6AEwAA



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] the best 1 book for php

2011-04-07 Thread Marc Guay
session_start(); // genesis

// do stuff

session_destroy(); // revelation

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] the best 1 book for php

2011-04-07 Thread Jay Blanchard
[snip]
I've reliably informed that many people believe the bible covers such
things as the beginning of the universe, the dawn of man and aliens,
but PHP? That's a new one.
[/snip]

I think it is in the Psalms somewhere.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] the best 1 book for php

2011-04-07 Thread Richard Quadling
On 7 April 2011 14:41, tedd  wrote:
> At 12:15 AM -0400 4/7/11, Kirk Bailey wrote:
>>
>> If I only had 1 book on php, what would it be?
>>
>
> The Bible.

I've reliably informed that many people believe the bible covers such
things as the beginning of the universe, the dawn of man and aliens,
but PHP? That's a new one.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] the best 1 book for php

2011-04-07 Thread Richard Quadling
On 7 April 2011 13:51, Andy McKenzie  wrote:
> On Thu, Apr 7, 2011 at 12:15 AM, Kirk Bailey  wrote:
>> If I only had 1 book on php, what would it be?
>>
>> --
>> end
>>
>> Very Truly yours,
>>                 - Kirk Bailey,
>>                   Largo Florida
>>
>
> My most common reference is, as other people have said, www.php.net.
> But when I reach for a paper book for some reason, it's usually
> because I can't remember something really basic, and I reach for
> Beginning PHP4 from WROX press.  It's out of date, but the concepts
> are still right, and the basic stuff still works the same way.  I
> haven't bought the newer Beginning PHP5 yet, but if I were going to
> buy just one, it would probably be that.
>
> -Alex
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

If you are on Windows or have a CHM viewer, then the offline manuals
available from http://www.php.net/download-docs.php are as good as a
book as it gets.

There is a version of PhD ready to roll which produces the CHM files
with the user notes embedded, so you can get the whole kablooey in 1
go.

Richard.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] the best 1 book for php

2011-04-07 Thread tedd

At 12:15 AM -0400 4/7/11, Kirk Bailey wrote:

If I only had 1 book on php, what would it be?



The Bible.

Cheers,

tedd
--
---
http://sperling.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] the best 1 book for php

2011-04-07 Thread Andy McKenzie
On Thu, Apr 7, 2011 at 12:15 AM, Kirk Bailey  wrote:
> If I only had 1 book on php, what would it be?
>
> --
> end
>
> Very Truly yours,
>                 - Kirk Bailey,
>                   Largo Florida
>

My most common reference is, as other people have said, www.php.net.
But when I reach for a paper book for some reason, it's usually
because I can't remember something really basic, and I reach for
Beginning PHP4 from WROX press.  It's out of date, but the concepts
are still right, and the basic stuff still works the same way.  I
haven't bought the newer Beginning PHP5 yet, but if I were going to
buy just one, it would probably be that.

-Alex

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] the best 1 book for php

2011-04-07 Thread Andre Polykanine
Hello Kirk,

Php manual from php.net :-).


-- 
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion

 Original message 
From: Kirk Bailey 
To: PHP General
Date created: , 7:15:40 AM
Subject: [PHP] the best 1 book for php


  If I only had 1 book on php, what would it be?

-- 
end

Very Truly yours,
  - Kirk Bailey,
Largo Florida

kniht
   +-+
   | BOX |
   +-+
think


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Ranges for case statement and a WTF moment.

2011-04-07 Thread Richard Quadling
And all this is shown when you ...

php -r "print_r(array_map(function(&$token){if(is_array($token)){$token[0]
= token_name($token[0]);} return $token;},token_get_all(' Array
(
[0] => T_OPEN_TAG
[1] =>  1
)

[1] => Array
(
[0] => T_ECHO
[1] => echo
[2] => 1
)

[2] => Array
(
[0] => T_WHITESPACE
[1] =>
[2] => 1
)

[3] => Array
(
[0] => T_DNUMBER
[1] => 10.
[2] => 1
)

[4] => .
[5] => Array
(
[0] => T_DNUMBER
[1] => .19
[2] => 1
)

[6] => ;
)








-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Ranges for case statement and a WTF moment.

2011-04-07 Thread Ford, Mike
> -Original Message-
> From: David Harkness [mailto:davi...@highgearmedia.com]
> Sent: 06 April 2011 21:08
> To: Richard Quadling; PHP General list
> Subject: Re: [PHP] Ranges for case statement and a WTF moment.
> 
> On Tue, Apr 5, 2011 at 8:28 AM, Richard Quadling
> wrote:
> 
[...]
> > 10...19
> >
> > What I'm not sure is why the middle empty string is output as 0.
> >
> > "10" . . ".19" becomes "10" . "0" . ".19" which becomes "100.19"
> >
> 
> My guess is that PHP parses this as
> 
> 10  19
> 
> Because the dot operator requires strings, PHP converts both numbers
> to
> strings as
> 
> '10'  '0.19'
> 
> which becomes your
> 
> 100.19
> 
> You can see this with
> 
> php > echo (string) 10.
> 10
> php > echo (string) .19
> 0.19

Oh, excellent deduction! I must admit, my first instinct was also that
both numbers should absorb a dot if one of them did, but failed to
realise that .19 would be coerced to "0.19". Just shows how you really
have to think things through, sometimes!

Cheers!

Mike

 -- 
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,  
Leeds Metropolitan University, C507 City Campus, 
Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom 
Email: m.f...@leedsmet.ac.uk 
Tel: +44 113 812 4730





To view the terms under which this email is distributed, please go to 
http://disclaimer.leedsmet.ac.uk/email.htm

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] the best 1 book for php

2011-04-07 Thread Richard Quadling
On 7 April 2011 05:15, Kirk Bailey  wrote:
> If I only had 1 book on php, what would it be?

I wouldn't. Not a book JUST on PHP.

The book which I'm actually enjoying the most is "Code Complete" by
Steve McConnell. It is subtitled "A Practical Handbook of Software
Construction".

I am a self taught developer. As such, I missed out on a lot of the
"best practise" methodologies that have been proven to assist in
helping a developer play well with others.

The book covers no particular language, but gives you an understanding
on how to write software.

A second edition is now available - http://www.cc2e.com /
http://onlinepriceguide.co.uk/v2/book_comparison.php?code=0735619670&title=Code+Complete&author=Steven+C+McConnell
(for a UK price comparison list).

Richard.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Ranges for case statement and a WTF moment.

2011-04-07 Thread Richard Quadling
On 6 April 2011 21:08, David Harkness  wrote:
> On Tue, Apr 5, 2011 at 8:28 AM, Richard Quadling 
> wrote:
>>
>> php -r "var_dump(10...19);"
>>
>> Interesting output ...
>>
>> string(6) "100.19"
>>
>> And that took me a little while to work out.
>>
>> It's all to do with PHP's type juggling.
>>
>> 10...19
>>
>> What I'm not sure is why the middle empty string is output as 0.
>>
>> "10" . . ".19" becomes "10" . "0" . ".19" which becomes "100.19"
>
> My guess is that PHP parses this as
>     10  19
> Because the dot operator requires strings, PHP converts both numbers to
> strings as
>     '10'  '0.19'
> which becomes your
>     100.19
> You can see this with
>     php > echo (string) 10.
>     10
>     php > echo (string) .19
>     0.19
> David
>

Aha! Yes. That makes a LOT more sense.

Excellent deduction.

So. Not a bug at all. Just a really weird sequence.

And obviously, spaces and more dots can't work.

Richard.
-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php