3v4l.org

run code in 300+ PHP versions simultaneously
<?php $types = array('Normal','Fighting','Flying','Poison','Ground','Rock','Bug','Ghost','Steel','Fire','Water','Grass','Electric','Psychic','Ice','Dragon','Dark','Fairy',); $effect_vals = array( array(1, 1, 1, 1, 1,.5, 1, 0,.5, 1, 1, 1, 1, 1, 1, 1, 1, 1), array(2, 1,.5,.5, 1, 2,.5, 0, 2, 1, 1, 1, 1,.5, 2, 1, 2,.5), array(1, 2, 1, 1, 1,.5, 2, 1,.5, 1, 1, 2,.5, 1, 1, 1, 1, 1), array(1, 1, 1,.5,.5,.5, 1,.5, 0, 1, 1, 2, 1, 1, 1, 1, 1, 2), array(1, 1, 0, 2, 1, 2,.5, 1, 2, 2, 1,.5, 2, 1, 1, 1, 1, 1), array(1,.5, 2, 1,.5, 1, 2, 1,.5, 2, 1, 1, 1, 1, 2, 1, 1, 1), array(1,.5,.5,.5, 1, 1, 1,.5,.5,.5, 1, 2, 1, 2, 1, 1, 2,.5), array(0, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1,.5, 1), array(1, 1, 1, 1, 1, 2, 1, 1,.5,.5,.5, 1,.5, 1, 2, 1, 1, 2), array(1, 1, 1, 1, 1,.5, 2, 1, 2,.5,.5, 2, 1, 1, 2,.5, 1, 1), array(1, 1, 1, 1, 2, 2, 1, 1, 1, 2,.5,.5, 1, 1, 1,.5, 1, 1), array(1, 1,.5,.5, 2, 2,.5, 1,.5,.5, 2,.5, 1, 1, 1,.5, 1, 1), array(1, 1, 2, 1, 0, 1, 1, 1, 1, 1, 2,.5,.5, 1, 1,.5, 1, 1), array(1, 2, 1, 2, 1, 1, 1, 1,.5, 1, 1, 1, 1,.5, 1, 1, 0, 1), array(1, 1, 2, 1, 2, 1, 1, 1,.5,.5,.5, 2, 1, 1,.5, 2, 1, 1), array(1, 1, 1, 1, 1, 1, 1, 1,.5, 1, 1, 1, 1, 1, 1, 2, 1, 0), array(1,.5, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1,.5,.5), array(1, 2, 1,.5, 1, 1, 1, 1,.5,.5, 1, 1, 1, 1, 1, 2, 2, 1), ); $types_short = array_map( function($type){return substr($type, 0, 3);}, $types ); $format_prefix = '%-3s'; $format_header = str_repeat(' %3s', count($types)); $format_data = str_repeat(' %3f', count($types)); // header printf($format_prefix, ''); vprintf($format_header, $types_short); echo "\n"; // data foreach(array_map(NULL, $types_short, $effect_vals) as $val) { printf($format_prefix, $val[0]); vprintf($format_data, $val[1]); echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 36, Position 2 = 49
Branch analysis from position: 36
2 jumps found. (Code = 78) Position 1 = 37, Position 2 = 49
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
filename:       /in/KB2sh
function name:  (null)
number of ops:  51
compiled vars:  !0 = $types, !1 = $effect_vals, !2 = $types_short, !3 = $format_prefix, !4 = $format_header, !5 = $format_data, !6 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
   26     2        INIT_FCALL                                               'array_map'
   27     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FKB2sh%3A27%240'
          4        SEND_VAL                                                 ~9
   28     5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $10     
   26     7        ASSIGN                                                   !2, $10
   31     8        ASSIGN                                                   !3, '%25-3s'
   32     9        INIT_FCALL                                               'str_repeat'
         10        SEND_VAL                                                 '+%253s'
         11        COUNT                                            ~13     !0
         12        SEND_VAL                                                 ~13
         13        DO_ICALL                                         $14     
         14        ASSIGN                                                   !4, $14
   33    15        INIT_FCALL                                               'str_repeat'
         16        SEND_VAL                                                 '+%253f'
         17        COUNT                                            ~16     !0
         18        SEND_VAL                                                 ~16
         19        DO_ICALL                                         $17     
         20        ASSIGN                                                   !5, $17
   36    21        INIT_FCALL                                               'printf'
         22        SEND_VAR                                                 !3
         23        SEND_VAL                                                 ''
         24        DO_ICALL                                                 
   37    25        INIT_FCALL                                               'vprintf'
         26        SEND_VAR                                                 !4
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                                 
   38    29        ECHO                                                     '%0A'
   41    30        INIT_FCALL                                               'array_map'
         31        SEND_VAL                                                 null
         32        SEND_VAR                                                 !2
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                         $21     
         35      > FE_RESET_R                                       $22     $21, ->49
         36    > > FE_FETCH_R                                               $22, !6, ->49
   42    37    >   INIT_FCALL                                               'printf'
         38        SEND_VAR                                                 !3
         39        FETCH_DIM_R                                      ~23     !6, 0
         40        SEND_VAL                                                 ~23
         41        DO_ICALL                                                 
   43    42        INIT_FCALL                                               'vprintf'
         43        SEND_VAR                                                 !5
         44        FETCH_DIM_R                                      ~25     !6, 1
         45        SEND_VAL                                                 ~25
         46        DO_ICALL                                                 
   44    47        ECHO                                                     '%0A'
   41    48      > JMP                                                      ->36
         49    >   FE_FREE                                                  $22
   45    50      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FKB2sh%3A27%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KB2sh
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 3
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
          7*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FKB2sh%3A27%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.83 ms | 1400 KiB | 23 Q