- var_dump: documentation ( source)
- json_encode: documentation ( source)
- define: documentation ( source)
<?php
if ( !defined( 'JSON_PARTIAL_OUTPUT_ON_ERROR' ) ) {
define( 'JSON_PARTIAL_OUTPUT_ON_ERROR', 0 );
}
$a = array();
$a[0] = 'A';
$a[1] =& $a;
$a[2] = 'B';
var_dump( json_encode( array( &$a ), JSON_PARTIAL_OUTPUT_ON_ERROR ) );