On Wed, 26 Jan 2005 21:20:01 +0100, rw <rwas8@gazeta.p l> wrote:
[color=blue]
>In php 5.0.3 i found that
>$s="a";
>if(isset($s->prop))
>echo "surprise";
>
>In previous php it was false;
>Is it bug?[/color]
Looks like one, it's certainly inconsistent. Consider:
"rw" <rwas8@gazeta.p l> wrote in message
news:ct8uav$4hr $1@nemesis.news .tpi.pl...[color=blue]
> In php 5.0.3 i found that
> $s="a";
> if(isset($s->prop))
> echo "surprise";
>
> In previous php it was false;
> Is it bug?
> --
> Rob Was[/color]
Hmmm...interest ing. Seems to suggest that there's an alternate universe of
sort existing within the string.
empty() exhibits the same effect. Somehow "$s->prop" is being translated to
"$s{0}" inside isset(). If the string begins with "0", then isset() returns
false.
Comment