api/Foundation/Fids/FidHelper.php
public static function compressFid($fid)
  {
    // remove FID: prefix
    $fid = preg_replace('/^FID:/', '', $fid);
    // subtract 2010 from timestamp
    $fid = preg_replace_callback(
      '/:([0-9]{10}):/',
      function ($v) {
        return ':' . base_convert($v[1], 10, 36) . ':';
      },
      $fid
    );
    // replace `:` with `-`
    return str_replace(':', '-', $fid);
  }
public static function compressFid($fid)
  {
    // remove FID: prefix
    $fid = preg_replace('/^FID:/', '', $fid);
    // subtract 2010 from timestamp
    $fid = preg_replace_callback(
      '/:([0-9]{10}):/',
      function ($v) {
        return ':' . base_convert($v[1], 10, 36) . ':';
      },
      $fid
    );
    // replace `:` with `-`
    return str_replace(':', '-', $fid);
  }
public static function compressFid ( $ fid ) { // remove FID: prefix $ fid = preg_replace ( '/^FID:/' , '' , $ fid ) ; // subtract 2010 from timestamp $ fid = preg_replace_callback ( '/:([0-9]{10}):/' , function ( $ v ) { return ':' . base_convert ( $ v [ 1 ] , 10 , 36 ) . ':' ; } , $ fid ) ; // replace `:` with `-` return str_replace ( ':' , '-' , $ fid ) ; }
Compress a fid into a short, url friendly format

@param $fid

@return string
Compress a fid into a short url friendly format