I'm reprogramming a system from a client and need to convert a function in Delphi to PHP to complete a system step and I'm having trouble with that ... could you give me a help .. thank you in advance .. follow the code below that needs to be converted to PHP:
Function CalcRegistro(Codigo: String): String;
Var vCod: Extended;
vCnt, vAsc: LongInt;
vStr: String[128];
Begin
vCod:= 0;
vStr:= Copy(Codigo + RepeatStr(' ',128), 1, 128);
For vCnt := 1 to 128 do
Begin
vAsc:= Ord(vStr[vCnt]);
vAsc:= (vAsc + (128-vCnt));
vCod:= vCod + Power(vAsc,6);
End;
Result:= FloatToStrF(vCod, ffFixed, 16, 0);
End;