Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #5267 > unrolled thread

A little tip

Started byShelly <sheldonlg@thevillages.net>
First post2012-03-30 13:02 -0400
Last post2012-04-02 23:43 +0200
Articles 20 on this page of 34 — 10 participants

Back to article view | Back to comp.lang.php


Contents

  A little tip Shelly <sheldonlg@thevillages.net> - 2012-03-30 13:02 -0400
    Re: A little tip Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-30 13:20 -0400
      Re: A little tip Shelly <sheldonlg@thevillages.net> - 2012-03-30 14:18 -0400
        Re: A little tip Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-30 16:19 -0400
        Re: A little tip Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2012-03-30 22:30 +0200
          Re: A little tip Doug Miller <doug_at_milmac_dot_com@example.com> - 2012-03-30 20:55 +0000
          Re: A little tip Shelly <sheldonlg@thevillages.net> - 2012-03-30 16:55 -0400
            Re: A little tip Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-30 17:07 -0400
            Re: A little tip Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-31 10:05 -0400
              Re: A little tip Shelly <sheldonlg@thevillages.net> - 2012-03-31 11:27 -0400
            Re: A little tip Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-03 15:52 +0200
              Re: A little tip Shelly <sheldonlg@thevillages.net> - 2012-04-03 10:20 -0400
      Re: A little tip Doug Miller <doug_at_milmac_dot_com@example.com> - 2012-03-30 19:36 +0000
        Re: A little tip Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-30 16:21 -0400
          Re: A little tip Doug Miller <doug_at_milmac_dot_com@example.com> - 2012-03-30 20:52 +0000
            Re: A little tip Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-30 17:08 -0400
              Re: A little tip Shelly <sheldonlg@thevillages.net> - 2012-03-30 17:22 -0400
                Re: A little tip "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2012-03-30 18:00 -0500
                  Re: A little tip Scott Johnson <noonehome@chalupasworld.com> - 2012-03-30 20:33 -0700
            Re: A little tip Shelly <sheldonlg@thevillages.net> - 2012-03-30 17:20 -0400
              Re: A little tip Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-04-03 15:56 +0200
                Re: A little tip Shelly <sheldonlg@thevillages.net> - 2012-04-03 10:20 -0400
            Re: A little tip Michael Fesser <netizen@gmx.de> - 2012-03-31 05:04 +0200
              Re: A little tip Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-30 23:31 -0400
            Re: A little tip Scott Johnson <noonehome@chalupasworld.com> - 2012-03-30 20:35 -0700
              Re: A little tip Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-30 23:53 -0400
                Re: A little tip Doug Miller <doug_at_milmac_dot_com@example.com> - 2012-03-31 11:58 +0000
                  Re: A little tip Jerry Stuckle <jstucklex@attglobal.net> - 2012-03-31 09:05 -0400
    Re: A little tip "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-04-02 09:42 +0200
      Re: A little tip "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-04-02 10:22 +0200
        Re: A little tip Shelly <sheldonlg@thevillages.net> - 2012-04-02 08:15 -0400
          Re: A little tip "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-04-02 14:27 +0200
            Re: A little tip Shelly <sheldonlg@thevillages.net> - 2012-04-02 09:40 -0400
              Re: A little tip "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-04-02 23:43 +0200

Page 1 of 2  [1] 2  Next page →


#5267 — A little tip

FromShelly <sheldonlg@thevillages.net>
Date2012-03-30 13:02 -0400
SubjectA little tip
Message-ID<jl4ovl$h2i$1@dont-email.me>
Here is something I jist came across, so I am passing it on:
==========
$val= TRUE;
$val &= TRUE;
print ($val === TRUE) ? "Triple is true\n" : "Triple is false\n";
print ($val == TRUE) ? "Double is true\n" : "Double is false\n";

Results in:
Triple is false
Double is true
==========

Who designed that?  It is totally counter-intuitive.

-- 
Shelly

[toc] | [next] | [standalone]


#5268

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-03-30 13:20 -0400
Message-ID<jl4q1i$top$1@dont-email.me>
In reply to#5267
On 3/30/2012 1:02 PM, Shelly wrote:
> Here is something I jist came across, so I am passing it on:
> ==========
> $val= TRUE;
> $val &= TRUE;
> print ($val === TRUE) ? "Triple is true\n" : "Triple is false\n";
> print ($val == TRUE) ? "Double is true\n" : "Double is false\n";
>
> Results in:
> Triple is false
> Double is true
> ==========
>
> Who designed that? It is totally counter-intuitive.
>

