original_string: public function write($row, $col, $token, $format = null) {
          // Analyse what are we trying to send.
          if (preg_match("/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/", $token)) {
              // Match number
              return $this->write_number($row, $col, $token, $format);
          } elseif (preg_match("/^[fh]tt?p:\/\//", $token)) {
              // Match http or ftp URL
              return $this->write_url($row, $col, $token, '', $format);
          } elseif (preg_match("/^mailto:/", $token)) {
              // Match mailto:
              return $this->write_url($row, $col, $token, '', $format);
          } elseif (preg_match("/^(?:in|ex)ternal:/", $token)) {
              // Match internal or external sheet link
              return $this->write_url($row, $col, $token, '', $format);
          } elseif (preg_match("/^=/", $token)) {
              // Match formula
              return $this->write_formula($row, $col, $token, $format);
          } elseif (preg_match("/^@/", $token)) {
              // Match formula
              return $this->write_formula($row, $col, $token, $format);
          } elseif ($token == '') {
              // Match blank
              return $this->write_blank($row, $col, $format);
          } else {
              // Default: match string
              return $this->write_string($row, $col, $token, $format);
          }
      }
code: public function write($row, $col, $token, $format = null) {
          // Analyse what are we trying to send.
          if (preg_match("/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/", $token)) {
              // Match number
              return $this->write_number($row, $col, $token, $format);
          } elseif (preg_match("/^[fh]tt?p:\/\//", $token)) {
              // Match http or ftp URL
              return $this->write_url($row, $col, $token, '', $format);
          } elseif (preg_match("/^mailto:/", $token)) {
              // Match mailto:
              return $this->write_url($row, $col, $token, '', $format);
          } elseif (preg_match("/^(?:in|ex)ternal:/", $token)) {
              // Match internal or external sheet link
              return $this->write_url($row, $col, $token, '', $format);
          } elseif (preg_match("/^=/", $token)) {
              // Match formula
              return $this->write_formula($row, $col, $token, $format);
          } elseif (preg_match("/^@/", $token)) {
              // Match formula
              return $this->write_formula($row, $col, $token, $format);
          } elseif ($token == '') {
              // Match blank
              return $this->write_blank($row, $col, $format);
          } else {
              // Default: match string
              return $this->write_string($row, $col, $token, $format);
          }
      }
code_tokens: public function write ( $ row , $ col , $ token , $ format = null ) { // Analyse what are we trying to send. if ( preg_match ( "/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/" , $ token ) ) { // Match number return $ this -> write_number ( $ row , $ col , $ token , $ format ) ; } elseif ( preg_match ( "/^[fh]tt?p:\/\//" , $ token ) ) { // Match http or ftp URL return $ this -> write_url ( $ row , $ col , $ token , '' , $ format ) ; } elseif ( preg_match ( "/^mailto:/" , $ token ) ) { // Match mailto: return $ this -> write_url ( $ row , $ col , $ token , '' , $ format ) ; } elseif ( preg_match ( "/^(?:in|ex)ternal:/" , $ token ) ) { // Match internal or external sheet link return $ this -> write_url ( $ row , $ col , $ token , '' , $ format ) ; } elseif ( preg_match ( "/^=/" , $ token ) ) { // Match formula return $ this -> write_formula ( $ row , $ col , $ token , $ format ) ; } elseif ( preg_match ( "/^@/" , $ token ) ) { // Match formula return $ this -> write_formula ( $ row , $ col , $ token , $ format ) ; } elseif ( $ token == '' ) { // Match blank return $ this -> write_blank ( $ row , $ col , $ format ) ; } else { // Default: match string return $ this -> write_string ( $ row , $ col , $ token , $ format ) ; } }
docstring: Write anything somewhere in the worksheet,
  type will be automatically detected.
  
  @param integer $row    Zero indexed row
  @param integer $col    Zero indexed column
  @param mixed   $token  What we are writing
  @param mixed   $format The XF format for the cell
docstring_tokens: Write anything somewhere in the worksheet type will be automatically detected .