问问大伙儿函数命名规则

WBOY
Release: 2016-06-13 11:15:25
Original
948 people have browsed it

问问大家函数命名规则?

本帖最后由 xjl756425616 于 2013-02-25 20:33:07 编辑 function  setDate1(){

}
function setDate2(){

}

碰到这种函数功能类似,处理过程不同的应该怎么做?

合并 or 函数命名规范?

------解决方案--------------------
function setDate(){
    switch (func_num_args()){
case 1:setDate1();break;
case 2:setDate2();break;
    ......
}
}
function  setDate1(){

}
function setDate2(){

}
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template