<?php
// Integer.php

/**
 *
 */
class Integer
{
	/**
	 *
	 * @param $place
	 * @access public
	 */
	function getDigit($integer, $place)
	{
		$min_num = pow(10,$place);
		if( $integer < $min_num ) {
			return 0;
		}
		$num = (string)$integer;
		$num = (int)substr($num,strlen($num)-1-$place);
		return ( ($num - ($num % $min_num)) / $min_num );
	}
}
?>