public static function split($subject, $pattern, $flags = 0)
{
$reFlags = ($flags & self::OFFSET_CAPTURE ? PREG_SPLIT_OFFSET_CAPTURE : 0) | PREG_SPLIT_DELIM_CAPTURE;
$res = preg_split($pattern, $subject, -1, $reFlags);
if (preg_last_error()) {
// run-time error
trigger_error(@self::$messages[preg_last_error()], E_USER_WARNING);
}
return $res;
}