type encode to encoding
add comment phpdoc