Annotation of embedaddon/php/ext/pcre/tests/preg_match_variation1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test preg_match() function : variation
3: --FILE--
4: <?php
5: /*
6: * proto int preg_match(string pattern, string subject [, array subpatterns [, int flags [, int offset]]])
7: * Function is implemented in ext/pcre/php_pcre.c
8: */
9:
10: //test passing in the same variable where 1 is by value, the other is a different
11: //type and by reference so should be updated to the new type.
12: $string = "-1";
13: preg_match('/[\-\+]?[0-9\.]*/', $string, $string);
14: var_dump($string);
15: ?>
16: ===Done===
17: --EXPECT--
18: array(1) {
19: [0]=>
20: string(2) "-1"
21: }
22: ===Done===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>