Re: print vs. echo

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: print vs. echo
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12184@lists.php.net to get a copy of this message
On Wed, 16 Aug 2000, Bas Jochems wrote: > Hi all, > > Could someone tell me when to use echo and when to use print. I prefer > clean code and want to use the right function for the right purpose. > 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. R.V. +-------------------------------------------------------------------------+ | Radek Vybiral Radek.Vybiral @ vsb.cz | | Technical University of Ostrava http://www.vsb.cz/~l92494 | | Czech Republic GSM: +420 602 473 670 | | Projects: Admin on darksys.vsb.cz http://darksys.vsb.cz | | NEW! Czech: Sluzby automobilistum http://www.automobil.cz | | | | J.W Goethe: "Prestoze svet stale pokracuje, mladi lide musi | | vzdy zacinat od zacatku." | +-------------------------------------------------------------------------+

« previous php.general (#12184) next »