- substr: documentation ( source)
- round: documentation ( source)
- print_r: documentation ( source)
<?php
function checkOGRN($ogrn){
$verify_num = intval(substr($ogrn, 0, 12));
$check_num = intval(substr($ogrn, -1));
$res_num = $verify_num % 11;
if ($res_num > 9) $res_num - round($res_num/10)*10;
return ($result == $check);
}
print_r(checkOGRN('311333426300044'));