<?php /** * unity * * Returns digit summation of any numerical value given for passkey (up to 14 digits in length) * * @version 1.2 * @author Contributors at eXorithm * @link /algorithm/view/unity Listing at eXorithm * @link /algorithm/history/unity History at eXorithm * @license /home/show/license * * @param number $passkey enter any numerical "whole" digits (non-negative) * @return mixed */ function unity($passkey=75025) { $ubn = array(); while ($passkey > 9) { if (strlen($passkey) > 1) $passkey = array_sum(str_split($passkey)); else $passkey = $passkey; } $ubn[] = $passkey; return end($ubn); } ?>