/** * Converts an array variable to an instance of `PowerArray`. * @param array $a Variable. * @return PowerArray */ function toPA(array &$a) { return PowerArray::cast($a); }
/** * @param string $pattern A regular expression pattern. * @param int $limit [optional] * @return PowerArray */ function splitByPattern($pattern, $limit = -1) { self::toUnicodeRegex($pattern); return PowerArray::of(preg_split($pattern, $this->S, $limit)); }