Method `*()
- Method
`*
 
- mixed`*(- mixed- arg1)
 - mixed`*(- object- arg1,- mixed- arg2,- mixed...- extras)
 - mixed`*(- mixed- arg1,- object- arg2)
 - array`*(- array- arg1,- int- arg2)
 - array`*(- array- arg1,- float- arg2)
 - string`*(- string- arg1,- int- arg2)
 - string`*(- string- arg1,- float- arg2)
 - string`*(- array(- string)- arg1,- string- arg2)
 - array`*(- array(- array)- arg1,- array- arg2)
 - float`*(- float- arg1,- int|- float- arg2)
 - float`*(- int- arg1,- float- arg2)
 - int`*(- int- arg1,- int- arg2)
 - mixed`*(- mixed- arg1,- mixed- arg2,- mixed...- extras)
- Description
- Multiplication/repetition/implosion. - Every expression with the - *operator becomes a call to this function, i.e.- a*bis the same as- predef::`*(a,b). Longer- *expressions are normally optimized to one call, so e.g.- a*b*cbecomes- predef::`*(a,b,c).
- Returns
- If there's a single argument, that argument will be returned. - If the first argument is an object that implements lfun::`*(), that function will be called with the rest of the arguments. - If there are more than two arguments, the result will be - `*(`*(.- arg1,- arg2), @- extras)- If - arg2is an object that implements lfun::``*(), that function will be called with- arg1as the single argument.- Otherwise the result will be as follows: - arg1can have any of the following types:- array- arg2can have any of the following types:- int|- float- The result will be - arg1concatenated- arg2times.- string|- array- The result will be the elements of - arg1concatenated with- arg2interspersed.- string- The result will be - arg1concatenated- arg2times.- int|- float- The result will be - arg1*- arg2- arg1or- arg2is a float.
- Note
- In Pike 7.0 and earlier the multiplication order was unspecified. 
- See also