Re: [PHP] code quest - ECHO?!?

2010-12-12 Thread a...@ashleysheridan.co.uk
And the obvious difference, print returns  true on success. I'm not sure what 
would cause an echo it print to ever fail, so it really doesn't make a huge 
difference.

Thanks,
Ash
http://www.ashleysheridan.co.uk

- Reply message -
From: "Alexandru Patranescu" 
Date: Sun, Dec 12, 2010 18:56
Subject: [PHP] code quest - ECHO?!?
To: "Kirk Bailey" 
Cc: 


They are almost identical.
Echo supports multiple parameters like "echo $a, $b;"
print is 20% slower than echo (by some tests).
"echo" is shorter than "print" so it's easy to write.
In fact it's all a matter of taste. The same reason we user die instead of
exit.

Alex



On Sun, Dec 12, 2010 at 6:23 PM, Kirk Bailey wrote:

> Groovy; they appear to be identical in all but name. IDENTICAL. Or am I
> missing a subtle definition difference?
>
>
>
> David Robley wrote:
>
>> Kirk Bailey wrote:
>>
>>
>>
>>> Ok, so what is echo, and how is it different from print.
>>>
>>> The code in code quest used echo. I have a copy of learning php 5.0 from
>>> O'Reilly, and noplace does it mention echo. Why? What's the difference?
>>> IS there a difference? Is there an advantage to either? Please clarify
>>> for this newbie.
>>>
>>>
>>>
>>
>> The documentation says it all better than I can:
>>
>> http://php.net/manual/en/function.echo.php
>> http://php.net/manual/en/function.print.php
>>
>> Cheers
>>
>>
>
> --
> end
>
> Very Truly yours,
>- Kirk Bailey,
>  Largo Florida
>
>  kniht+-+
> | BOX |   +-+think
>


Re: [PHP] code quest - ECHO?!?

2010-12-12 Thread Alexandru Patranescu
They are almost identical.
Echo supports multiple parameters like "echo $a, $b;"
print is 20% slower than echo (by some tests).
"echo" is shorter than "print" so it's easy to write.
In fact it's all a matter of taste. The same reason we user die instead of
exit.

Alex



On Sun, Dec 12, 2010 at 6:23 PM, Kirk Bailey wrote:

> Groovy; they appear to be identical in all but name. IDENTICAL. Or am I
> missing a subtle definition difference?
>
>
>
> David Robley wrote:
>
>> Kirk Bailey wrote:
>>
>>
>>
>>> Ok, so what is echo, and how is it different from print.
>>>
>>> The code in code quest used echo. I have a copy of learning php 5.0 from
>>> O'Reilly, and noplace does it mention echo. Why? What's the difference?
>>> IS there a difference? Is there an advantage to either? Please clarify
>>> for this newbie.
>>>
>>>
>>>
>>
>> The documentation says it all better than I can:
>>
>> http://php.net/manual/en/function.echo.php
>> http://php.net/manual/en/function.print.php
>>
>> Cheers
>>
>>
>
> --
> end
>
> Very Truly yours,
>- Kirk Bailey,
>  Largo Florida
>
>  kniht+-+
> | BOX |   +-+think
>


Re: [PHP] code quest - ECHO?!?

2010-12-12 Thread Kirk Bailey
Groovy; they appear to be identical in all but name. IDENTICAL. Or am I 
missing a subtle definition difference?



David Robley wrote:

Kirk Bailey wrote:

  

Ok, so what is echo, and how is it different from print.

The code in code quest used echo. I have a copy of learning php 5.0 from
O'Reilly, and noplace does it mention echo. Why? What's the difference?
IS there a difference? Is there an advantage to either? Please clarify
for this newbie.




The documentation says it all better than I can:

http://php.net/manual/en/function.echo.php
http://php.net/manual/en/function.print.php

Cheers
  


--
end

Very Truly yours,
- Kirk Bailey,
  Largo Florida

  kniht   
 +-+  
 | BOX |  
 +-+  
  think   



Re: [PHP] code quest - ECHO?!?

2010-12-12 Thread David Robley
Kirk Bailey wrote:

> Ok, so what is echo, and how is it different from print.
> 
> The code in code quest used echo. I have a copy of learning php 5.0 from
> O'Reilly, and noplace does it mention echo. Why? What's the difference?
> IS there a difference? Is there an advantage to either? Please clarify
> for this newbie.
> 

The documentation says it all better than I can:

http://php.net/manual/en/function.echo.php
http://php.net/manual/en/function.print.php

Cheers
-- 
David Robley

OPERATOR! Trace this call and tell me where I am.
Today is Sweetmorn, the 54th day of The Aftermath in the YOLD 3176. 


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



Re: [PHP] code quest - ECHO?!?

2010-12-10 Thread Kirk Bailey

Ok, so what is echo, and how is it different from print.

The code in code quest used echo. I have a copy of learning php 5.0 from 
O'Reilly, and noplace does it mention echo. Why? What's the difference? 
IS there a difference? Is there an advantage to either? Please clarify 
for this newbie.


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