1--TEST-- 2Test compact() function : error conditions 3--FILE-- 4<?php 5/* Prototype : proto array compact(mixed var_names [, mixed ...]) 6 * Description: Creates a hash containing variables and their values 7 * Source code: ext/standard/array.c 8 * Alias to functions: 9 */ 10 11/* 12 * Error -tests test compact with zero arguments. 13 */ 14 15echo "*** Testing compact() : error conditions ***\n"; 16 17// Zero arguments 18echo "\n-- Testing compact() function with Zero arguments --\n"; 19var_dump( compact() ); 20 21 22echo "Done"; 23?> 24--EXPECTF-- 25*** Testing compact() : error conditions *** 26 27-- Testing compact() function with Zero arguments -- 28 29Warning: compact() expects at least 1 parameter, 0 given in %s on line %d 30NULL 31Done 32