Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #18298

imap_search(): $charset parameter default value

From alex <1j9448a02@lnx159sneakemail.com.invalid>
Newsgroups comp.lang.php
Subject imap_search(): $charset parameter default value
Date 2020-07-14 12:07 +0200
Organization Aioe.org NNTP Server
Message-ID <rek04m$1bm$1@gioia.aioe.org> (permalink)

Show all headers | View raw


What is?

I did some tests with null, NIL and 0, but I was unable to reach a 
conclusion.

function test($stream, $criteria, $options) {
     $charsets = [
         null,
         NIL,
         0,
     ];

     foreach ($charsets as $charset) {
         try {
             imap_search(
                 $stream,
                 $criteria,
                 $options,
                 $charset
             );
         } catch (\Throwable $throwable) {
             printf(
                 "%s (%s): %s\n",
                 $charset,
                 gettype($charset),
                 $throwable->getMessage()
             );
         }
     }
}

test(...);

Output:

  (NULL): imap_search() expects parameter 4 to be string, null given
0 (integer): imap_search() expects parameter 4 to be string, int given
0 (integer): imap_search() expects parameter 4 to be string, int given

Back to comp.lang.php | Previous | NextNext in thread | Find similar | Unroll thread


Thread

imap_search(): $charset parameter default value alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-07-14 12:07 +0200
  Re: imap_search(): $charset parameter default value alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-07-14 12:33 +0200
  Re: imap_search(): $charset parameter default value "J.O. Aho" <user@example.net> - 2020-07-14 14:46 +0200
    Re: imap_search(): $charset parameter default value alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-07-14 16:05 +0200

csiph-web