3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo solve("123-123-123-123-213-123-123-123"); function solve(string $quest):string{ $randTab=explode("-",$quest); if(count($randTab)!==8){ throw new \LogicException("not 8 randTab's (".count($randTab).")"); } foreach($randTab as $i=>$wut){ if(!is_numeric($wut)){ throw new \LogicException("randTab {$i} is not numeric! wtf?"); } } $goodSum=$randTab[0]*$randTab[0]*11+$randTab[1]*121+$randTab[2]*$randTab[1]*27+$randTab[3]*23+$randTab[4]*15+$randTab[5]*$randTab[6]*$randTab[7]*11-$randTab[3]*($randTab[5]+$randTab[4]); $goodSum%=100000000; $buf2=hash("md5",(string)$goodSum,false); return $buf2; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DALTI
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'solve'
          1        SEND_VAL_EX                                              '123-123-123-123-213-123-123-123'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   19     4      > RETURN                                                   1

Function solve:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 32
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 32
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 31
Branch analysis from position: 24
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/DALTI
function name:  solve
number of ops:  77
compiled vars:  !0 = $quest, !1 = $randTab, !2 = $wut, !3 = $i, !4 = $goodSum, !5 = $buf2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '-'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    7     6        COUNT                                            ~8      !1
          7        IS_NOT_IDENTICAL                                         ~8, 8
          8      > JMPZ                                                     ~9, ->16
    8     9    >   NEW                                              $10     'LogicException'
         10        COUNT                                            ~11     !1
         11        CONCAT                                           ~12     'not+8+randTab%27s+%28', ~11
         12        CONCAT                                           ~13     ~12, '%29'
         13        SEND_VAL_EX                                              ~13
         14        DO_FCALL                                      0          
         15      > THROW                                         0          $10
   10    16    > > FE_RESET_R                                       $15     !1, ->32
         17    > > FE_FETCH_R                                       ~16     $15, !2, ->32
         18    >   ASSIGN                                                   !3, ~16
   11    19        INIT_FCALL                                               'is_numeric'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $18     
         22        BOOL_NOT                                         ~19     $18
         23      > JMPZ                                                     ~19, ->31
   12    24    >   NEW                                              $20     'LogicException'
         25        ROPE_INIT                                     3  ~22     'randTab+'
         26        ROPE_ADD                                      1  ~22     ~22, !3
         27        ROPE_END                                      2  ~21     ~22, '+is+not+numeric%21+wtf%3F'
         28        SEND_VAL_EX                                              ~21
         29        DO_FCALL                                      0          
         30      > THROW                                         0          $20
   10    31    > > JMP                                                      ->17
         32    >   FE_FREE                                                  $15
   15    33        FETCH_DIM_R                                      ~25     !1, 0
         34        FETCH_DIM_R                                      ~26     !1, 0
         35        MUL                                              ~27     ~25, ~26
         36        MUL                                              ~28     ~27, 11
         37        FETCH_DIM_R                                      ~29     !1, 1
         38        MUL                                              ~30     ~29, 121
         39        ADD                                              ~31     ~28, ~30
         40        FETCH_DIM_R                                      ~32     !1, 2
         41        FETCH_DIM_R                                      ~33     !1, 1
         42        MUL                                              ~34     ~32, ~33
         43        MUL                                              ~35     ~34, 27
         44        ADD                                              ~36     ~31, ~35
         45        FETCH_DIM_R                                      ~37     !1, 3
         46        MUL                                              ~38     ~37, 23
         47        ADD                                              ~39     ~36, ~38
         48        FETCH_DIM_R                                      ~40     !1, 4
         49        MUL                                              ~41     ~40, 15
         50        ADD                                              ~42     ~39, ~41
         51        FETCH_DIM_R                                      ~43     !1, 5
         52        FETCH_DIM_R                                      ~44     !1, 6
         53        MUL                                              ~45     ~43, ~44
         54        FETCH_DIM_R                                      ~46     !1, 7
         55        MUL                                              ~47     ~45, ~46
         56        MUL                                              ~48     ~47, 11
         57        ADD                                              ~49     ~42, ~48
         58        FETCH_DIM_R                                      ~50     !1, 3
         59        FETCH_DIM_R                                      ~51     !1, 5
         60        FETCH_DIM_R                                      ~52     !1, 4
         61        ADD                                              ~53     ~51, ~52
         62        MUL                                              ~54     ~50, ~53
         63        SUB                                              ~55     ~49, ~54
         64        ASSIGN                                                   !4, ~55
   16    65        ASSIGN_OP                                     5          !4, 100000000
   17    66        INIT_FCALL                                               'hash'
         67        SEND_VAL                                                 'md5'
         68        CAST                                          6  ~58     !4
         69        SEND_VAL                                                 ~58
         70        SEND_VAL                                                 <false>
         71        DO_ICALL                                         $59     
         72        ASSIGN                                                   !5, $59
   18    73        VERIFY_RETURN_TYPE                                       !5
         74      > RETURN                                                   !5
   19    75*       VERIFY_RETURN_TYPE                                       
         76*     > RETURN                                                   null

End of function solve

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.11 ms | 1443 KiB | 16 Q