PHP命名约定? [英] PHP naming conventions?
本文介绍了PHP命名约定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我现在正在编码smt,对于PHP有时用下划线(有时是一个单词)来调用其功能的事实感到有点恼火.这是怎么回事?
I'm coding smt right now, and am a little bit peeved by the fact that PHP sometimes calls its functions with underscore, and sometimes as one word. What's up with that?
示例:
int strlen(字符串$ str)
int strlen(string $str)
和
bool in_array(混合$ needle,array $ haystack [,bool $ strict = FALSE])
bool in_array ( mixed $needle , array $haystack [, bool $strict = FALSE ] )
我希望这是有充分的理由的,并且我真的很想知道它是什么.
I'm hoping that there is a good reason for this, and would really like to know what it is.
推荐答案
PHP的函数命名不一致
下划线与下划线之间没有明显的系统:
PHP has inconsistent function naming
There is no apparent system in underscore(s) versus no underscore(s):
underscore no underscore:
stream_get_line readline
disk_free_space diskfreespace
is_object isset
mcal_day_of_week jddayofweek
set_error_handler setlocale
snmp_get_quick_print snmpget
get_browser getallheaders
base64_encode urlencode
image_type_to_mime_type imagetypes
msql_num_fields mysql_numfields
php_uname phpversion
strip_tags stripslashes
bind_textdomain_codeset bindtextdomain
cal_to_jd gregoriantojd
str_rot13 strpos
这篇关于PHP命名约定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文