= 0x20 && $byte <= 0x7E) { $escaped .= $value[$offset]; continue; } $escaped .= \sprintf('\\x%02X', $byte); } return $escaped; } }