3v4l.org

run code in 300+ PHP versions simultaneously
<? $prefix2op = array('53' => 1, '54' => 2, '55' => 3, '50' => 3); function getDefaultOp($number) { global $prefix2op; $op3 = (int) substr($number, 0, 3); if (!($op3 >= 505 && $op3 <= 507)) return 0; $s = substr($number, 0, 2); return $prefix2op[$s]; } $a = array(); for($i = 0; $i < 10000; $i++){ $a[] = getDefaultOp(5073456108 + $i); } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
Branch analysis from position: 4
filename:       /in/5BT0S
function name:  (null)
number of ops:  14
compiled vars:  !0 = $prefix2op, !1 = $a, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   12     1        ASSIGN                                                   !1, <array>
   13     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->11
   14     4    >   INIT_FCALL                                               'getdefaultop'
          5        ADD                                              ~7      5073456108, !2
          6        SEND_VAL                                                 ~7
          7        DO_FCALL                                      0  $8      
          8        ASSIGN_DIM                                               !1
          9        OP_DATA                                                  $8
   13    10        PRE_INC                                                  !2
         11    >   IS_SMALLER                                               !2, 10000
         12      > JMPNZ                                                    ~10, ->4
   16    13    > > RETURN                                                   1

Function getdefaultop:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/5BT0S
function name:  getDefaultOp
number of ops:  25
compiled vars:  !0 = $number, !1 = $prefix2op, !2 = $op3, !3 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        BIND_GLOBAL                                              !1, 'prefix2op'
    5     2        INIT_FCALL                                               'substr'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 3
          6        DO_ICALL                                         $4      
          7        CAST                                          4  ~5      $4
          8        ASSIGN                                                   !2, ~5
    6     9        IS_SMALLER_OR_EQUAL                              ~7      505, !2
         10      > JMPZ_EX                                          ~7      ~7, ->13
         11    >   IS_SMALLER_OR_EQUAL                              ~8      !2, 507
         12        BOOL                                             ~7      ~8
         13    >   BOOL_NOT                                         ~9      ~7
         14      > JMPZ                                                     ~9, ->16
    7    15    > > RETURN                                                   0
    8    16    >   INIT_FCALL                                               'substr'
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 0
         19        SEND_VAL                                                 2
         20        DO_ICALL                                         $10     
         21        ASSIGN                                                   !3, $10
    9    22        FETCH_DIM_R                                      ~12     !1, !3
         23      > RETURN                                                   ~12
   10    24*     > RETURN                                                   null

End of function getdefaultop

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.33 ms | 1394 KiB | 16 Q