PHP's debug_zval_dump takes a variable as argument for analysis and is thus also bound to the same splitting rules as outlined earlier. This means that's not really well suited for dumping a zval's internal structure as it would always modify the zval. Besides adding 1 to the refcount field, it could also force a split resulting in unexpected output:
<?php
$a = 42;
debug_zval_dump($a);
?>
shows:
long(42) refcount(2)
Xdebug has a similar function to display a zval's internal data: xdebug_debug_zval. This functiondoesrequiresnotavariabletobepassedasitsargument, butinsteadrequiresavariablenametobepassedin. Withthis, themanipulationofthezvalisavoidedandthepropervaluesareshown: