Initialise variable instead of throws exception
Added test for #287 issue
Fixed pregmatch tests
Merge pull request #292 from nkt/fix_preg_match_iss287

Initialise variable instead of throws exception