1

In learning zval and reference counter, I declared an INTERNED STRING and ran it in PHP 7.2. The result of refcount was 0, but refcount was 1 in PHP 7.3. Why?

$a = '123';
$b = $a;

xdebug_debug_zval('a');
xdebug_debug_zval('b');

enter image description here

enter image description here

Dharman
  • 30,962
  • 25
  • 85
  • 135
林益远
  • 11
  • 1

0 Answers0