Use the specified string length from Z_STRLEN instead of trying strlen ourselves.  Apparently strings from zvals aren't implicitly null-terminated?