Re: New notation for easy use/reading
| From: | JUNG, SungYoung | Date: | Wed, 22 Sep 1999 03:08:19 +0000 |
| Subject: | Re: New notation for easy use/reading | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-11176@lists.php.net to get a copy of this message | ||
Is string concatenator necessary? How about C (or C++ ) style string
concatenation?
example in C or C++ :
printf("string1" "string2" "\n");
result :
string1string2
It is easy to implement it to php since it already works like above inside
of string
in php :
$str1 = "string1";
$str2 = "string2";
echo "$str1$str2\n";
result :
string1string2
There is no concatenation operation inside of string even in php.
So how about remove string concatenator "." all case in php next version?
Then string operation will be looks better including the case of function
call and string constant
in original php :
define ("nic", "Rabbit");
$str1 = "Test".$str1.$str2 ;
$str = $this->name.":".strtlower($str1).nic."\n";
in new php :
define ("nic", "Rabbit");
$str1 = "Test" $str1 $str2 ;
$str = $this->name ":" strtlower($str1) nic "\n";
"JUNG, SungYoung" <syjung@lgcit.com>wrote in news:7s7q16$e80$1@www.php.net
>
> An example code in php
> class a{
> var $m;
> function a( $b,$c)
> {
> $this->m = $b.c.$this->m;
> return $this->m;
> }
>}
Finally, it will be look like this
class a{
var $m;
a( $b,$c)
{
$.m = $b $c $.m; // omitted "this" pointer and string
concatenator "."
return $.m;
}
}