2 imap_fetchstructure() function : basic functionality
7 require_once(dirname(__FILE__).'/skipif.inc');
11 echo "Checking with no parameters\n";
12 imap_fetchstructure();
14 echo "Checking with incorrect parameter type\n";
15 imap_fetchstructure('');
16 imap_fetchstructure(false);
18 require_once(dirname(__FILE__).'/imap_include.inc');
19 $stream_id = setup_test_mailbox('', 1);
21 imap_fetchstructure($stream_id);
22 imap_fetchstructure($stream_id,0);
24 $z = imap_fetchstructure($stream_id,1);
27 $fields = array('type','encoding','ifsubtype','subtype',
28 'ifdescription','lines','bytes','parameters');
30 foreach ($fields as $key) {
31 var_dump(isset($z->$key));
34 var_dump($z->encoding);
37 var_dump(is_object($z->parameters));
39 imap_close($stream_id);
43 require_once('clean.inc');
46 Checking with no parameters
48 Warning: imap_fetchstructure() expects at least 2 parameters, 0 given in %s on line %d
49 Checking with incorrect parameter type
51 Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d
53 Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d
54 Create a temporary mailbox and add 1 msgs
55 .. mailbox '{%s}%s' created
57 Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d