php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #1250 logical operators dont pass value
Submitted: 1999-03-20 19:19 UTC Modified: 2000-08-09 22:19 UTC
From: kundrat at general-it dot sk Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 3.0.7 OS: linux 2.2.1 glibc 2.0.7
Private report: No CVE-ID: None
 [1999-03-20 19:19 UTC] kundrat at general-it dot sk
Perl's behaviour of || and && that passes value (e.g.
"0 || 4 = 4" or "1 && 5 = 5" is quite powerfull and
allows for easily written constructs.
I understand that php defines boolean ops to return 0 or 1,
but this change could be worth changing the definition
(maybe for PHP4).
The change itself would be trivial (3 lines).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-09 22:19 UTC] hholzgra@php.net
well, php4 has bin published now, so this is not likely to
be changend in near or distant future, so it will continue
to be Cish instead of PERLish here
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 02:01:30 2024 UTC