Re: Suggestions for PHP
| From: | Andrey Hristov | Date: | Sun, 26 Sep 2004 10:04:52 +0000 |
| Subject: | Re: Suggestions for PHP | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-12994@lists.php.net to get a copy of this message | ||
Michael Virnstein wrote:
Hi there, what really would be nice, if PHP would have a more advanced way of quoting strings similar to Perl. E.g. the q{} and qq{} function are really helpful there or that i can use e.g. $var = !my string 'hallo'!; $var = "my string 'hallo'"If you want to have longer strings, use heredoc $var = <<< EOT Some text with double quotes(") as well as single ones(') and even $variables EOT;
and i don't have to backslash ' and " inside the string. another thing that i find useful in Perl is the unless construct. I sometimes find it more readable to use "unless($error) {...} " instead of "if (!$error) {...}". This reminds me my days when I used to program in Pascal. The latter hasrepeat until with reversed logic. It was PITA to find the expression for it.
I think this would be nice additions, perhaps you'll consider implementing them in future releases. ThanxAndrey P.S. just my thoughts