No. is_ref doesn't tell anything like this, from PHP point of view. In
fact, entering it in var_dump was rather bad idea, because it's an
internal flag, which doesn't say a lot on what's really happening.
I still can´t imainge the reason why it is set after that method call, will search in source...
I have a patch for var_dump to work correctly with references,
is it great news or is it fantastic news? :)
the only
problem is that I'm unable to design a format which will say where these
references are pointing. The best I could this of is something like that:
array(3) {
[0]=>
&int(1) {1}
[1]=>
int(2) {2}
[3]=>
reference to {1}
}
But this looks extremely ugly, especially because of the extra numbers...
don´t do that!!! that´s what we (including you) are fighting against,
"reference to..." is evil :)
why not simlply
array(3) {
[0]=> int{&1}(1)
[1]=> int(2)
[3]=> int{&1} }
only variables with ref_count>1 will be attached on {} index thing and only the elements of the first one will be displayed (as already implemented)
clear, easy to read
andré
--
· André Langhorst · t: +49 571 3201801 ·
· waldschrott@php.net · m: +49 173 9558736 ·
· PHP Quality Assurance · http://qa.php.net ·