Well, here's your code.
$asciiDash = '&#' . str_pad('' . ord('-'), 3 - strlen('' . ord('-')), '0', STR_PAD_LEFT) . ';';
Let's walk through it ourselves, shall we?
ord('-') is 45; and we turn that into a string so it's "45".
$asciiDash = '&#' . str_pad("45", 3 - strlen("45"), '0', STR_PAD_LEFT) . ';';
the length of the string "45" is 2.
$asciiDash = '&#' . str_pad("45", 3 - 2, '0', STR_PAD_LEFT) . ';';
And of course 3-2 = 1 (as Installer pointed out; sorry if the maths confuses you - can't be helped I'm afraid).
$asciiDash = '&#' . str_pad("45", 1, '0', STR_PAD_LEFT) . ';';
Now, what does the manual say for [man]str_pad[/man]?
This functions returns the input string padded on the left, the right, or both sides to the specified padding length.
The input string in this case is "45", the padding length is 1, and the string to pad with is "0". Oh, and we'll be padding on the left.
The manual also says
If the value of pad_length is negative or less than the length of the input string, no padding takes place.
As observed, the value of pad_length is one, and the length of the input string is two. So, no padding takes place.