PageRenderTime 60ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/stubs/ereg.php

http://github.com/nnmatveev/php-stubs
PHP | 223 lines | 9 code | 9 blank | 205 comment | 0 complexity | 1ad2864676a8bc7e1aea1c7665770e0d MD5 | raw file
  1. <?php
  2. // Start of ereg v.
  3. /**
  4. * (PHP 4, PHP 5)<br/>
  5. * Regular expression match
  6. * @link http://php.net/manual/en/function.ereg.php
  7. * @deprecated since 5.3.0, use preg_match() instead
  8. * @param string $pattern <p>
  9. * Case sensitive regular expression.
  10. * </p>
  11. * @param string $string <p>
  12. * The input string.
  13. * </p>
  14. * @param array $regs [optional] <p>
  15. * If matches are found for parenthesized substrings of
  16. * pattern and the function is called with the
  17. * third argument regs, the matches will be stored
  18. * in the elements of the array regs.
  19. * </p>
  20. * <p>
  21. * $regs[1] will contain the substring which starts at
  22. * the first left parenthesis; $regs[2] will contain
  23. * the substring starting at the second, and so on.
  24. * $regs[0] will contain a copy of the complete string
  25. * matched.
  26. * </p>
  27. * @return int the length of the matched string if a match for
  28. * pattern was found in string,
  29. * or false if no matches were found or an error occurred.
  30. * </p>
  31. * <p>
  32. * If the optional parameter regs was not passed or
  33. * the length of the matched string is 0, this function returns 1.
  34. */
  35. function ereg ($pattern, $string, array &$regs = null) {}
  36. /**
  37. * (PHP 4, PHP 5)<br/>
  38. * Replace regular expression
  39. * @link http://php.net/manual/en/function.ereg-replace.php
  40. * @deprecated since 5.3.0, use preg_replace() instead
  41. * @param string $pattern <p>
  42. * A POSIX extended regular expression.
  43. * </p>
  44. * @param string $replacement <p>
  45. * If pattern contains parenthesized substrings,
  46. * replacement may contain substrings of the form
  47. * \\digit, which will be
  48. * replaced by the text matching the digit'th parenthesized substring;
  49. * \\0 will produce the entire contents of string.
  50. * Up to nine substrings may be used. Parentheses may be nested, in which
  51. * case they are counted by the opening parenthesis.
  52. * </p>
  53. * @param string $string <p>
  54. * The input string.
  55. * </p>
  56. * @return string The modified string is returned. If no matches are found in
  57. * string, then it will be returned unchanged.
  58. */
  59. function ereg_replace ($pattern, $replacement, $string) {}
  60. /**
  61. * (PHP 4, PHP 5)<br/>
  62. * Case insensitive regular expression match
  63. * @link http://php.net/manual/en/function.eregi.php
  64. * @deprecated since 5.3.0, use preg_match() instead
  65. * @param string $pattern <p>
  66. * Case insensitive regular expression.
  67. * </p>
  68. * @param string $string <p>
  69. * The input string.
  70. * </p>
  71. * @param array $regs [optional] <p>
  72. * If matches are found for parenthesized substrings of
  73. * pattern and the function is called with the
  74. * third argument regs, the matches will be stored
  75. * in the elements of the array regs.
  76. * </p>
  77. * <p>
  78. * $regs[1] will contain the substring which starts at the first left
  79. * parenthesis; $regs[2] will contain the substring starting at the
  80. * second, and so on. $regs[0] will contain a copy of the complete string
  81. * matched.
  82. * </p>
  83. * @return int the length of the matched string if a match for
  84. * pattern was found in string,
  85. * or false if no matches were found or an error occurred.
  86. * </p>
  87. * <p>
  88. * If the optional parameter regs was not passed or
  89. * the length of the matched string is 0, this function returns 1.
  90. */
  91. function eregi ($pattern, $string, array &$regs = null) {}
  92. /**
  93. * (PHP 4, PHP 5)<br/>
  94. * Replace regular expression case insensitive
  95. * @link http://php.net/manual/en/function.eregi-replace.php
  96. * @deprecated since 5.3.0, use preg_replace() instead
  97. * @param string $pattern <p>
  98. * A POSIX extended regular expression.
  99. * </p>
  100. * @param string $replacement <p>
  101. * If pattern contains parenthesized substrings,
  102. * replacement may contain substrings of the form
  103. * \\digit, which will be
  104. * replaced by the text matching the digit'th parenthesized substring;
  105. * \\0 will produce the entire contents of string.
  106. * Up to nine substrings may be used. Parentheses may be nested, in which
  107. * case they are counted by the opening parenthesis.
  108. * </p>
  109. * @param string $string <p>
  110. * The input string.
  111. * </p>
  112. * @return string The modified string is returned. If no matches are found in
  113. * string, then it will be returned unchanged.
  114. */
  115. function eregi_replace ($pattern, $replacement, $string) {}
  116. /**
  117. * (PHP 4, PHP 5)<br/>
  118. * Split string into array by regular expression
  119. * @link http://php.net/manual/en/function.split.php
  120. * @deprecated since 5.3.0, use preg_split() instead
  121. * @param string $pattern <p>
  122. * Case sensitive regular expression.
  123. * </p>
  124. * <p>
  125. * If you want to split on any of the characters which are considered
  126. * special by regular expressions, you'll need to escape them first. If
  127. * you think split (or any other regex function, for
  128. * that matter) is doing something weird, please read the file
  129. * regex.7, included in the
  130. * regex/ subdirectory of the PHP distribution. It's
  131. * in manpage format, so you'll want to do something along the lines of
  132. * man /usr/local/src/regex/regex.7 in order to read it.
  133. * </p>
  134. * @param string $string <p>
  135. * The input string.
  136. * </p>
  137. * @param int $limit [optional] <p>
  138. * If limit is set, the returned array will
  139. * contain a maximum of limit elements with the
  140. * last element containing the whole rest of
  141. * string.
  142. * </p>
  143. * @return array an array of strings, each of which is a substring of
  144. * string formed by splitting it on boundaries formed
  145. * by the case-sensitive regular expression pattern.
  146. * </p>
  147. * <p>
  148. * If there are n occurrences of
  149. * pattern, the returned array will contain
  150. * n+1 items. For example, if
  151. * there is no occurrence of pattern, an array with
  152. * only one element will be returned. Of course, this is also true if
  153. * string is empty. If an error occurs,
  154. * split returns false.
  155. */
  156. function split ($pattern, $string, $limit = null) {}
  157. /**
  158. * (PHP 4 &gt;= 4.0.1, PHP 5)<br/>
  159. * Split string into array by regular expression case insensitive
  160. * @link http://php.net/manual/en/function.spliti.php
  161. * @deprecated since 5.3.0, use preg_split() with the 'i' modifier instead
  162. * @param string $pattern <p>
  163. * Case insensitive regular expression.
  164. * </p>
  165. * <p>
  166. * If you want to split on any of the characters which are considered
  167. * special by regular expressions, you'll need to escape them first. If
  168. * you think spliti (or any other regex function, for
  169. * that matter) is doing something weird, please read the file
  170. * regex.7, included in the
  171. * regex/ subdirectory of the PHP distribution. It's
  172. * in manpage format, so you'll want to do something along the lines of
  173. * man /usr/local/src/regex/regex.7 in order to read it.
  174. * </p>
  175. * @param string $string <p>
  176. * The input string.
  177. * </p>
  178. * @param int $limit [optional] <p>
  179. * If limit is set, the returned array will
  180. * contain a maximum of limit elements with the
  181. * last element containing the whole rest of
  182. * string.
  183. * </p>
  184. * @return array an array of strings, each of which is a substring of
  185. * string formed by splitting it on boundaries formed
  186. * by the case insensitive regular expression pattern.
  187. * </p>
  188. * <p>
  189. * If there are n occurrences of
  190. * pattern, the returned array will contain
  191. * n+1 items. For example, if
  192. * there is no occurrence of pattern, an array with
  193. * only one element will be returned. Of course, this is also true if
  194. * string is empty. If an error occurs,
  195. * spliti returns false.
  196. */
  197. function spliti ($pattern, $string, $limit = null) {}
  198. /**
  199. * (PHP 4, PHP 5)<br/>
  200. * Make regular expression for case insensitive match
  201. * @link http://php.net/manual/en/function.sql-regcase.php
  202. * @deprecated since 5.3.0
  203. * @param string $string <p>
  204. * The input string.
  205. * </p>
  206. * @return string a valid regular expression which will match
  207. * string, ignoring case. This expression is
  208. * string with each alphabetic character converted to
  209. * a bracket expression; this bracket expression contains that character's
  210. * uppercase and lowercase form. Other characters remain unchanged.
  211. */
  212. function sql_regcase ($string) {}
  213. // End of ereg v.
  214. ?>