How to created mixed arguments function

This way useful for create mixed arguments function.

function foo()
{
    $args = func_get_args();
    print_r($args);
}
 
foo(1, 1256, 6, 17); //mixed ...
 
-------------------Out----------------------
Array
(
    [0] => 1
    [1] => 1256
    [2] => 6
    [3] => 17
)

Tags

No tag here.

Recommended pages

UTF8 string length counter...

The best way to determine the character count of a UTF8 string. function strlen_utf8( $str ) { return mb_strlen( $str, 'UTF-8' ); }   //or... function strlen_utf8( $str ) { $c = 0;...

Gregorian to Persian Date Convertor...

Gregorian to Persian Date Convertor....

Detect file extension function...

This function is used to find the file extension also you can use pathinfo() function for get information about a file path. function ext($file_name) { return substr($file_name, strrpos($fi...

Best way to get user ip address in php...

Here is a function to getting ip using filter of local and lan ip's. function get_ip() { $list = array( 'REMOTE_ADDR', 'CLIENT_IP', 'HTTP_CLIENT_IP', 'HTTP_PROXY_CONNECTION',...