One thing that's always bothered me about PHP is that the function names
are not terribly consistent.  For example, when are underscores okay?
strip_tags() has an underscore but stripslashes() does not.  Also,
should inverse functions be named appropriately?  htmlentities() and
html_entity_decode() are inverse functions.  But seems to make more
sense to rename htmlentities() to html_entity_encode().  Something like
a class[_subclass1[_subclass2[...]]]_method nomenclature makes sense.

Then you have really weird stuff.  For example, md5() is listed as a
"string function" since it takes a string, calculates the MD5 hash, and
returns said hash.  Makes sense.  Then you have md5_file(), which takes
a filename, calculates the MD5 hash of the file's contents, and returns
said hash.  But md5_file() is listed as a "string function".  To me, it
makes more sense to be classified as a "filesystem function", and maybe
even rename the function to file_md5().

Thoughts?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to