CBPCalc :: FunctionUrlencode: Bitrix method

      
<?php 
//  CBPCalc :: FunctionUrlencode()
//  /dist/bitrix/modules/bizproc/classes/general/calc.php:1180

    
private function FunctionUrlencode($args)
    {
        
$ar $this->ArrgsToArray($args);
        
$str array_shift($ar);

        if (!
is_scalar($str))
        {
            if (
is_array($str))
            {
                
$str implode(", "CBPHelper::MakeArrayFlat($str));
            }
            else
            {
                return 
null;
            }
        }

        
$str = (string) $str;
        return 
urlencode($str);
    }