1--TEST-- 2Test var_export() function : error conditions 3--FILE-- 4<?php 5/* Prototype : mixed var_export(mixed var [, bool return]) 6 * Description: Outputs or returns a string representation of a variable 7 * Source code: ext/standard/var.c 8 * Alias to functions: 9 */ 10 11echo "*** Testing var_export() : error conditions ***\n"; 12 13// Zero arguments 14echo "\n-- Testing var_export() function with Zero arguments --\n"; 15var_dump( var_export() ); 16 17//Test var_export with one more than the expected number of arguments 18echo "\n-- Testing var_export() function with more than expected no. of arguments --\n"; 19$var = 1; 20$return = true; 21$extra_arg = 10; 22var_dump( var_export($var, $return, $extra_arg) ); 23 24?> 25===DONE=== 26--EXPECTF-- 27*** Testing var_export() : error conditions *** 28 29-- Testing var_export() function with Zero arguments -- 30 31Warning: var_export() expects at least 1 parameter, 0 given in %s on line 12 32NULL 33 34-- Testing var_export() function with more than expected no. of arguments -- 35 36Warning: var_export() expects at most 2 parameters, 3 given in %s on line 19 37NULL 38===DONE=== 39