I'm trying to implement a recursive container-like structure, and I can understand why a vanilla cyclic typedef would be impossible to realize, but why is the following disallowed as well?
typedef cycle = shape('cycle' => ?cycle); // Cyclic typedef (Typing[4014])
Creating one seems easy enough:
$cycle = shape('cycle'=>shape('cycle'=> /* shape(... =>*/ null /* ...) */));
And iterating through one should pose no problem either, right?
function recurse(cycle $cycle) {
if(!is_null($cycle['cycle'])) recurse($cycle['cycle']));
}