Re: PHP_CompatInfo do not parse a strange PHP Syntax - Who can give me an explain ?
| From: | Greg Sherwood | Date: | Sat, 27 Sep 2008 10:44:57 +0000 |
| Subject: | Re: PHP_CompatInfo do not parse a strange PHP Syntax - Who can give me an explain ? | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-50801@lists.php.net to get a copy of this message | ||
On 27/09/2008, at 7:37 PM, Laurent Laville wrote:
Hello all, I've recently receive a bug report [1] from William Meleyal about PHP_CompatInfo, who can not parse (currently with version 1.8.0) the Kohana PHP Framework v2.2 [2]. After a little analysis, the problem came from a file with a strange syntax (for me). The file "javascript" from the gmail module [3] has a syntax that I have some difficulty to understand. If someone could explain me I'll be happy ! Here are a bit of the code (syntax) that I cannot understand <?php echo $center, "\n" ?>The echo language construct can take multiple arguments to echo multiple strings. If you use it in this way, you cannot use parentheses, so echo($center, "\n"); would be invalid. There is a bit of an explanation on the echo doc page: http://www.php.net/echo I don't personally use the syntax myself, preferring string concatenation. It would be interesting to know if there is a speed difference. Greg