(PHP 4, PHP 5, PHP 7, PHP 8)
imap_lsub — List all the subscribed mailboxes
$imap, string $reference, string $pattern): array|falseGets an array of all the mailboxes that you have subscribed.
imapIMAP\Connection 實(shí)例。
reference
       reference should normally be just the server 
       specification as described in imap_open()
      
Passing untrusted data to this parameter is insecure, unless imap.enable_insecure_rsh is disabled.
pattern指定在郵箱層級的何處開始查找。
在組成 pattern 的字符中可使用兩個(gè)特殊字符:
 '*' 和 '%'。
 '*' 是指返回所有郵箱目錄. 如果將 '*' 作為
 pattern 參數(shù)時(shí), 則會(huì)返回整個(gè)郵箱層級結(jié)構(gòu)。
 '%' 是指只返回當(dāng)前級次。
 '%' 作為 pattern 參數(shù)則只會(huì)返回頂層郵箱;
 '~/mail/%' 用于 UW_IMAPD
 則會(huì)返回名為 ~/mail 的目錄, 但不包含其子目錄。
   Returns an array of all the subscribed mailboxes,  或者在失敗時(shí)返回 false.
  
| 版本 | 說明 | 
|---|---|
| 8.1.0 | 現(xiàn)在 imap參數(shù)接受 IMAP\Connection
  實(shí)例,之前接受 資源(resource)。 |