3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'inputs', 'app', 'post', 'server', ]; echo in_array('inputs', $array) ? '"inputs" is in the array...' : ''; echo "\n"; echo in_array(0, $array) ? '0 is also in the array!' : '0 is NOT in the array!'; echo "\n"; echo in_array(0, $array, true) ? '0 is also in the array!' : '0 is NOT in the array!'; echo "\n"; echo in_array(1, $array) ? '1 is also in the array!' : '1 is NOT in the array!'; echo "\n"; print_r(array_keys($array, 0));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 39
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 37, Position 2 = 39
Branch analysis from position: 37
Branch analysis from position: 39
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
Branch analysis from position: 29
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
Branch analysis from position: 18
filename:       /in/k915t
function name:  (null)
number of ops:  50
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'in_array'
          2        SEND_VAL                                                 'inputs'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5      > JMPZ                                                     $2, ->8
          6    >   QM_ASSIGN                                        ~3      '%22inputs%22+is+in+the+array...'
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~3      ''
          9    >   ECHO                                                     ~3
   11    10        ECHO                                                     '%0A'
   13    11        INIT_FCALL                                               'in_array'
         12        SEND_VAL                                                 0
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $4      
         15      > JMPZ                                                     $4, ->18
         16    >   QM_ASSIGN                                        ~5      '0+is+also+in+the+array%21'
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~5      '0+is+NOT+in+the+array%21'
         19    >   ECHO                                                     ~5
   14    20        ECHO                                                     '%0A'
   15    21        INIT_FCALL                                               'in_array'
         22        SEND_VAL                                                 0
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 <true>
         25        DO_ICALL                                         $6      
         26      > JMPZ                                                     $6, ->29
         27    >   QM_ASSIGN                                        ~7      '0+is+also+in+the+array%21'
         28      > JMP                                                      ->30
         29    >   QM_ASSIGN                                        ~7      '0+is+NOT+in+the+array%21'
         30    >   ECHO                                                     ~7
   16    31        ECHO                                                     '%0A'
   18    32        INIT_FCALL                                               'in_array'
         33        SEND_VAL                                                 1
         34        SEND_VAR                                                 !0
         35        DO_ICALL                                         $8      
         36      > JMPZ                                                     $8, ->39
         37    >   QM_ASSIGN                                        ~9      '1+is+also+in+the+array%21'
         38      > JMP                                                      ->40
         39    >   QM_ASSIGN                                        ~9      '1+is+NOT+in+the+array%21'
         40    >   ECHO                                                     ~9
   19    41        ECHO                                                     '%0A'
   21    42        INIT_FCALL                                               'print_r'
         43        INIT_FCALL                                               'array_keys'
         44        SEND_VAR                                                 !0
         45        SEND_VAL                                                 0
         46        DO_ICALL                                         $10     
         47        SEND_VAR                                                 $10
         48        DO_ICALL                                                 
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
281.15 ms | 1009 KiB | 16 Q