class abc{ function __construct() { $num =func_num_args(); switch ($num) { case 0: echo "none "; break; case 1: echo "one "; break; case 2: echo "two "; break; } } } new abc() ; new abc(1) ; new abc(1,2);
函数的解析我就不写了,太简单了
本文共 493 字,大约阅读时间需要 1 分钟。
class abc{ function __construct() { $num =func_num_args(); switch ($num) { case 0: echo "none "; break; case 1: echo "one "; break; case 2: echo "two "; break; } } } new abc() ; new abc(1) ; new abc(1,2);
函数的解析我就不写了,太简单了
转载于:https://www.cnblogs.com/laohaozi/p/8266545.html