| func_num_args() | ใช้นับจำนวน arguments ที่ส่งมายัง function |
|---|
function:func_num_args ();
return type:int
content:ใช้นับจำนวน arguments ที่ส่งมายัง function
example:function sum() { $total = 0; $count = func_num_args(); for ( $i=0; $i<$count; $i++ ) { $total += func_get_arg( $i ); } return $total; } echo sum ( 500, 300, 400 );