티스토리 뷰
* 자주 까먹네.. func_get_args();
class A { public function __construct() { echo func_num_args() . "
"; var_dump( func_get_args()); echo "
"; } } $oA = new A(); $oA = new A( 1, 2, 3, "txt"); Output: 0 array(0) { } 4 array(4) { [0]=> int(1) [1]=> int(2) [2]=> int(3) [3]=> string(3) "txt" }
댓글