3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hasil = 0; $kurang = array(0,12); $cukup = array(12,16); $berlebih = array(16,20); $kb = array_intersect($kurang, $cukup); $bp = array_intersect($cukup, $berlebih); print_r($kc); print_r($cb); // antara 12-16 if ( $hasil >= $cb[1] && $hasil <= $cb[2] ) { $muCukup = ($hasil >= $cb[2]) ? "0" : ($hasil <= $cb[2] ? ($hasil - $kc[1]) / ($kc[2] - $kc[1]) : "0.5" ); $muBerlebih = ($hasil - $cb[1]) / ($cb[2] - $cb[1]); echo " muPuas " .$muBerlebih; echo " muBiasa " .$muCukup; } // antara 0-12 elseif ( $hasil >= $kc[1] && $hasil < $kc[2] ) { $muKurang = ($kc[2] - $hasil) / ($kc[2] - $kc[1]); $muCukup = ($hasil - $kc[1]) / ($kc[2] - $kc[1]); echo "muKecewa " .$muKurang; echo "muBias " .$muCukup; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 23, Position 2 = 26
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 58
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 43
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 83
Branch analysis from position: 83
Branch analysis from position: 58
2 jumps found. (Code = 46) Position 1 = 61, Position 2 = 64
Branch analysis from position: 61
2 jumps found. (Code = 43) Position 1 = 65, Position 2 = 83
Branch analysis from position: 65
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 83
Branch analysis from position: 64
Branch analysis from position: 26
filename:       /in/Ak5ph
function name:  (null)
number of ops:  84
compiled vars:  !0 = $hasil, !1 = $kurang, !2 = $cukup, !3 = $berlebih, !4 = $kb, !5 = $bp, !6 = $kc, !7 = $cb, !8 = $muCukup, !9 = $muBerlebih, !10 = $muKurang
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
    3     1        ASSIGN                                                   !1, <array>
    4     2        ASSIGN                                                   !2, <array>
    5     3        ASSIGN                                                   !3, <array>
    7     4        INIT_FCALL                                               'array_intersect'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $15     
          8        ASSIGN                                                   !4, $15
    8     9        INIT_FCALL                                               'array_intersect'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $17     
         13        ASSIGN                                                   !5, $17
   10    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !6
         16        DO_ICALL                                                 
   11    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !7
         19        DO_ICALL                                                 
   14    20        FETCH_DIM_R                                      ~21     !7, 1
         21        IS_SMALLER_OR_EQUAL                              ~22     ~21, !0
         22      > JMPZ_EX                                          ~22     ~22, ->26
         23    >   FETCH_DIM_R                                      ~23     !7, 2
         24        IS_SMALLER_OR_EQUAL                              ~24     !0, ~23
         25        BOOL                                             ~22     ~24
         26    > > JMPZ                                                     ~22, ->58
   17    27    >   FETCH_DIM_R                                      ~25     !7, 2
         28        IS_SMALLER_OR_EQUAL                                      ~25, !0
         29      > JMPZ                                                     ~26, ->32
         30    >   QM_ASSIGN                                        ~27     '0'
         31      > JMP                                                      ->45
         32    >   FETCH_DIM_R                                      ~28     !7, 2
         33        IS_SMALLER_OR_EQUAL                                      !0, ~28
         34      > JMPZ                                                     ~29, ->43
         35    >   FETCH_DIM_R                                      ~30     !6, 1
         36        SUB                                              ~31     !0, ~30
         37        FETCH_DIM_R                                      ~32     !6, 2
         38        FETCH_DIM_R                                      ~33     !6, 1
         39        SUB                                              ~34     ~32, ~33
         40        DIV                                              ~35     ~31, ~34
         41        QM_ASSIGN                                        ~36     ~35
         42      > JMP                                                      ->44
         43    >   QM_ASSIGN                                        ~36     '0.5'
         44    >   QM_ASSIGN                                        ~27     ~36
         45    >   ASSIGN                                                   !8, ~27
   18    46        FETCH_DIM_R                                      ~38     !7, 1
         47        SUB                                              ~39     !0, ~38
         48        FETCH_DIM_R                                      ~40     !7, 2
         49        FETCH_DIM_R                                      ~41     !7, 1
         50        SUB                                              ~42     ~40, ~41
         51        DIV                                              ~43     ~39, ~42
         52        ASSIGN                                                   !9, ~43
   19    53        CONCAT                                           ~45     '+muPuas+', !9
         54        ECHO                                                     ~45
   20    55        CONCAT                                           ~46     '+muBiasa+', !8
         56        ECHO                                                     ~46
         57      > JMP                                                      ->83
   23    58    >   FETCH_DIM_R                                      ~47     !6, 1
         59        IS_SMALLER_OR_EQUAL                              ~48     ~47, !0
         60      > JMPZ_EX                                          ~48     ~48, ->64
         61    >   FETCH_DIM_R                                      ~49     !6, 2
         62        IS_SMALLER                                       ~50     !0, ~49
         63        BOOL                                             ~48     ~50
         64    > > JMPZ                                                     ~48, ->83
   25    65    >   FETCH_DIM_R                                      ~51     !6, 2
         66        SUB                                              ~52     ~51, !0
         67        FETCH_DIM_R                                      ~53     !6, 2
         68        FETCH_DIM_R                                      ~54     !6, 1
         69        SUB                                              ~55     ~53, ~54
         70        DIV                                              ~56     ~52, ~55
         71        ASSIGN                                                   !10, ~56
   26    72        FETCH_DIM_R                                      ~58     !6, 1
         73        SUB                                              ~59     !0, ~58
         74        FETCH_DIM_R                                      ~60     !6, 2
         75        FETCH_DIM_R                                      ~61     !6, 1
         76        SUB                                              ~62     ~60, ~61
         77        DIV                                              ~63     ~59, ~62
         78        ASSIGN                                                   !8, ~63
   27    79        CONCAT                                           ~65     'muKecewa+', !10
         80        ECHO                                                     ~65
   28    81        CONCAT                                           ~66     'muBias+', !8
         82        ECHO                                                     ~66
   29    83    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.8 ms | 1404 KiB | 17 Q