<?php
$a = array('orange', 'apple', 'banana', 'pine');
for ($i = 1; $i < (1 << $len); $i++) {
$c = [];
for ($j = 0; $j < $len; $j++) {
if ($i & (1 << $j)) {
$c[] = $a[$j];
}
}
$list[] = $c;
}
PD9waHAKCiRhID0gYXJyYXkoJ29yYW5nZScsICdhcHBsZScsICdiYW5hbmEnLCAncGluZScpOwoKJGxlbiAgPSBjb3VudCgkYSk7CiRsaXN0ID0gYXJyYXkoKTsKCmZvciAoJGkgPSAxOyAkaSA8ICgxIDw8ICRsZW4pOyAkaSsrKSB7CiAgICAkYyA9IFtdOwogICAgZm9yICgkaiA9IDA7ICRqIDwgJGxlbjsgJGorKykgewogICAgCWlmICgkaSAmICgxIDw8ICRqKSkgewogICAgCQkkY1tdID0gJGFbJGpdOwogICAgCX0KICAgIH0KICAgICRsaXN0W10gPSAkYzsKfQoKcHJpbnRfcigkbGlzdCk7