My view is that standard C-like functions should remain with their standard names, and not added aliases that only add underscores. The reason for this is simple - the C function names are extremely short, and they don't only save in the underscores, but in the words themselves. For instance, if we were to add a human-readable version of strtok(), it should probably be something like string_tokenize() or str_tokenize().
we have str_replace() and str_pad and the hell it sounds fine and everyone knows that str==string, thus
[+1] for creating a list with string functions which should *NOT* aliased and renamed
sure, we have two groups then, the one group with str_* and the other group with str* and maybe a few exceptions, but that will be an improvement over the current situation, the same with array*
that will also improve the match rate for code completing engines
(please note that I have also modified quotemeta to quote_meta and so on and I think similar_text should be renamed to str_text_similarity)
if you all think this is the right approach, we should complete this list and the qa mailing list, as far as we think it is reasonable and then announce it on php-dev for further input
str_ group:
str_implode -- Join array elements with a string
str_join -- Join array elements with a string
str_levenshtein -- Calculate Levenshtein distance between two strings
str_locale_conv -- Get numeric formatting information
str_md5 -- Calculate the md5 hash of a string
str_Metaphone -- Calculate the metaphone key of a string
str_nl2br -- Converts newlines to HTML line breaks
str_parse -- Parses the string into variables
str_quoted_printable_decode -- Convert a quoted-printable string to an 8 bit string
str_quote_meta -- Quote meta characters
str_set_locale -- Set locale information
str_similar_text -- Calculate the similarity between two strings
exceptions:
print -- Output a string
printf -- Output a formatted string
sscanf -- Parses input from a string according to a format
str group
strrpos -- Find position of last occurrence of a char in a string
strspn -- Find length of initial segment matching mask
strstr -- Find first occurrence of a string
strtok -- Tokenize string
dunno, maybe exceptions?:
Ord -- Return ASCII value of character
rtrim -- Remove trailing whitespace.
--
· André Langhorst · t: +49 571 3201801 ·
· waldschrott@php.net · m: +49 173 9558736 ·
· PHP Quality Assurance · http://qa.php.net ·