Re: what happened to that new isset() like language
| From: | Greg Beaver | Date: | Sat, 29 Oct 2005 05:32:08 +0000 |
| Subject: | Re: what happened to that new isset() like language | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-19807@lists.php.net to get a copy of this message | ||
James Crumpton wrote:
> Evaluating an idea based on it's syntactic similarities to other
> languages is complete and utter nonsense. It has nothing to with being
> like language Xyz. It has to do with familiarity to language constructs.
> One already understands the idea of 'this || that'. It's certainly
I'll throw the water on this one:
<?php
$c = 0;
$a = 1;
var_dump($c || $a);
?>
With the existing PHP, this script results in:
bool(true)
With your proposed change because it would return the first non-null set
variable, it will instead output:
int(0)
Changing true into false consitutes a rather severe BC break :).
Greg