I'm opening up several new threads to get discussion going on the
remaining "being debated" categories referenced in this 1.1 -> 1.2
change spec:
https://wiki.php.net/rfc/propertygetsetsyntax-as-implemented/change-requests
Hi!
> 1. If all cases can be tested for during compilation, prefer
> compile failures.
Not likely. isset($foo->$bar) is completely opaque since we don't know
what $foo or $bar is.
> 2. Let the compilation occur and at runtime when a disallowed
> action is attempted, emit a wa
That's basically what #2 is getting at, my only question is, emit a
warning or notice or not?
Technically returning false on an invalid isset() call could be
misleading without emitting some kind of notice or warning about it.
On 10/26/2012 9:56 AM, Stas Malyshev wrote:
Hi!
1. If al
hi Clint,
On Sat, Oct 27, 2012 at 7:39 PM, Clint Priest wrote:
> That's basically what #2 is getting at, my only question is, emit a warning
> or notice or not?
>
> Technically returning false on an invalid isset() call could be misleading
> without emitting some kind of notice or warning about i
So... to be explicit here, you think in this situation:
class a {
public $b {
set($x) { $this->b = $x; }
}
}
$o = new a();
if(!isset($o->b)) {
/* delete files */
}
echo (int)isset($o->b); /* This should return false and not emit any
sort of warning/notice? */
I mean specifically,
On 29/10/12 03:02, Clint Priest wrote:
So... to be explicit here, you think in this situation:
class a {
public $b {
set($x) { $this->b = $x; }
}
}
$o = new a();
if(!isset($o->b)) {
/* delete files */
}
echo (int)isset($o->b); /* This should return false and not emit any
sort of w
That's pretty fair, that last statement... As far as an application is
concerned $o->b doesn't exist because it can't be read.
Seems as though some developers are going to want to know when they've
tried to violate it though... I dunno. Personally I would consider it
error or warning worthy b
> -Original Message-
> From: Clint Priest [mailto:cpri...@zerocue.com]
> Sent: 28 October 2012 16:03
>
> So... to be explicit here, you think in this situation:
>
> class a {
>public $b {
> set($x) { $this->b = $x; }
>}
> }
>
> $o = new a();
>
> if(!isset($o->b)) {
>/*
Hi!
> So... to be explicit here, you think in this situation:
>
> class a {
>public $b {
> set($x) { $this->b = $x; }
>}
> }
>
> $o = new a();
>
> if(!isset($o->b)) {
>/* delete files */
> }
> echo (int)isset($o->b); /* This should return false and not emit any
> sort of war
Hi!
> Is there another class of error that would make more sense? Don't most
> people turn off E_NOTICE errors? Perhaps emit an E_STRICT?
I always run with E_NOTICE in development, that's kind of what E_NOTICE
is for :) I don't think isset() should produce any warnings/notices -
this is how it
Would you say the same of unset? Always benign?
On 10/29/2012 2:14 PM, Stas Malyshev wrote:
Hi!
So... to be explicit here, you think in this situation:
class a {
public $b {
set($x) { $this->b = $x; }
}
}
$o = new a();
if(!isset($o->b)) {
/* delete files */
}
echo (int)
Bringing up this old issue a bit.
Nothing was ever said of unset? Should unset be benign?
Since unset() is intended to take an action (rather than check on state)
shouldn't an invalid unset (one with a guarded property that doesn't
have a setter) emit a warning?
On 10/30/2012 10:37 PM, Clin
12 matches
Mail list logo