original_string: protected function substrCount($haystack, $needle, $offset, $length)
      {
          static $oldVersion;
          if ($oldVersion === null) {
              $oldVersion = version_compare(PHP_VERSION, '5.1', '<');
          }
          if ($oldVersion) {
              $haystack = substr($haystack, $offset, $length);
              return substr_count($haystack, $needle);
          } else {
              return substr_count($haystack, $needle, $offset, $length);
          }
      }
code: protected function substrCount($haystack, $needle, $offset, $length)
      {
          static $oldVersion;
          if ($oldVersion === null) {
              $oldVersion = version_compare(PHP_VERSION, '5.1', '<');
          }
          if ($oldVersion) {
              $haystack = substr($haystack, $offset, $length);
              return substr_count($haystack, $needle);
          } else {
              return substr_count($haystack, $needle, $offset, $length);
          }
      }
code_tokens: protected function substrCount ( $ haystack , $ needle , $ offset , $ length ) { static $ oldVersion ; if ( $ oldVersion === null ) { $ oldVersion = version_compare ( PHP_VERSION , '5.1' , '<' ) ; } if ( $ oldVersion ) { $ haystack = substr ( $ haystack , $ offset , $ length ) ; return substr_count ( $ haystack , $ needle ) ; } else { return substr_count ( $ haystack , $ needle , $ offset , $ length ) ; } }
docstring: PHP 5.0.x compatible substr_count that implements offset and length
  @param string $haystack
  @param string $needle
  @param int $offset
  @param int $length
  @return int
docstring_tokens: PHP 5 . 0 . x compatible substr_count that implements offset and length