3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.95 ms | 1404 KiB | 17 Q