original_string: protected function getScriptJsSrc(array $tag_frag, $test_for_js = true)
      {
          if ($test_for_js && !$this->isScriptTagFragJs($tag_frag)) {
              return ''; // This script tag does not contain JavaScript.
          }
          if (preg_match('/\ssrc\s*\=\s*(["\'])(?P<value>.+?)\\1/ui', $tag_frag['script_open_tag'], $_m)) {
              return trim($this->nUrlAmps($_m['value']));
          } // unset($_m); // Just a little housekeeping.
  
          return ''; // Unable to find an `src` attribute value.
      }
code: protected function getScriptJsSrc(array $tag_frag, $test_for_js = true)
      {
          if ($test_for_js && !$this->isScriptTagFragJs($tag_frag)) {
              return ''; // This script tag does not contain JavaScript.
          }
          if (preg_match('/\ssrc\s*\=\s*(["\'])(?P<value>.+?)\\1/ui', $tag_frag['script_open_tag'], $_m)) {
              return trim($this->nUrlAmps($_m['value']));
          } // unset($_m); // Just a little housekeeping.
  
          return ''; // Unable to find an `src` attribute value.
      }
code_tokens: protected function getScriptJsSrc ( array $ tag_frag , $ test_for_js = true ) { if ( $ test_for_js && ! $ this -> isScriptTagFragJs ( $ tag_frag ) ) { return '' ; // This script tag does not contain JavaScript. } if ( preg_match ( '/\ssrc\s*\=\s*(["\'])(?P<value>.+?)\\1/ui' , $ tag_frag [ 'script_open_tag' ] , $ _m ) ) { return trim ( $ this -> nUrlAmps ( $ _m [ 'value' ] ) ) ; } // unset($_m); // Just a little housekeeping. return '' ; // Unable to find an `src` attribute value. }
docstring: Get script JS src value from a JS tag fragment.
  
  @since 140417 Initial release.
  
  @param array $tag_frag    A JS tag fragment.
  @param bool  $test_for_js Defaults to a TRUE value.
  If TRUE, we will test tag fragment to make sure it's JavaScript.
  
  @return string The script JS src value (if possible); else an empty string.
docstring_tokens: Get script JS src value from a JS tag fragment .