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

Get all subsets of array...

If you have a list of items (for example)......

Better parse_str in php...

parse_str() is fine for simple stuff but it's not the same as PHP's built way of creating the $_GET magic variable. Why?!?......

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...

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;...