bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Variables taken as object references in PHP


From: Patrick ALLAERT
Subject: Re: Variables taken as object references in PHP
Date: Thu, 24 Nov 2011 07:06:45 +0100

2011/11/24 Shigio YAMAGUCHI <address@hidden>:
> Hello,
>> $ global -rx FooBar
>> FooBar              4 FooBar.php       $xFooBar = new FooBar;
>> FooBar              5 FooBar.php       $yFooBar = new FooBar;
>> FooBar              7 FooBar.php       $FooBar = "test";
> ...
>> To me:
>> FooBar              7 FooBar.php       $FooBar = "test";
>> Should not be a reference to the FooBar object.
>
> Do you mean that 'name' and '$name' shoud be distinguished
> as another name like follows?

They are for sure completely unrelated "objects" but IMO, (PHP)
variables should never be considered as "objects" at all.
So '$name' should just not be considered nor as a definition, nor as a
reference.

> $ global -rx FooBar
> FooBar              4 FooBar.php       $xFooBar = new FooBar;
> FooBar              5 FooBar.php       $yFooBar = new FooBar;
>
> $ global -sx \$FooBar
> FooBar              7 FooBar.php       $FooBar = "test";
> --
> Shigio YAMAGUCHI <address@hidden>
> PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

An alternative would be to be able to configure, like in ctags, what
kind of "objects" are taken into account
(classes/methods/variables/interfaces/...)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]