3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(); $a[] = &$a; var_dump($a); print_r($a);
based on RIiVs
Output for 7.0.0 - 7.2.0
array(1) { [0]=> &array(1) { [0]=> *RECURSION* } } Array ( [0] => Array *RECURSION* )
Output for 5.3.22 - 5.6.28
array(1) { [0]=> &array(1) { [0]=> *RECURSION* } } Array ( [0] => Array ( [0] => Array *RECURSION* ) )