Пример #1
0
/**
 * Converts an array variable to an instance of `PowerArray`.
 * @param array $a Variable.
 * @return PowerArray
 */
function toPA(array &$a)
{
    return PowerArray::cast($a);
}
Пример #2
0
 /**
  * @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));
 }