public static function infix($str, $infix)
    {
        return lcfirst(
            preg_replace_callback(
                '/(?<=.)[A-Z]/',
                function ($m) use ($infix) {
                    return $infix . strtolower($m[0]);
                },
                $str
            )
        );
    }
public static function infix($str, $infix)
    {
        return lcfirst(
            preg_replace_callback(
                '/(?<=.)[A-Z]/',
                function ($m) use ($infix) {
                    return $infix . strtolower($m[0]);
                },
                $str
            )
        );
    }
public static function infix ( $ str , $ infix ) { return lcfirst ( preg_replace_callback ( '/(?<=.)[A-Z]/' , function ( $ m ) use ( $ infix ) { return $ infix . strtolower ( $ m [ 0 ] ) ; } , $ str ) ) ; }
Converts a camelcased string to another separator, using 'infix' as the separator.

@param string $str
@param string $infix
@return string
Converts a camelcased string to another separator using infix as the separator .