I am converting some Pascal to PHP. Inside a function of return type AnsiString
there are the following lines of code:
SetLength(Result, 3);
Move(I, Result[1], Length(Result));
I
is a Longint
with value 5051253. What ends up in Result
is 'u'#19'M'
.
How do I replicate that in PHP? What is it doing? I know Move
reads bytes from I
and puts them in Result
.