[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-general
Subject:    Re: [PHP] print vs. echo
From:       The Doctor What <docwhat () gerf ! org>
Date:       2000-08-17 14:43:21
[Download RAW message or body]

* Radek Vybiral (Radek.Vybiral@vsb.cz) [000817 04:01]:
> User contributed notes in manual:
> 
> The print() function returns a boolean indicating the status of the call. 
> If the write was successful, print() returns 1. If not, it
> returns 0. This can be used to detect when the client has closed the
> connection, and appropriate measures taken. The builtin echo does not
> provide this same service.

echo provides a nice multi-line feature, too:
echo "foo foo",
     " more foo more foo...";

(Don't use parentheses for echo for multi-line:  echo ("foo foo",
.... is bad)

I could have sworn an earlier version of the docs said print was an
alias for echo, though.

Ciao!

-- 
Digital circuits are made from analog parts.
	 -- Don Vonada

The Doctor What: A Holtje Production             http://docwhat.gerf.org/
docwhat@gerf.org                                                   KF6VNC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic