Re: gmail accounts

From: Date: Mon, 20 Sep 2004 18:19:47 +0000
Subject: Re: gmail accounts
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-197321@lists.php.net to get a copy of this message
Greg Donald wrote:
I have some gmail accounts of anyone wants one. Email me off list. Limited supply, first requests, etc..
I would be interested if there's still one left ;)
And now for my php question: Which do you prefer, echo() or print() ? I find that after I've done a bunch of Perl coding and I'm back on some PHP work I use print. But then after I do a bunch of PHP coding I start to use echo again because it's one character shorter and I'm lazy like that. What about you?
I prefer echo ... even without the parentheses. The nice about it is, you can pass multiple arguments, separated by commas, without parentheses. You can't do that with print. Albeit that, they're identical I think (both are core language construct, no real functions). I don't use print at all, but only 'printf' and 'sprintf', I do use them a lot for string formating (especially SQL and HTML output). For long text I also use the HEREDOC (also in Perl, afaik) Syntax echo <<<HTML <html>...</html> HTML; I don't know your editor, but I once suggested to the php vim syntax author to make the highlighting of strings inside heredocs based on the HEREDOC terminator string; that is: HTML highlighted HTML/JS, SQL, maybe some other to (JAVASCRIPT) ? HTH

« previous php.general (#197321) next »