0

The documentation of imap_sort can take $search_criteria as an argument, but by default, $search_criteria is set to NULL.

imap_sort ( resource $imap_stream , int $criteria , int $reverse [, int $options = 0 [, string $search_criteria = NULL [, string $charset = NULL ]]] ) : array

My question is:
what is the behaviour of imap_sort when $search_criteria is null?

  • The documentation refers to imap_search() but that doesn't help at all, because there isn't a null argument there.

I need to know this because my version of phpimap (https://github.com/barbushin/php-imap) doesn't take a search criteria argument and I need ALL mails, thus this would normally be 'ALL' as a search criterium.

So is NULL equal to 'ALL'?

akshaypjoshi
  • 1,245
  • 1
  • 15
  • 24
L.A. Rabida
  • 416
  • 3
  • 15

0 Answers0