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
Random string generator...Random string generator. Optionally, you can give it a desired string length.
function rnd_string($len = 24)
{
$str = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
$str...
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?!?......
File size calculator...File size calculator function return file size format into kb, mb or gb.
function file_size($size, $out = 'kb', $precision = 2)
{
switch ($out) {
case 'kb':
return round($...
Human readable file size...This function return formatting of file sizes in a human readable format.
function formatFileSize( $size )
{
$file_size = $size;
$i = 0;
$name = array( 'byte', 'kB', 'MB', '...