} else {
				$out[$title] = vartype($val);
			}
		}
	}
	//ksort($out,SORT_NATURAL);
	return($out);
}
*/
function Tree($data, $path = '')
{
    $out = array();
    foreach ($data as $key => $val) {
        $idx = "{$path}/{$key}";
        if (is_array($val)) {
            $out[$idx] = Tree($val, "{$path}/{$key}");
        } else {
            $out[$idx] = $val;
        }
    }
    return $out;
}
$tree = Tree($theater);
$schema = ParseIt($theater);
file_put_contents("out/schema.tree", var_export($tree, true));
file_put_contents("out/schema.array", var_export($schema, true));
file_put_contents("out/schema.yaml", Spyc::YAMLDump($schema));
file_put_contents("out/theater.array", var_export($theater, true));
$reader = new KVReader();
$reader->writeFile("out/theater", $theater);