--TEST-- Test preg_split() function : error conditions - bad regular expressions --FILE-- getMessage(), "\n"; } } $regex_value = new stdclass(); //Object try { var_dump(preg_split($regex_value, $subject)); } catch (TypeError $e) { echo $e->getMessage(), "\n"; } ?> --EXPECTF-- Warning: preg_split(): Delimiter must not be alphanumeric, backslash, or NUL byte in %spreg_split_error1.php on line %d bool(false) Warning: preg_split(): No ending delimiter '/' found in %spreg_split_error1.php on line %d bool(false) Warning: preg_split(): Unknown modifier '/' in %spreg_split_error1.php on line %d bool(false) Warning: preg_split(): Unknown modifier 'F' in %spreg_split_error1.php on line %d bool(false) preg_split(): Argument #1 ($pattern) must be of type string, array given array(3) { [0]=> string(4) "1 2 " [1]=> string(5) " 3 4 " [2]=> string(4) " 5 6" } preg_split(): Argument #1 ($pattern) must be of type string, stdClass given