Open
Description
When having $a = array(&$a)
and calling var_export($a)
, instead of getting
PHP Warning: var_export does not handle circular references in php shell code on line 1
array (
0 => NULL,
)
we could make it return an IIFE like ((function(){$a = array(&$a);return $a;})())
so we can declare that circular reference using a variable without the risk to change variables in the code where the output of var_export()
will be used.