Yes, just another problem with PHP.  After the second assignment, $val 
is actually a reference to TRUE.  However, a variable should not be able 
to reference a constant.  For instance, what would the following do?

$val &= TRUE;
$val = 3;

Are we setting TRUE to 3 (that's what a reference should do, after all).

This is why other languages don't allow references to constants.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#5269

FromShelly <sheldonlg@thevillages.net>
Date2012-03-30 14:18 -0400
Message-ID<jl4te2$hi5$1@dont-email.me>
In reply to#5268
On 3/30/2012 1:20 PM, Jerry Stuckle wrote:
> On 3/30/2012 1:02 PM, Shelly wrote:
>> Here is something I jist came across, so I am passing it on:
>> ==========
>> $val= TRUE;
>> $val &= TRUE;
>> print ($val === TRUE) ? "Triple is true\n" : "Triple is false\n";
>> print ($val == TRUE) ? "Double is true\n" : "Double is false\n";
>>
>> Results in:
>> Triple is false
>> Double is true
>> ==========
>>
>> Who designed that? It is totally counter-intuitive.
>>
>
> Yes, just another problem with PHP. After the second assignment, $val is
> actually a reference to TRUE. However, a variable should not be able to
> reference a constant. For instance, what would the following do?
>
> $val &= TRUE;
> $val = 3;
>
> Are we setting TRUE to 3 (that's what a reference should do, after all).
>
> This is why other languages don't allow references to constants.

Huh?  How is it a reference?  I wrote

$val = TRUE;

That sets TRUE as the value contained in the location specified by the 
variable $val.

Then I wrote

$val &= TRUE;

which is identical to

$val = $val && TRUE;

isn't it, which should put into the location of $val the resulting value 
of the logical operation of TRUE AND TRUE -- which SHOULD be TRUE. 
Instead, it is something other than FALSE or ZERO, but not === to TRUE.

Your answer seems to be as if I had written

$val = &TRUE;
$val = 3;

Am I missing something here?

-- 
Shelly

[toc] | [prev] | [next] | [standalone]


#5271

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-03-30 16:19 -0400
Message-ID<jl54hg$bv5$1@dont-email.me>
In reply to#5269
On 3/30/2012 2:18 PM, Shelly wrote:
> On 3/30/2012 1:20 PM, Jerry Stuckle wrote:
>> On 3/30/2012 1:02 PM, Shelly wrote:
>>> Here is something I jist came across, so I am passing it on:
>>> ==========
>>> $val= TRUE;
>>> $val &= TRUE;
>>> print ($val === TRUE) ? "Triple is true\n" : "Triple is false\n";
>>> print ($val == TRUE) ? "Double is true\n" : "Double is false\n";
>>>
>>> Results in:
>>> Triple is false
>>> Double is true
>>> ==========
>>>
>>> Who designed that? It is totally counter-intuitive.
>>>
>>
>> Yes, just another problem with PHP. After the second assignment, $val is
>> actually a reference to TRUE. However, a variable should not be able to
>> reference a constant. For instance, what would the following do?
>>
>> $val &= TRUE;
>> $val = 3;
>>
>> Are we setting TRUE to 3 (that's what a reference should do, after all).
>>
>> This is why other languages don't allow references to constants.
>
> Huh? How is it a reference? I wrote
>
> $val = TRUE;
>
> That sets TRUE as the value contained in the location specified by the
> variable $val.
>
> Then I wrote
>
> $val &= TRUE;
>
> which is identical to
>
> $val = $val && TRUE;
>
> isn't it, which should put into the location of $val the resulting value
> of the logical operation of TRUE AND TRUE -- which SHOULD be TRUE.
> Instead, it is something other than FALSE or ZERO, but not === to TRUE.
>
> Your answer seems to be as if I had written
>
> $val = &TRUE;
> $val = 3;
>
> Am I missing something here?
>

You're right, Shelly - it's AND instead of reference.  I was mixing it 
up with $val = &TRUE.

But this is a bitwise AND - which means the TRUE will be converted to an 
integer 1 and the result will be an integer 1.  It is non-zero, so it is 
TRUE, but it is not a logical TRUE.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#5273

FromThomas Mlynarczyk <thomas@mlynarczyk-webdesign.de>
Date2012-03-30 22:30 +0200
Message-ID<jl554d$1s6$1@news.albasani.net>
In reply to#5269
Shelly schrieb:

> $val = TRUE;

> $val &= TRUE;
> 
> which is identical to
> 
> $val = $val && TRUE;

No. &= is a bitwise operator while && means the logical AND operator. So 
when you do $val &= TRUE, PHP is trying to do TRUE & TRUE, but since 
bitwise operators only work with integers, TRUE is first coerced into 
the integer 1. So the operation ends up as 1 & 1 yielding the integer 1. 
Thus, $val = 1. The === operator checks the type of the operands which 
are int and bool and thus not the same, while == tries to convert the 
operands into something "comparable" and since they are both "truish" 
the result is TRUE here.

Greetings,
Thomas


-- 
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)

[toc] | [prev] | [next] | [standalone]


#5275

FromDoug Miller <doug_at_milmac_dot_com@example.com>
Date2012-03-30 20:55 +0000
Message-ID<XnsA026AC2CB447dougmilmaccom@88.198.244.100>
In reply to#5273
Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> wrote in news:jl554d$1s6$1
@news.albasani.net:

> Shelly schrieb:
> 
>> $val = TRUE;
> 
>> $val &= TRUE;
>> 
>> which is identical to
>> 
>> $val = $val && TRUE;
> 
> No. &= is a bitwise operator while && means the logical AND operator. So 
> when you do $val &= TRUE, PHP is trying to do TRUE & TRUE, but since 
> bitwise operators only work with integers, TRUE is first coerced into 
> the integer 1. So the operation ends up as 1 & 1 yielding the integer 1. 
> Thus, $val = 1. The === operator checks the type of the operands which 
> are int and bool and thus not the same, while == tries to convert the 
> operands into something "comparable" and since they are both "truish" 
> the result is TRUE here.

More precisely, the reason for the difference is that == means "equivalent" and === means 
"identical". Since one value is integer and the other value is Boolean, they are equivalent 
but not identical.

[toc] | [prev] | [next] | [standalone]


#5276

FromShelly <sheldonlg@thevillages.net>
Date2012-03-30 16:55 -0400
Message-ID<jl56kh$6ku$1@dont-email.me>
In reply to#5273
On 3/30/2012 4:30 PM, Thomas Mlynarczyk wrote:
> Shelly schrieb:
>
>> $val = TRUE;
>
>> $val &= TRUE;
>>
>> which is identical to
>>
>> $val = $val && TRUE;
>
> No. &= is a bitwise operator while && means the logical AND operator. So
> when you do $val &= TRUE, PHP is trying to do TRUE & TRUE, but since
> bitwise operators only work with integers, TRUE is first coerced into
> the integer 1. So the operation ends up as 1 & 1 yielding the integer 1.
> Thus, $val = 1. The === operator checks the type of the operands which
> are int and bool and thus not the same, while == tries to convert the
> operands into something "comparable" and since they are both "truish"
> the result is TRUE here.
>
> Greetings,
> Thomas
>

Thank you.  That makes a lot of sense.  So, what I have to do if I want 
to use === is to use the expanded form

$val = $val && TRUE;

Right?


-- 
Shelly

[toc] | [prev] | [next] | [standalone]


#5277

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-03-30 17:07 -0400
Message-ID<jl57a0$ada$1@dont-email.me>
In reply to#5276
On 3/30/2012 4:55 PM, Shelly wrote:
> On 3/30/2012 4:30 PM, Thomas Mlynarczyk wrote:
>> Shelly schrieb:
>>
>>> $val = TRUE;
>>
>>> $val &= TRUE;
>>>
>>> which is identical to
>>>
>>> $val = $val && TRUE;
>>
>> No. &= is a bitwise operator while && means the logical AND operator. So
>> when you do $val &= TRUE, PHP is trying to do TRUE & TRUE, but since
>> bitwise operators only work with integers, TRUE is first coerced into
>> the integer 1. So the operation ends up as 1 & 1 yielding the integer 1.
>> Thus, $val = 1. The === operator checks the type of the operands which
>> are int and bool and thus not the same, while == tries to convert the
>> operands into something "comparable" and since they are both "truish"
>> the result is TRUE here.
>>
>> Greetings,
>> Thomas
>>
>
> Thank you. That makes a lot of sense. So, what I have to do if I want to
> use === is to use the expanded form
>
> $val = $val && TRUE;
>
> Right?
>
>

Yes, that should work just fine.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#5289

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-03-31 10:05 -0400
Message-ID<jl72vo$aea$1@dont-email.me>
In reply to#5276
On 3/30/2012 4:55 PM, Shelly wrote:
> On 3/30/2012 4:30 PM, Thomas Mlynarczyk wrote:
>> Shelly schrieb:
>>
>>> $val = TRUE;
>>
>>> $val &= TRUE;
>>>
>>> which is identical to
>>>
>>> $val = $val && TRUE;
>>
>> No. &= is a bitwise operator while && means the logical AND operator. So
>> when you do $val &= TRUE, PHP is trying to do TRUE & TRUE, but since
>> bitwise operators only work with integers, TRUE is first coerced into
>> the integer 1. So the operation ends up as 1 & 1 yielding the integer 1.
>> Thus, $val = 1. The === operator checks the type of the operands which
>> are int and bool and thus not the same, while == tries to convert the
>> operands into something "comparable" and since they are both "truish"
>> the result is TRUE here.
>>
>> Greetings,
>> Thomas
>>
>
> Thank you. That makes a lot of sense. So, what I have to do if I want to
> use === is to use the expanded form
>
> $val = $val && TRUE;
>
> Right?
>
>

I should also add that you need to be careful and use the correct 
operator.  For instance, 2 & TRUE is false, while 2 && TRUE is true.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#5290

FromShelly <sheldonlg@thevillages.net>
Date2012-03-31 11:27 -0400
Message-ID<jl77o9$6t1$1@dont-email.me>
In reply to#5289
On 3/31/2012 10:05 AM, Jerry Stuckle wrote:
> On 3/30/2012 4:55 PM, Shelly wrote:
>> On 3/30/2012 4:30 PM, Thomas Mlynarczyk wrote:
>>> Shelly schrieb:
>>>
>>>> $val = TRUE;
>>>
>>>> $val &= TRUE;
>>>>
>>>> which is identical to
>>>>
>>>> $val = $val && TRUE;
>>>
>>> No. &= is a bitwise operator while && means the logical AND operator. So
>>> when you do $val &= TRUE, PHP is trying to do TRUE & TRUE, but since
>>> bitwise operators only work with integers, TRUE is first coerced into
>>> the integer 1. So the operation ends up as 1 & 1 yielding the integer 1.
>>> Thus, $val = 1. The === operator checks the type of the operands which
>>> are int and bool and thus not the same, while == tries to convert the
>>> operands into something "comparable" and since they are both "truish"
>>> the result is TRUE here.
>>>
>>> Greetings,
>>> Thomas
>>>
>>
>> Thank you. That makes a lot of sense. So, what I have to do if I want to
>> use === is to use the expanded form
>>
>> $val = $val && TRUE;
>>
>> Right?
>>
>>
>
> I should also add that you need to be careful and use the correct
> operator. For instance, 2 & TRUE is false, while 2 && TRUE is true.
>

Thanks.  All my validation routines return either TRUE or FALSe.  I have 
a flag that repetitively goes something like this after initializing 
$theFlag to TRUE:

$theFlag = $theFlag && validation_routine_call(arguments);

for each of the many validation routines.

At the end I do something if $theFlag === TRUE, and don't if not.

What I had been doing, incorrectly, (which led me to start this thread) was:

$theFlag &= validation_routine_call(arguments);

-- 
Shelly

[toc] | [prev] | [next] | [standalone]


#5338

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2012-04-03 15:52 +0200
Message-ID<20840717.cCmZMDQWIF@PointedEars.de>
In reply to#5276
Shelly wrote:

> On 3/30/2012 4:30 PM, Thomas Mlynarczyk wrote:
>> Shelly schrieb:
>>> $val = TRUE;
>>
>>> $val &= TRUE;
>>>
>>> which is identical to
>>>
>>> $val = $val && TRUE;
>>
>> No. &= is a bitwise operator while && means the logical AND operator. So
>> when you do $val &= TRUE, PHP is trying to do TRUE & TRUE, but since
>> bitwise operators only work with integers, TRUE is first coerced into
>> the integer 1. So the operation ends up as 1 & 1 yielding the integer 1.
>> Thus, $val = 1. The === operator checks the type of the operands which
>> are int and bool and thus not the same, while == tries to convert the
>> operands into something "comparable" and since they are both "truish"
>> the result is TRUE here.
> 
> Thank you.  That makes a lot of sense.  So, what I have to do if I want
> to use === is to use the expanded form
> 
> $val = $val && TRUE;

You keep missing the point.  That is _not_ "the expanded form" of anything.  
`&=' and `&&' are *different* operators; the first one is a *bitwise* 
operator, the second is a *logical* (boolean) one.

In that sense,

  x = x & 1;

is "the expanded form" of

  x &= 1;

<http://php.net/operators>

Please do not full-quote.


PointedEars
-- 
> If you get a bunch of authors […] that state the same "best practices"
> in any programming language, then you can bet who is wrong or right...
Not with javascript. Nonsense propagates like wildfire in this field.
  -- Richard Cornford, comp.lang.javascript, 2011-11-14

[toc] | [prev] | [next] | [standalone]


#5340

FromShelly <sheldonlg@thevillages.net>
Date2012-04-03 10:20 -0400
Message-ID<jlf0ub$k8d$1@dont-email.me>
In reply to#5338
On 4/3/2012 9:52 AM, Thomas 'PointedEars' Lahn wrote:
> You keep missing the point.  That is_not_  "the expanded form" of anything.
> `&=' and `&&' are*different*  operators; the first one is a*bitwise*
> operator, the second is a*logical*  (boolean) one.

I know.  I meant I couldn't use a form where the original is not 
included on the RHS.  I understand the difference and always did.  I 
just didn't realize that &= what the shortened form of "&" and not "&&".

-- 
Shelly

[toc] | [prev] | [next] | [standalone]


#5270

FromDoug Miller <doug_at_milmac_dot_com@example.com>
Date2012-03-30 19:36 +0000
Message-ID<XnsA0269EBA7CFBAdougmilmaccom@88.198.244.100>
In reply to#5268
Jerry Stuckle <jstucklex@attglobal.net> wrote in news:jl4q1i$top$1@dont-email.me:

> On 3/30/2012 1:02 PM, Shelly wrote:
>> Here is something I jist came across, so I am passing it on:
>> ==========
>> $val= TRUE;
>> $val &= TRUE;
>> print ($val === TRUE) ? "Triple is true\n" : "Triple is false\n";
>> print ($val == TRUE) ? "Double is true\n" : "Double is false\n";
>>
>> Results in:
>> Triple is false
>> Double is true
>> ==========
>>
>> Who designed that? It is totally counter-intuitive.
>>
> 
> Yes, just another problem with PHP.  After the second assignment, $val 
> is actually a reference to TRUE. 

It obviously is nothing of the sort. 

[toc] | [prev] | [next] | [standalone]


#5272

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-03-30 16:21 -0400
Message-ID<jl54k3$bv5$2@dont-email.me>
In reply to#5270
On 3/30/2012 3:36 PM, Doug Miller wrote:
> Jerry Stuckle<jstucklex@attglobal.net>  wrote in news:jl4q1i$top$1@dont-email.me:
>
>> On 3/30/2012 1:02 PM, Shelly wrote:
>>> Here is something I jist came across, so I am passing it on:
>>> ==========
>>> $val= TRUE;
>>> $val&= TRUE;
>>> print ($val === TRUE) ? "Triple is true\n" : "Triple is false\n";
>>> print ($val == TRUE) ? "Double is true\n" : "Double is false\n";
>>>
>>> Results in:
>>> Triple is false
>>> Double is true
>>> ==========
>>>
>>> Who designed that? It is totally counter-intuitive.
>>>
>>
>> Yes, just another problem with PHP.  After the second assignment, $val
>> is actually a reference to TRUE.
>
> It obviously is nothing of the sort.

And you're obviously trolling (which figures for you) and have no idea 
what his problem is - or you would have answered his question.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#5274

FromDoug Miller <doug_at_milmac_dot_com@example.com>
Date2012-03-30 20:52 +0000
Message-ID<XnsA026AB9C0D2BDdougmilmaccom@88.198.244.100>
In reply to#5272
Jerry Stuckle <jstucklex@attglobal.net> wrote in news:jl54k3$bv5$2@dont-email.me:

> On 3/30/2012 3:36 PM, Doug Miller wrote:
>> Jerry Stuckle<jstucklex@attglobal.net>  wrote in news:jl4q1i$top$1@dont-email.me:
>>
>>> On 3/30/2012 1:02 PM, Shelly wrote:
>>>> Here is something I jist came across, so I am passing it on:
>>>> ==========
>>>> $val= TRUE;
>>>> $val&= TRUE;
>>>> print ($val === TRUE) ? "Triple is true\n" : "Triple is false\n";
>>>> print ($val == TRUE) ? "Double is true\n" : "Double is false\n";
>>>>
>>>> Results in:
>>>> Triple is false
>>>> Double is true
>>>> ==========
>>>>
>>>> Who designed that? It is totally counter-intuitive.
>>>>
>>>
>>> Yes, just another problem with PHP.  After the second assignment, $val
>>> is actually a reference to TRUE.
>>
>> It obviously is nothing of the sort.
> 
> And you're obviously trolling (which figures for you) and have no idea 
> what his problem is - or you would have answered his question.
> 
Typical Stuckle -- never, EVER, under any circumstances admit to being wrong.

[toc] | [prev] | [next] | [standalone]


#5278

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-03-30 17:08 -0400
Message-ID<jl57ce$ada$2@dont-email.me>
In reply to#5274
On 3/30/2012 4:52 PM, Doug Miller wrote:
> Jerry Stuckle<jstucklex@attglobal.net>  wrote in news:jl54k3$bv5$2@dont-email.me:
>
>> On 3/30/2012 3:36 PM, Doug Miller wrote:
>>> Jerry Stuckle<jstucklex@attglobal.net>   wrote in news:jl4q1i$top$1@dont-email.me:
>>>
>>>> On 3/30/2012 1:02 PM, Shelly wrote:
>>>>> Here is something I jist came across, so I am passing it on:
>>>>> ==========
>>>>> $val= TRUE;
>>>>> $val&= TRUE;
>>>>> print ($val === TRUE) ? "Triple is true\n" : "Triple is false\n";
>>>>> print ($val == TRUE) ? "Double is true\n" : "Double is false\n";
>>>>>
>>>>> Results in:
>>>>> Triple is false
>>>>> Double is true
>>>>> ==========
>>>>>
>>>>> Who designed that? It is totally counter-intuitive.
>>>>>
>>>>
>>>> Yes, just another problem with PHP.  After the second assignment, $val
>>>> is actually a reference to TRUE.
>>>
>>> It obviously is nothing of the sort.
>>
>> And you're obviously trolling (which figures for you) and have no idea
>> what his problem is - or you would have answered his question.
>>
> Typical Stuckle -- never, EVER, under any circumstances admit to being wrong.
>

Typical Miller - can't read - or you'd already see where I corrected myself.

But then trolls never were known for their intelligence.  That's why 
they have to troll - otherwise they wouldn't have anything to say.  And 
that would be a huge blow to their egos!

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#5280

FromShelly <sheldonlg@thevillages.net>
Date2012-03-30 17:22 -0400
Message-ID<jl5877$iut$2@dont-email.me>
In reply to#5278
On 3/30/2012 5:08 PM, Jerry Stuckle wrote:
> On 3/30/2012 4:52 PM, Doug Miller wrote:
>> Jerry Stuckle<jstucklex@attglobal.net> wrote in
>> news:jl54k3$bv5$2@dont-email.me:
>>
>>> On 3/30/2012 3:36 PM, Doug Miller wrote:
>>>> Jerry Stuckle<jstucklex@attglobal.net> wrote in
>>>> news:jl4q1i$top$1@dont-email.me:
>>>>
>>>>> On 3/30/2012 1:02 PM, Shelly wrote:
>>>>>> Here is something I jist came across, so I am passing it on:
>>>>>> ==========
>>>>>> $val= TRUE;
>>>>>> $val&= TRUE;
>>>>>> print ($val === TRUE) ? "Triple is true\n" : "Triple is false\n";
>>>>>> print ($val == TRUE) ? "Double is true\n" : "Double is false\n";
>>>>>>
>>>>>> Results in:
>>>>>> Triple is false
>>>>>> Double is true
>>>>>> ==========
>>>>>>
>>>>>> Who designed that? It is totally counter-intuitive.
>>>>>>
>>>>>
>>>>> Yes, just another problem with PHP. After the second assignment, $val
>>>>> is actually a reference to TRUE.
>>>>
>>>> It obviously is nothing of the sort.
>>>
>>> And you're obviously trolling (which figures for you) and have no idea
>>> what his problem is - or you would have answered his question.
>>>
>> Typical Stuckle -- never, EVER, under any circumstances admit to being
>> wrong.
>>
>
> Typical Miller - can't read - or you'd already see where I corrected
> myself.
>
> But then trolls never were known for their intelligence. That's why they
> have to troll - otherwise they wouldn't have anything to say. And that
> would be a huge blow to their egos!
>

Who would have thought that my passing on the group something I learned 
would turn into yet another fight.  Sad, but I guess no good deed goes 
unpunished.

-- 
Shelly

[toc] | [prev] | [next] | [standalone]


#5281

From"Mr. B-o-B" <mr.chew.baka@gmail.com>
Date2012-03-30 18:00 -0500
Message-ID<alpine.LNX.2.00.1203301759180.12266@conan.grunners.com>
In reply to#5280
Shelly cried from the depths of the abyss...

> Who would have thought that my passing on the group something I learned would 
> turn into yet another fight.  Sad, but I guess no good deed goes unpunished.

It's pretty entertaining though!

Steps back into the shadows....



[toc] | [prev] | [next] | [standalone]


#5284

FromScott Johnson <noonehome@chalupasworld.com>
Date2012-03-30 20:33 -0700
Message-ID<jl5tvk$8m7$1@dont-email.me>
In reply to#5281
On 3/30/2012 4:00 PM, Mr. B-o-B wrote:
> Shelly cried from the depths of the abyss...
>
>> Who would have thought that my passing on the group something I
>> learned would turn into yet another fight. Sad, but I guess no good
>> deed goes unpunished.
>
> It's pretty entertaining though!
>
> Steps back into the shadows....
>
>
>
>

lmao, better then 'real tv'

[toc] | [prev] | [next] | [standalone]


#5279

FromShelly <sheldonlg@thevillages.net>
Date2012-03-30 17:20 -0400
Message-ID<jl582v$iut$1@dont-email.me>
In reply to#5274
On 3/30/2012 4:52 PM, Doug Miller wrote:
> Jerry Stuckle<jstucklex@attglobal.net>  wrote in news:jl54k3$bv5$2@dont-email.me:
>
>> On 3/30/2012 3:36 PM, Doug Miller wrote:
>>> Jerry Stuckle<jstucklex@attglobal.net>   wrote in news:jl4q1i$top$1@dont-email.me:
>>>
>>>> On 3/30/2012 1:02 PM, Shelly wrote:
>>>>> Here is something I jist came across, so I am passing it on:
>>>>> ==========
>>>>> $val= TRUE;
>>>>> $val&= TRUE;
>>>>> print ($val === TRUE) ? "Triple is true\n" : "Triple is false\n";
>>>>> print ($val == TRUE) ? "Double is true\n" : "Double is false\n";
>>>>>
>>>>> Results in:
>>>>> Triple is false
>>>>> Double is true
>>>>> ==========
>>>>>
>>>>> Who designed that? It is totally counter-intuitive.
>>>>>
>>>>
>>>> Yes, just another problem with PHP.  After the second assignment, $val
>>>> is actually a reference to TRUE.
>>>
>>> It obviously is nothing of the sort.
>>
>> And you're obviously trolling (which figures for you) and have no idea
>> what his problem is - or you would have answered his question.
>>
> Typical Stuckle -- never, EVER, under any circumstances admit to being wrong.
>

Uh, he did.

-- 
Shelly

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.php


csiph-web