1--TEST--
2Test 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";
13preg_match('/[\-\+]?[0-9\.]*/', $string, $string);
14var_dump($string);
15?>
16===Done===
17--EXPECT--
18array(1) {
19  [0]=>
20  string(2) "-1"
21}
22===Done===
23