3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hasil = 0; $kecewa = array(0,40,65); $biasa = array(40,65,80); $puas = array(65,80,100); $kb = array_intersect($kecewa, $biasa); $bp = array_intersect($biasa, $puas); print_r($kb); print_r($bp); if ( $hasil <= $kb ) { // hitung nilai kecewa pake rumus fuzzy logic $muKecewa = ($kb[2] - $hasil) / ($kb[2] - $kb[1]); //output : 52,5 //$muBiasa = ($muKecewa <= 1) ? '1' : '0'; // output: bool(true)/ 0.5 echo "muKecewa".$muKecewa; //echo "muBiasa".$muBiasa; } elseif ( $hasil <= $bp ) { $muBiasa = ($hasil - $kb[1]) / ($bp[1] - $kb[1]); $muPuas = ($muBiasa >= 1) ? '0.5' : '0'; echo "muBias".$muBiasa; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 32
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 49
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 45
Branch analysis from position: 43
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 49
filename:       /in/FurJr
function name:  (null)
number of ops:  50
compiled vars:  !0 = $hasil, !1 = $kecewa, !2 = $biasa, !3 = $puas, !4 = $kb, !5 = $bp, !6 = $muKecewa, !7 = $muBiasa, !8 = $muPuas
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>
    6     4        INIT_FCALL                                               'array_intersect'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $13     
          8        ASSIGN                                                   !4, $13
    7     9        INIT_FCALL                                               'array_intersect'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $15     
         13        ASSIGN                                                   !5, $15
    8    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !4
         16        DO_ICALL                                                 
    9    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !5
         19        DO_ICALL                                                 
   11    20        IS_SMALLER_OR_EQUAL                                      !0, !4
         21      > JMPZ                                                     ~19, ->32
   14    22    >   FETCH_DIM_R                                      ~20     !4, 2
         23        SUB                                              ~21     ~20, !0
         24        FETCH_DIM_R                                      ~22     !4, 2
         25        FETCH_DIM_R                                      ~23     !4, 1
         26        SUB                                              ~24     ~22, ~23
         27        DIV                                              ~25     ~21, ~24
         28        ASSIGN                                                   !6, ~25
   17    29        CONCAT                                           ~27     'muKecewa', !6
         30        ECHO                                                     ~27
         31      > JMP                                                      ->49
   20    32    >   IS_SMALLER_OR_EQUAL                                      !0, !5
         33      > JMPZ                                                     ~28, ->49
   22    34    >   FETCH_DIM_R                                      ~29     !4, 1
         35        SUB                                              ~30     !0, ~29
         36        FETCH_DIM_R                                      ~31     !5, 1
         37        FETCH_DIM_R                                      ~32     !4, 1
         38        SUB                                              ~33     ~31, ~32
         39        DIV                                              ~34     ~30, ~33
         40        ASSIGN                                                   !7, ~34
   23    41        IS_SMALLER_OR_EQUAL                                      1, !7
         42      > JMPZ                                                     ~36, ->45
         43    >   QM_ASSIGN                                        ~37     '0.5'
         44      > JMP                                                      ->46
         45    >   QM_ASSIGN                                        ~37     '0'
         46    >   ASSIGN                                                   !8, ~37
   24    47        CONCAT                                           ~39     'muBias', !7
         48        ECHO                                                     ~39
   26    49    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.88 ms | 1392 KiB | 17 Q