1--TEST--
2Test function proc_nice() by substituting argument 1 with emptyUnsetUndefNull values.
3--CREDITS--
4Italian PHP TestFest 2009 Cesena 19-20-21 june
5Fabio Fabbrucci (fabbrucci@grupporetina.com)
6Michele Orselli (mo@ideato.it)
7Simone Gentili (sensorario@gmail.com)
8--SKIPIF--
9<?php
10if(!function_exists('proc_nice')) die("skip. proc_nice not available ");
11?>
12--FILE--
13<?php
14
15
16echo "*** Test substituting argument 1 with emptyUnsetUndefNull values ***\n";
17
18
19
20$unset_var = 10;
21unset($unset_var);
22
23$variation_array = array(
24  'unset var' => @$unset_var,
25  'undefined var' => @$undefined_var,
26  'empty string DQ' => "",
27  'empty string SQ' => '',
28  'uppercase NULL' => NULL,
29  'lowercase null' => null,
30  );
31
32
33foreach ( $variation_array as $var ) {
34  var_dump(proc_nice( $var  ) );
35}
36?>
37--EXPECTF--
38*** Test substituting argument 1 with emptyUnsetUndefNull values ***
39bool(true)
40bool(true)
41
42Warning: proc_nice() expects parameter 1 to be long, string given in %s on line %d
43bool(false)
44
45Warning: proc_nice() expects parameter 1 to be long, string given in %s on line %d
46bool(false)
47bool(true)
48bool(true)
49