my approach for quoted printable encode using the stream converting abilities
<?php
/**
* @param string $str
* @return string
* */
function quoted_printable_encode($str) {
$fp = fopen('php://temp', 'w+');
stream_filter_append($fp, 'convert.quoted-printable-encode');
fwrite($fp, $str);
fseek($fp, 0);
$result = '';
while(!feof($fp))
$result .= fread($fp, 1024);
fclose($fp);
return $result;
}
?>