Re: Re: Patch-tastic!
| From: | Rasmus Lerdorf | Date: | Wed, 05 Jun 2002 15:41:45 +0000 |
| Subject: | Re: Re: Patch-tastic! | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-84897@lists.php.net to get a copy of this message | ||
Heh, this is sounding like PHP 1 and 2 days again. Back then I had + as
the contanation operator. I actually implemented all the operators.
"abc" - "b" gave you "ac". "abc" * "def" gave you
the cross product
vector of vectors "abc" and "def". '/' reversed that.
Not very useful.
On 5 Jun 2002, Jason T. Greene wrote:
> If '+' concatenates what does '-' do?
>
> : )
>
> -Jason
>
>
>
>
> On Wed, 2002-06-05 at 09:39, Andrei Zmievski wrote:
> > > > The latest one changes some operators.
> > >
> > > Nice, but why not overload + for strings to do the concatenation?
> >
> > Doing that would be ambiguous, to say the least. PHP automatically
> > converts operand types with arithmetic + operator. What would you expect
> > the result of the following expressions to be:
> >
> > "1" + "2"
> > 1 + "2"
> > "2" + $a
> >
> > -Andrei
> > http://www.gravitonic.com/
> > * 2 + 2 = 5 for extremely large values of 2. *
> >
> > --
> > PHP Development Mailing List <http://www.php.net/>
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>