1--TEST--
2Test join() function: error conditions
3--FILE--
4<?php
5echo "*** Testing join() : error conditions ***\n";
6
7// Less than expected number of arguments
8echo "\n-- Testing join() with less than expected no. of arguments --\n";
9$glue = 'string_val';
10
11try {
12    var_dump(join($glue));
13} catch (TypeError $e) {
14    echo $e->getMessage(), "\n";
15}
16
17echo "Done\n";
18?>
19--EXPECT--
20*** Testing join() : error conditions ***
21
22-- Testing join() with less than expected no. of arguments --
23join(): Argument #1 ($pieces) must be of type array, string given
24Done
25