public static function SplitIntoSegments($number)
	{
		$number_str = $number->GetStringValue();
		$segments = [];
		$NumberSegments = [];

		while (strlen($number_str) > 0)
		{
			if (strlen($number_str) < 3)
			{
				$segments[] = $number_str;

				break;
			}

			$segment = substr($number_str, -3);
			$number_str = substr($number_str, 0, strlen($number_str) - 3);

			$segments[] = $segment;
		}

		return array_reverse($segments);
	}
public static function SplitIntoSegments($number)
	{
		$number_str = $number->GetStringValue();
		$segments = [];
		$NumberSegments = [];

		while (strlen($number_str) > 0)
		{
			if (strlen($number_str) < 3)
			{
				$segments[] = $number_str;

				break;
			}

			$segment = substr($number_str, -3);
			$number_str = substr($number_str, 0, strlen($number_str) - 3);

			$segments[] = $segment;
		}

		return array_reverse($segments);
	}
public static function SplitIntoSegments ( $ number ) { $ number_str = $ number -> GetStringValue ( ) ; $ segments = [ ] ; $ NumberSegments = [ ] ; while ( strlen ( $ number_str ) > 0 ) { if ( strlen ( $ number_str ) < 3 ) { $ segments [ ] = $ number_str ; break ; } $ segment = substr ( $ number_str , - 3 ) ; $ number_str = substr ( $ number_str , 0 , strlen ( $ number_str ) - 3 ) ; $ segments [ ] = $ segment ; } return array_reverse ( $ segments ) ; }
This will split the number into chunks and then turn them each into NumberSegments.

@param $number NumberW
@return string[]
This will split the number into chunks and then turn them each into NumberSegments .