• PHP Video Tutorials

PHP - debug_zval_dump() Function



Definition and Usage

The function debug_zval_dump() outputs a string representation of an internal zval(Zend value) structure to output. This is mostly useful for understanding or debugging implementation details of the Zend Engine or PHP extensions.

Syntax

void debug_zval_dump ( mixed $value , mixed $values )

Parameters

Sr.No Parameter Description
1

value

The variable or value to dump.

2

values

Further variables or values to dump.

Return Values

This function returns no value.

Dependencies

PHP 4.2 and above

Example

Following example creates a standard absolute deviation of an array:

  <?php
  $var1 = 'Welcome';
  $var1 .= ' tutorialpoint';
  $var2 = $var1;
  debug_zval_dump($var1);
  ?>

Output

This will produce following result −

string(21) "Welcome tutorialpoint" refcount(3)

You can find more details on PHP referenc count here

Advertisements