summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/compact_error.phpt
blob: a7ef54597eda27914170b574644f7a39763823b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--TEST--
Test compact() function : error conditions 
--FILE--
<?php
/* Prototype  : proto array compact(mixed var_names [, mixed ...])
 * Description: Creates a hash containing variables and their values 
 * Source code: ext/standard/array.c
 * Alias to functions: 
 */

/*
 * Error -tests test compact with zero arguments.
 */

echo "*** Testing compact() : error conditions ***\n";

// Zero arguments
echo "\n-- Testing compact() function with Zero arguments --\n";
var_dump( compact() );


echo "Done";
?>
--EXPECTF--
*** Testing compact() : error conditions ***

-- Testing compact() function with Zero arguments --

Warning: compact() expects at least 1 parameter, 0 given in %s on line %d
NULL
Done