<?php
function florg ($n, $elems) {
if ($n > 0) {
$res = florg($n-1, $elems);
foreach ($res as $ce) {
foreach ($elems as $e) {
}
}
return $tmp_set;
}
else {
}
}
$elems = array('A','B','C'); $v = FlOrG(3, $elems);
foreach($v as $child) {
print $child . "\n";
}
PD9waHAKZnVuY3Rpb24gZmxvcmcgKCRuLCAkZWxlbXMpIHsKCWlmICgkbiA+IDApIHsKCSAgJHRtcF9zZXQgPSBhcnJheSgpOwoJICAkcmVzID0gZmxvcmcoJG4tMSwgJGVsZW1zKTsKICAgICAgZm9yZWFjaCAoJHJlcyBhcyAkY2UpIHsKICAgICAgICAgIGZvcmVhY2ggKCRlbGVtcyBhcyAkZSkgewogICAgICAgICAgICAgYXJyYXlfcHVzaCgkdG1wX3NldCwgJGNlIC4gJGUpOwogICAgICAgICAgfQogICAgICAgfQoJICAgcmV0dXJuICR0bXBfc2V0OwoJfQoJZWxzZSB7CgkJcmV0dXJuIGFycmF5KCcnKTsKCX0KfQokZWxlbXMgPSBhcnJheSgnQScsJ0InLCdDJyk7CiR2ID0gRmxPckcoMywgJGVsZW1zKTsKZm9yZWFjaCgkdiBhcyAkY2hpbGQpIHsKICAgcHJpbnQgJGNoaWxkIC4gIlxuIjsKfQog