04-23-2008, 12:18 AM
|
#3 (permalink)
|
|
The Prestige
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
|
Quote:
Originally Posted by Salathe
After looking at the relevant PHP source code (in ext/standard/var.c for those interested) it appears as though your assumption is correct. debug_zval_dump simply displays the associated refcount whereas var_dump does not.
As for your code snippet, debug_zval_dump would report a refcount of 4, believe it or not. Once (1) for the first assignment of "Hello" to $var1. Another (2) for the assign-by-reference to $var2. Another (3) for the assign-by-reference to $var3. Finally another (4) reference is made when calling debug_zval_dump.
|
'
I guess that's because of me referencing in the arguments of the function?
__________________
VillageIdiot can have my babbies ;d
|
|
|
|