original_string: public static function script($jscode, $url=null) {
          if ($jscode) {
              $attributes = array('type'=>'text/javascript');
              return self::tag('script', "\n//<![CDATA[\n$jscode\n//]]>\n", $attributes) . "\n";
  
          } else if ($url) {
              $attributes = array('type'=>'text/javascript', 'src'=>$url);
              return self::tag('script', '', $attributes) . "\n";
  
          } else {
              return '';
          }
      }
code: public static function script($jscode, $url=null) {
          if ($jscode) {
              $attributes = array('type'=>'text/javascript');
              return self::tag('script', "\n//<![CDATA[\n$jscode\n//]]>\n", $attributes) . "\n";
  
          } else if ($url) {
              $attributes = array('type'=>'text/javascript', 'src'=>$url);
              return self::tag('script', '', $attributes) . "\n";
  
          } else {
              return '';
          }
      }
code_tokens: public static function script ( $ jscode , $ url = null ) { if ( $ jscode ) { $ attributes = array ( 'type' => 'text/javascript' ) ; return self :: tag ( 'script' , "\n//<![CDATA[\n$jscode\n//]]>\n" , $ attributes ) . "\n" ; } else if ( $ url ) { $ attributes = array ( 'type' => 'text/javascript' , 'src' => $ url ) ; return self :: tag ( 'script' , '' , $ attributes ) . "\n" ; } else { return '' ; } }
docstring: Generate a script tag containing the the specified code.
  
  @param string $jscode the JavaScript code
  @param moodle_url|string $url optional url of the external script, $code ignored if specified
  @return string HTML, the code wrapped in <script> tags.
docstring_tokens: Generate a script tag containing the the specified code .