3v4l.org

run code in 300+ PHP versions simultaneously
<?php $e['invalid']['key'][] = 'a123'; $e['invalid']['key'][] = 'a456'; $e['invalid']['color'][] = 'red'; $e['missing']['key'][] = 'b72'; $e['missing']['color'][] = 'blue'; $e['missing']['color'][] = 'green'; define("ERROR_LOOKUP", [ 'invalid' => '%s is not a valid %s', 'missing' => '%s is a required %s - other functions have dependencies on it', ]); $errors = []; foreach ($e as $type => $subtypes) { if (!isset(ERROR_LOOKUP[$type])) { continue; } foreach ($subtypes as $subtype => $entry) { foreach ($entry as $string) { $errors[] = sprintf(ERROR_LOOKUP[$type], $subtype, $string); } } } echo implode("\n", $errors);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 30, Position 2 = 56
Branch analysis from position: 30
2 jumps found. (Code = 78) Position 1 = 31, Position 2 = 56
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 37
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 37
2 jumps found. (Code = 77) Position 1 = 38, Position 2 = 54
Branch analysis from position: 38
2 jumps found. (Code = 78) Position 1 = 39, Position 2 = 54
Branch analysis from position: 39
2 jumps found. (Code = 77) Position 1 = 41, Position 2 = 52
Branch analysis from position: 41
2 jumps found. (Code = 78) Position 1 = 42, Position 2 = 52
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
Branch analysis from position: 52
Branch analysis from position: 54
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 54
Branch analysis from position: 56
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 56
filename:       /in/vr83e
function name:  (null)
number of ops:  63
compiled vars:  !0 = $e, !1 = $errors, !2 = $subtypes, !3 = $type, !4 = $entry, !5 = $subtype, !6 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   FETCH_DIM_W                                      $7      !0, 'invalid'
          1        FETCH_DIM_W                                      $8      $7, 'key'
          2        ASSIGN_DIM                                               $8
          3        OP_DATA                                                  'a123'
    3     4        FETCH_DIM_W                                      $10     !0, 'invalid'
          5        FETCH_DIM_W                                      $11     $10, 'key'
          6        ASSIGN_DIM                                               $11
          7        OP_DATA                                                  'a456'
    4     8        FETCH_DIM_W                                      $13     !0, 'invalid'
          9        FETCH_DIM_W                                      $14     $13, 'color'
         10        ASSIGN_DIM                                               $14
         11        OP_DATA                                                  'red'
    5    12        FETCH_DIM_W                                      $16     !0, 'missing'
         13        FETCH_DIM_W                                      $17     $16, 'key'
         14        ASSIGN_DIM                                               $17
         15        OP_DATA                                                  'b72'
    6    16        FETCH_DIM_W                                      $19     !0, 'missing'
         17        FETCH_DIM_W                                      $20     $19, 'color'
         18        ASSIGN_DIM                                               $20
         19        OP_DATA                                                  'blue'
    7    20        FETCH_DIM_W                                      $22     !0, 'missing'
         21        FETCH_DIM_W                                      $23     $22, 'color'
         22        ASSIGN_DIM                                               $23
         23        OP_DATA                                                  'green'
    9    24        INIT_FCALL                                               'define'
         25        SEND_VAL                                                 'ERROR_LOOKUP'
   10    26        SEND_VAL                                                 <array>
         27        DO_ICALL                                                 
   14    28        ASSIGN                                                   !1, <array>
   15    29      > FE_RESET_R                                       $27     !0, ->56
         30    > > FE_FETCH_R                                       ~28     $27, !2, ->56
         31    >   ASSIGN                                                   !3, ~28
   16    32        FETCH_CONSTANT                                   ~30     'ERROR_LOOKUP'
         33        ISSET_ISEMPTY_DIM_OBJ                         0  ~31     ~30, !3
         34        BOOL_NOT                                         ~32     ~31
         35      > JMPZ                                                     ~32, ->37
   17    36    > > JMP                                                      ->30
   19    37    > > FE_RESET_R                                       $33     !2, ->54
         38    > > FE_FETCH_R                                       ~34     $33, !4, ->54
         39    >   ASSIGN                                                   !5, ~34
   20    40      > FE_RESET_R                                       $36     !4, ->52
         41    > > FE_FETCH_R                                               $36, !6, ->52
   21    42    >   INIT_FCALL                                               'sprintf'
         43        FETCH_CONSTANT                                   ~38     'ERROR_LOOKUP'
         44        FETCH_DIM_R                                      ~39     ~38, !3
         45        SEND_VAL                                                 ~39
         46        SEND_VAR                                                 !5
         47        SEND_VAR                                                 !6
         48        DO_ICALL                                         $40     
         49        ASSIGN_DIM                                               !1
         50        OP_DATA                                                  $40
   20    51      > JMP                                                      ->41
         52    >   FE_FREE                                                  $36
   19    53      > JMP                                                      ->38
         54    >   FE_FREE                                                  $33
   15    55      > JMP                                                      ->30
         56    >   FE_FREE                                                  $27
   25    57        INIT_FCALL                                               'implode'
         58        SEND_VAL                                                 '%0A'
         59        SEND_VAR                                                 !1
         60        DO_ICALL                                         $41     
         61        ECHO                                                     $41
         62      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.03 ms | 1404 KiB | 19 Q