1--TEST--
2Test preg_match_all() function : error conditions
3--FILE--
4<?php
5/*
6* Function is implemented in ext/pcre/php_pcre.c
7*/
8/*
9* Testing how preg_match_all reacts to being passed the wrong type of subpatterns array argument
10*/
11echo "*** Testing preg_match_all() : error conditions ***\n";
12$regex = '/[a-z]/';
13$subject = 'string';
14var_dump(preg_match_all($regex, $subject, 'test'));
15echo "Done";
16?>
17--EXPECTF--
18*** Testing preg_match_all() : error conditions ***
19
20Fatal error: Uncaught Error: preg_match_all(): Argument #3 ($matches) cannot be passed by reference in %s:%d
21Stack trace:
22#0 {main}
23  thrown in %s on line %d
24