original_string: public static function attribute($name, $value) {
          if ($value instanceof moodle_url) {
              return ' ' . $name . '="' . $value->out() . '"';
          }
  
          // special case, we do not want these in output
          if ($value === null) {
              return '';
          }
  
          // no sloppy trimming here!
          return ' ' . $name . '="' . s($value) . '"';
      }
code: public static function attribute($name, $value) {
          if ($value instanceof moodle_url) {
              return ' ' . $name . '="' . $value->out() . '"';
          }
  
          // special case, we do not want these in output
          if ($value === null) {
              return '';
          }
  
          // no sloppy trimming here!
          return ' ' . $name . '="' . s($value) . '"';
      }
code_tokens: public static function attribute ( $ name , $ value ) { if ( $ value instanceof moodle_url ) { return ' ' . $ name . '="' . $ value -> out ( ) . '"' ; } // special case, we do not want these in output if ( $ value === null ) { return '' ; } // no sloppy trimming here! return ' ' . $ name . '="' . s ( $ value ) . '"' ; }
docstring: Outputs a HTML attribute and value
  
  @param string $name The name of the attribute ('src', 'href', 'class' etc.)
  @param string $value The value of the attribute. The value will be escaped with {@link s()}
  @return string HTML fragment
docstring_tokens: Outputs a HTML attribute and value