1--TEST--
2Test array_multisort() function : error conditions
3--FILE--
4<?php
5echo "*** Testing array_multisort() : error conditions ***\n";
6
7echo "\n-- Testing array_multisort() function with repeated flags --\n";
8$ar1 = array(1);
9try {
10    var_dump( array_multisort($ar1, SORT_ASC, SORT_ASC) );
11} catch (\TypeError $e) {
12    echo $e->getMessage() . "\n";
13}
14
15echo "\n-- Testing array_multisort() function with repeated flags --\n";
16$ar1 = array(1);
17try {
18    var_dump( array_multisort($ar1, SORT_STRING, SORT_NUMERIC) );
19} catch (\TypeError $e) {
20    echo $e->getMessage() . "\n";
21}
22
23?>
24--EXPECT--
25*** Testing array_multisort() : error conditions ***
26
27-- Testing array_multisort() function with repeated flags --
28array_multisort(): Argument #3 must be an array or a sort flag that has not already been specified
29
30-- Testing array_multisort() function with repeated flags --
31array_multisort(): Argument #3 must be an array or a sort flag that has not already been specified
32