Article View: comp.os.vms
Article #230Re: More PHP vulnerabilities
From: Dan Cross
Date: Sat, 21 Nov 2026 23:58
Date: Sat, 21 Nov 2026 23:58
65 lines
2820 bytes
2820 bytes
In article <6b021bab$0$672$14726298@news.sunsite.dk>,
Arne Vajhøj <arne@vajhoej.dk> wrote:
>On 11/20/2026 3:24 PM, Arne Vajhøj wrote:
>> On 11/20/2026 3:10 PM, Simon Clubley wrote:
>>> [snip]
>> Doesn't C require/mandate short circuiting in cases like this??
>
>I believe the VMS landscape looks like:
>
> Undefined(*) L to R L to R
> all short circuit
> [snip]
>VMS Fortran .and.
> .or.
>VMS Pascal and and_then
> or or_else
>C & &&
> | ||
>Ada and and then
> or or else
>Java & &&
> | ||
>Python & and
> | or
>PHP & &&
> | ||
> and(**)
> or(**)
>[snip]
For C, Java, Python, and (probably?) PHP, you are mixing up
different categories of operators: `&` and `|` are bitwise
operators in those languages, while `&&` and `||` are boolean
operators. Since they are intended to do differnt things, the
semantics are different.
I doubt that there are many many languages that would introduce
short-circuiting behavior for bitwise operators. But note also
that we may see behaviors like this:
```c
#include <stdio.h>
int
main(void)
{
int a = 1, b = 2;
if (a)
printf("a is true\n");
if (b)
printf("b is true\n");
if (a & b)
printf("both are true\n");
else
printf("but `&` is not a boolean operator\n");
return 0;
}
```
Moral of the story: don't lump boolean and bitwise operators
together like they are the same thing.
- Dan C.
Technical Details
Message-ID:
<11dtb70$t8$1@reader2.panix.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mailReferences:
<11dnpep$2kvk6$2@dont-email.me> <11dq9gg$3ghpm$1@dont-email.me> <11dqa7g$3guqc$1@dont-email.me> <6b021bab$0$672$14726298@news.sunsite.dk>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!weretis.net!feeder9.news.weretis.net!panix!.POSTED.spitfire.i.gajendra.net!not-for-mail From: cross@spitfire.i.gajendra.net (Dan Cross) Newsgroups: comp.os.vms Subject: Re: More PHP vulnerabilities Date: Sat, 21 Nov 2026 23:58:24 -0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Message-ID: <11dtb70$t8$1@reader2.panix.com> References: <11dnpep$2kvk6$2@dont-email.me> <11dq9gg$3ghpm$1@dont-email.me> <11dqa7g$3guqc$1@dont-email.me> <6b021bab$0$672$14726298@news.sunsite.dk> Injection-Date: Sat, 21 Nov 2026 23:58:24 -0000 (UTC) Injection-Info: reader2.panix.com; posting-host="spitfire.i.gajendra.net:166.84.136.80"; logging-data="936"; mail-complaints-to="abuse@panix.com" X-Newsreader: trn 4.0-test77 (Sep 1, 2010) Originator: cross@spitfire.i.gajendra.net (Dan Cross)