leeoniya/dump_r.php — Issue #26: detect array references + infinite array recursions
Author: leeoniya
Created: 2012-01-28 03:54:10+00:00
State: open

PHP sucks, and provides no way to do this. even hacking it by using print_r or serialize only tells you if there is recursion, but not where.

http://stackoverflow.com/questions/9042142/detecting-infinite-array-recursion-in-php

https://bugs.php.net/bug.php?id=51533

```
// recursion
$arr = array();
$arr = array(&$arr);

// references
$moo = array();
$arr = array();
$arr[] = &$moo;
$arr[] = &$moo;
var_dump($arr);
```