006.phpt 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. --TEST--
  2. show information about extension
  3. --EXTENSIONS--
  4. session
  5. --SKIPIF--
  6. <?php
  7. include "skipif.inc";
  8. if (PCRE_JIT_SUPPORT == false) {
  9. die ("skip not pcre jit support builtin");
  10. }
  11. ?>
  12. --INI--
  13. date.timezone=
  14. --FILE--
  15. <?php
  16. $php = getenv('TEST_PHP_EXECUTABLE');
  17. var_dump(`$php -n --re unknown`);
  18. var_dump(`$php -n --re ""`);
  19. var_dump(`$php -n --re pcre`);
  20. echo "Done\n";
  21. ?>
  22. --EXPECTF--
  23. string(46) "Exception: Extension "unknown" does not exist
  24. "
  25. string(39) "Exception: Extension "" does not exist
  26. "
  27. string(%d) "Extension [ <persistent> extension #%d pcre version %s ] {
  28. - INI {
  29. Entry [ pcre.backtrack_limit <ALL> ]
  30. Current = '%d'
  31. }
  32. Entry [ pcre.recursion_limit <ALL> ]
  33. Current = '%d'
  34. }
  35. Entry [ pcre.jit <ALL> ]
  36. Current = '%d'
  37. }
  38. }
  39. - Constants [19] {
  40. Constant [ int PREG_PATTERN_ORDER ] { 1 }
  41. Constant [ int PREG_SET_ORDER ] { 2 }
  42. Constant [ int PREG_OFFSET_CAPTURE ] { 256 }
  43. Constant [ int PREG_UNMATCHED_AS_NULL ] { 512 }
  44. Constant [ int PREG_SPLIT_NO_EMPTY ] { 1 }
  45. Constant [ int PREG_SPLIT_DELIM_CAPTURE ] { 2 }
  46. Constant [ int PREG_SPLIT_OFFSET_CAPTURE ] { 4 }
  47. Constant [ int PREG_GREP_INVERT ] { 1 }
  48. Constant [ int PREG_NO_ERROR ] { 0 }
  49. Constant [ int PREG_INTERNAL_ERROR ] { 1 }
  50. Constant [ int PREG_BACKTRACK_LIMIT_ERROR ] { 2 }
  51. Constant [ int PREG_RECURSION_LIMIT_ERROR ] { 3 }
  52. Constant [ int PREG_BAD_UTF8_ERROR ] { 4 }
  53. Constant [ int PREG_BAD_UTF8_OFFSET_ERROR ] { 5 }
  54. Constant [ int PREG_JIT_STACKLIMIT_ERROR ] { 6 }
  55. Constant [ string PCRE_VERSION ] { %s }
  56. Constant [ int PCRE_VERSION_MAJOR ] { %d }
  57. Constant [ int PCRE_VERSION_MINOR ] { %d }
  58. Constant [ bool PCRE_JIT_SUPPORT ] { %d }
  59. }
  60. - Functions {
  61. Function [ <internal:pcre> function preg_match ] {
  62. - Parameters [5] {
  63. Parameter #0 [ <required> string $pattern ]
  64. Parameter #1 [ <required> string $subject ]
  65. Parameter #2 [ <optional> &$matches = null ]
  66. Parameter #3 [ <optional> int $flags = 0 ]
  67. Parameter #4 [ <optional> int $offset = 0 ]
  68. }
  69. - Return [ int|false ]
  70. }
  71. Function [ <internal:pcre> function preg_match_all ] {
  72. - Parameters [5] {
  73. Parameter #0 [ <required> string $pattern ]
  74. Parameter #1 [ <required> string $subject ]
  75. Parameter #2 [ <optional> &$matches = null ]
  76. Parameter #3 [ <optional> int $flags = 0 ]
  77. Parameter #4 [ <optional> int $offset = 0 ]
  78. }
  79. - Return [ int|false ]
  80. }
  81. Function [ <internal:pcre> function preg_replace ] {
  82. - Parameters [5] {
  83. Parameter #0 [ <required> array|string $pattern ]
  84. Parameter #1 [ <required> array|string $replacement ]
  85. Parameter #2 [ <required> array|string $subject ]
  86. Parameter #3 [ <optional> int $limit = -1 ]
  87. Parameter #4 [ <optional> &$count = null ]
  88. }
  89. - Return [ array|string|null ]
  90. }
  91. Function [ <internal:pcre> function preg_filter ] {
  92. - Parameters [5] {
  93. Parameter #0 [ <required> array|string $pattern ]
  94. Parameter #1 [ <required> array|string $replacement ]
  95. Parameter #2 [ <required> array|string $subject ]
  96. Parameter #3 [ <optional> int $limit = -1 ]
  97. Parameter #4 [ <optional> &$count = null ]
  98. }
  99. - Return [ array|string|null ]
  100. }
  101. Function [ <internal:pcre> function preg_replace_callback ] {
  102. - Parameters [6] {
  103. Parameter #0 [ <required> array|string $pattern ]
  104. Parameter #1 [ <required> callable $callback ]
  105. Parameter #2 [ <required> array|string $subject ]
  106. Parameter #3 [ <optional> int $limit = -1 ]
  107. Parameter #4 [ <optional> &$count = null ]
  108. Parameter #5 [ <optional> int $flags = 0 ]
  109. }
  110. - Return [ array|string|null ]
  111. }
  112. Function [ <internal:pcre> function preg_replace_callback_array ] {
  113. - Parameters [5] {
  114. Parameter #0 [ <required> array $pattern ]
  115. Parameter #1 [ <required> array|string $subject ]
  116. Parameter #2 [ <optional> int $limit = -1 ]
  117. Parameter #3 [ <optional> &$count = null ]
  118. Parameter #4 [ <optional> int $flags = 0 ]
  119. }
  120. - Return [ array|string|null ]
  121. }
  122. Function [ <internal:pcre> function preg_split ] {
  123. - Parameters [4] {
  124. Parameter #0 [ <required> string $pattern ]
  125. Parameter #1 [ <required> string $subject ]
  126. Parameter #2 [ <optional> int $limit = -1 ]
  127. Parameter #3 [ <optional> int $flags = 0 ]
  128. }
  129. - Return [ array|false ]
  130. }
  131. Function [ <internal:pcre> function preg_quote ] {
  132. - Parameters [2] {
  133. Parameter #0 [ <required> string $str ]
  134. Parameter #1 [ <optional> ?string $delimiter = null ]
  135. }
  136. - Return [ string ]
  137. }
  138. Function [ <internal:pcre> function preg_grep ] {
  139. - Parameters [3] {
  140. Parameter #0 [ <required> string $pattern ]
  141. Parameter #1 [ <required> array $array ]
  142. Parameter #2 [ <optional> int $flags = 0 ]
  143. }
  144. - Return [ array|false ]
  145. }
  146. Function [ <internal:pcre> function preg_last_error ] {
  147. - Parameters [0] {
  148. }
  149. - Return [ int ]
  150. }
  151. Function [ <internal:pcre> function preg_last_error_msg ] {
  152. - Parameters [0] {
  153. }
  154. - Return [ string ]
  155. }
  156. }
  157. }
  158. "
  159. Done