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
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($...
URL Checker...This function check if an url is valid or not.
function is_valid_url($url)
{
return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url);
}...
Detect leap year...Detect leap year for gregorian and shamsi date.
function gLeapYear($year)
{
if (($year % 4 == 0) and (($year % 100 != 0) or ($year % 400 == 0)))
return true;
else
return ...
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...