PHP imap_search:行为错误

I have 3 mails in my inbox with following date headers. All the 3 mails have the same subject.

  1. Date: Tue, 21 Jun 2011 12:30:11 +0000
  2. Date: Tue, 21 Jun 2011 12:28:49 +0000
  3. Date: Tue, 21 Jun 2011 12:28:02 +0000

When I execute

imap_search($mb, "BEFORE \"2011-06-22\"");

The result contains only 2 mails, 1 and 3 above. I tried many times and the result was same. Am I doing something wrong?

PHP version: 5.2.10 on windows XP. IMAP server: Gmail

Edit1:

If I search using the subject, then also I get only 1 and 3 in result.

imap_search($mb, "SUBJECT \"mail subject\"");