1--TEST--
2Test preg_quote() function : error conditions - wrong arg types
3--FILE--
4<?php
5/*
6* proto string preg_quote(string str [, string delim_char])
7* Function is implemented in ext/pcre/php_pcre.c
8*/
9error_reporting(E_ALL&~E_NOTICE);
10/*
11* Testing how preg_quote reacts to being passed the wrong type of input argument
12*/
13echo "*** Testing preg_quote() : error conditions ***\n";
14$input = array('this is a string', array('this is', 'a subarray'),);
15foreach($input as $value) {
16    print "\nArg value is: $value\n";
17    var_dump(preg_quote($value));
18}
19$value = new stdclass(); //Object
20var_dump(preg_quote($value));
21echo "Done";
22?>
23--EXPECTF--
24*** Testing preg_quote() : error conditions ***
25
26Arg value is: this is a string
27string(16) "this is a string"
28
29Arg value is: Array
30
31Warning: preg_quote() expects parameter 1 to be string, array given in %spreg_quote_error1.php on line %d
32NULL
33
34Warning: preg_quote() expects parameter 1 to be string, object given in %spreg_quote_error1.php on line %d
35NULL
36Done