I was feeding the output of my script into a Flash movie that displayed the number of bytes loaded. I didn't realize my script was spitting out an error message that made my Flash movie think it was getting data of various lengths...because it was.
I was also under the impression that characters in PHP were more than a byte in length, but I guess not. Now that I fixed my syntax, everything is working fine using strlen(). Thanks anyway.