original_string: public function write($text, $params=array())
      {
          $color = (isset($params['color'])) ?  $params['color'] : array(0, 0, 0);
          $color = imagecolorallocate($this->edited, $color[0], $color[1], $color[2]);
          $size = (isset($params['size']))? $params['size'] : 5;
          $x = (isset($params['x']))? $params['x'] : 2;
          $y = (isset($params['y']))? $params['y'] : 2;
  
  
          imagestring($this->edited, $size, $x, $y, $text, $color);
      }
code: public function write($text, $params=array())
      {
          $color = (isset($params['color'])) ?  $params['color'] : array(0, 0, 0);
          $color = imagecolorallocate($this->edited, $color[0], $color[1], $color[2]);
          $size = (isset($params['size']))? $params['size'] : 5;
          $x = (isset($params['x']))? $params['x'] : 2;
          $y = (isset($params['y']))? $params['y'] : 2;
  
  
          imagestring($this->edited, $size, $x, $y, $text, $color);
      }
code_tokens: public function write ( $ text , $ params = array ( ) ) { $ color = ( isset ( $ params [ 'color' ] ) ) ? $ params [ 'color' ] : array ( 0 , 0 , 0 ) ; $ color = imagecolorallocate ( $ this -> edited , $ color [ 0 ] , $ color [ 1 ] , $ color [ 2 ] ) ; $ size = ( isset ( $ params [ 'size' ] ) ) ? $ params [ 'size' ] : 5 ; $ x = ( isset ( $ params [ 'x' ] ) ) ? $ params [ 'x' ] : 2 ; $ y = ( isset ( $ params [ 'y' ] ) ) ? $ params [ 'y' ] : 2 ; imagestring ( $ this -> edited , $ size , $ x , $ y , $ text , $ color ) ; }
docstring: Write text onto an image
  
  @param string $text
  @param array $params color array(r,g,b), size, x, y
docstring_tokens: Write text onto an image