preg_match_variation1.phpt 399 B

1234567891011121314151617
  1. --TEST--
  2. Test preg_match() function : variation
  3. --FILE--
  4. <?php
  5. /* Function is implemented in ext/pcre/php_pcre.c */
  6. //test passing in the same variable where 1 is by value, the other is a different
  7. //type and by reference so should be updated to the new type.
  8. $string = "-1";
  9. preg_match('/[\-\+]?[0-9\.]*/', $string, $string);
  10. var_dump($string);
  11. ?>
  12. --EXPECT--
  13. array(1) {
  14. [0]=>
  15. string(2) "-1"
  16. }