--TEST-- Test imap_fetchheader() function : basic functionality --SKIPIF-- --FILE-- FT_UID, 'FT_INTERNAL' => FT_INTERNAL, 'FT_PREFETCHTEXT' => FT_PREFETCHTEXT); foreach ($options as $key => $option) { echo "-- Option is $key --\n"; if ($key == 'FT_UID') { $msg_uid = imap_uid($stream_id, $msg_no); if(is_string(imap_fetchheader($stream_id, $msg_uid, $option))) {echo "PASS\n";} if(is_string(imap_fetchheader($stream_id, $msg_uid, PHP_INT_MAX))) {echo "PASS\n";} } else { if(is_string(imap_fetchheader($stream_id, $msg_no, $option))) {echo "PASS\n";} if(is_string(imap_fetchheader($stream_id, $msg_no, PHP_INT_MAX))) {echo "PASS\n";} } } // Calling imap_fetchheader() with mandatory arguments echo "\n-- Mandatory arguments --\n"; if(is_string(imap_fetchheader($stream_id, $msg_no))) {echo "PASS\n";} ?> ===DONE=== --CLEAN-- --EXPECTF-- Create a temporary mailbox and add 1 msgs .. mailbox '{localhost/norsh}INBOX.phpttest' created -- Option is FT_UID -- PASS Warning: imap_fetchheader(): invalid value for the options parameter in %s on line 14 -- Option is FT_INTERNAL -- PASS Warning: imap_fetchheader(): invalid value for the options parameter in %s on line 17 -- Option is FT_PREFETCHTEXT -- PASS Warning: imap_fetchheader(): invalid value for the options parameter in %s on line 17 -- Mandatory arguments -- PASS ===DONE===