[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Variables taken as object references in PHP
From: |
Patrick ALLAERT |
Subject: |
Variables taken as object references in PHP |
Date: |
Wed, 23 Nov 2011 17:33:43 +0100 |
Hello,
I've found a little "bug" with global and PHP
Reproduce sequence:
$ mkdir test
$ echo '<?php
class FooBar {}
$xFooBar = new FooBar;
$yFooBar = new FooBar;
$FooBar = "test";' > test/FooBar.php
$ cd test/
$ gtags
$ global -rx FooBar
FooBar 4 FooBar.php $xFooBar = new FooBar;
FooBar 5 FooBar.php $yFooBar = new FooBar;
FooBar 7 FooBar.php $FooBar = "test";
$ global -rx yFooBar
$
To me:
FooBar 7 FooBar.php $FooBar = "test";
Should not be a reference to the FooBar object.
When doing:
$ global -rx yFooBar
The behaviour looks correct by not returning any line.
Regards,
--
Patrick Allaert
- Variables taken as object references in PHP,
Patrick ALLAERT <=