Php reference count query

We can use xdebug_debug_zval () to view two pieces of information about the zval container, refcount and is_ref.

<?php

$a = 123456789;

xdebug_debug_zval ("a");

echo "PHP:" . PHP_VERSION;

?>

print out on the page:

a:
(refcount=0, is_ref=0)int 123456789
PHP:7.0.20

No, how to refcount = 0? remember that the document is 1 after assignment. Let"s try a piece of code

<?php

$a = (string)123456789;

xdebug_debug_zval ("a");

echo "PHP:" . PHP_VERSION;

?>

print out the result:

a:
(refcount=1, is_ref=0)string "123456789" (length=9)
PHP:7.0.20
Whether

must be a string. Then I"ll just pass in the string

.
$a = "123456789";

the result is still refcount=0. That"s weird.

I wonder why refcount equals 0.

Php
Mar.20,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e43861-44a4d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e43861-44a4d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?