<?php
foreach ($ary=array("○", "○", "○", "△", "△", "☓") as $val1) foreach ($ary as $val2)
$a[$x=$val1>$val2?
$val1.$val2:$val2.$val1] = isset($a[$x]) ?
++$a[$x] : 1;
PD9waHAKZm9yZWFjaCAoJGFyeT1hcnJheSgi4peLIiwgIuKXiyIsICLil4siLCAi4pazIiwgIuKWsyIsICLimJMiKSBhcyAkdmFsMSkKCWZvcmVhY2ggKCRhcnkgYXMgJHZhbDIpCgkJJGFbJHg9JHZhbDE+JHZhbDI/JHZhbDEuJHZhbDI6JHZhbDIuJHZhbDFdID0gaXNzZXQoJGFbJHhdKSA/ICsrJGFbJHhdIDogMTsKYXJzb3J0KCRhKTsKcHJpbnRfcigkYSk7