3v4l.org

run code in 300+ PHP versions simultaneously
<?php $acceptFormat = array( 'jpg' => 'image/jpeg', 'jpg' => 'image/jpg', 'png' => 'image/png' ); $ext ='jpg'; if (!in_array($ext,array_keys($acceptFormat))) { throw new RuntimeException('Invalid file format.'); } $mime = 'video/mkv'; if (!in_array($mime,array_values($acceptFormat))) { throw new RuntimeException('Invalid mime format.'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 29
Branch analysis from position: 25
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aNdMM
function name:  (null)
number of ops:  30
compiled vars:  !0 = $acceptFormat, !1 = $ext, !2 = $mime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, 'jpg'
   11     2        INIT_FCALL                                               'in_array'
          3        SEND_VAR                                                 !1
          4        INIT_FCALL                                               'array_keys'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                         $6      
          9        BOOL_NOT                                         ~7      $6
         10      > JMPZ                                                     ~7, ->15
   12    11    >   NEW                                              $8      'RuntimeException'
         12        SEND_VAL_EX                                              'Invalid+file+format.'
         13        DO_FCALL                                      0          
         14      > THROW                                         0          $8
   15    15    >   ASSIGN                                                   !2, 'video%2Fmkv'
   17    16        INIT_FCALL                                               'in_array'
         17        SEND_VAR                                                 !2
         18        INIT_FCALL                                               'array_values'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                         $11     
         21        SEND_VAR                                                 $11
         22        DO_ICALL                                         $12     
         23        BOOL_NOT                                         ~13     $12
         24      > JMPZ                                                     ~13, ->29
   18    25    >   NEW                                              $14     'RuntimeException'
         26        SEND_VAL_EX                                              'Invalid+mime+format.'
         27        DO_FCALL                                      0          
         28      > THROW                                         0          $14
   19    29    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
788.92 ms | 1001 KiB | 16 Q