3v4l.org

run code in 300+ PHP versions simultaneously
<?php $testcase = 'DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trello.com; q=dns/txt; s=dkim; bh=zmLkmznXksSFNlY+E/SQwF4vaDducoC91+u20p18W38=; h=from:sender:subject:to:mime-version:content-type; b=XFKjy/g96z0Iv8qDg+IPb4EXYSujEVf/indwAV64icAXv/wceXEgQPLXury2HKBn5/Tk7DbgU HW4duCjde16IKgMOd5xf7n8duXbzhEESD5a3CXSo9QNOjYH1hwsdx8oguz+RWL3Zw4ZJfXjGCzS +LMZig06tV0tF8zFTuAHfRY= Content-Type: multipart/alternative; boundary="----sinikael-?=_1-14883656976170.4675149679677584'; function test($name, array $headers) { echo 'Test in mode "' . $name . '": '; if (isset($headers['Content-Type'])) { echo "OK!\n"; } else { echo "Content-Type header not found:\n"; print_r($headers); } } test('strict', iconv_mime_decode_headers($testcase, ICONV_MIME_DECODE_STRICT, 'utf-8')); test('continue', iconv_mime_decode_headers($testcase, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'utf-8'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nfLjB
function name:  (null)
number of ops:  22
compiled vars:  !0 = $testcase
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'DKIM-Signature%3A+v%3D1%3B+a%3Drsa-sha256%3B+c%3Drelaxed%2Frelaxed%3B+d%3Dtrello.com%3B%0A+q%3Ddns%2Ftxt%3B+s%3Ddkim%3B+bh%3DzmLkmznXksSFNlY%2BE%2FSQwF4vaDducoC91%2Bu20p18W38%3D%3B%0A+h%3Dfrom%3Asender%3Asubject%3Ato%3Amime-version%3Acontent-type%3B%0A+b%3DXFKjy%2Fg96z0Iv8qDg%2BIPb4EXYSujEVf%2FindwAV64icAXv%2FwceXEgQPLXury2HKBn5%2FTk7DbgU%0A+HW4duCjde16IKgMOd5xf7n8duXbzhEESD5a3CXSo9QNOjYH1hwsdx8oguz%2BRWL3Zw4ZJfXjGCzS%0A+%2BLMZig06tV0tF8zFTuAHfRY%3D%0AContent-Type%3A+multipart%2Falternative%3B%0A+boundary%3D%22----sinikael-%3F%3D_1-14883656976170.4675149679677584'
   24     1        INIT_FCALL                                               'test'
          2        SEND_VAL                                                 'strict'
          3        INIT_FCALL_BY_NAME                                       'iconv_mime_decode_headers'
          4        SEND_VAR_EX                                              !0
          5        FETCH_CONSTANT                                   ~2      'ICONV_MIME_DECODE_STRICT'
          6        SEND_VAL_EX                                              ~2
          7        SEND_VAL_EX                                              'utf-8'
          8        DO_FCALL                                      0  $3      
          9        SEND_VAR                                                 $3
         10        DO_FCALL                                      0          
   25    11        INIT_FCALL                                               'test'
         12        SEND_VAL                                                 'continue'
         13        INIT_FCALL_BY_NAME                                       'iconv_mime_decode_headers'
         14        SEND_VAR_EX                                              !0
         15        FETCH_CONSTANT                                   ~5      'ICONV_MIME_DECODE_CONTINUE_ON_ERROR'
         16        SEND_VAL_EX                                              ~5
         17        SEND_VAL_EX                                              'utf-8'
         18        DO_FCALL                                      0  $6      
         19        SEND_VAR                                                 $6
         20        DO_FCALL                                      0          
         21      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nfLjB
function name:  test
number of ops:  14
compiled vars:  !0 = $name, !1 = $headers
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   15     2        CONCAT                                           ~2      'Test+in+mode+%22', !0
          3        CONCAT                                           ~3      ~2, '%22%3A+'
          4        ECHO                                                     ~3
   16     5        ISSET_ISEMPTY_DIM_OBJ                         0          !1, 'Content-Type'
          6      > JMPZ                                                     ~4, ->9
   17     7    >   ECHO                                                     'OK%21%0A'
          8      > JMP                                                      ->13
   19     9    >   ECHO                                                     'Content-Type+header+not+found%3A%0A'
   20    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
   22    13    > > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.17 ms | 1403 KiB | 17 Q