Actually, the `else` clause can be avoided by always defining `$child = array()`