3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hasil = 65; $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 = ($hasil - $kb[1]) / ($kb[2] - $kb[1]); echo "muKecewa ".$muKecewa; echo " muBiasa ".$muBiasa; } elseif ( $hasil >= $kb ) { $muBiasa = ($hasil - $kb[1]) / ($bp[1] - $kb[1]); $muPuas = ($muBiasa >= 1) ? '0.5' : '0'; echo "muBiasa".$muBiasa; echo "muPuas" .$muPuas; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 41
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 60
Branch analysis from position: 60
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 43, Position 2 = 60
Branch analysis from position: 43
2 jumps found. (Code = 43) Position 1 = 52, Position 2 = 54
Branch analysis from position: 52
1 jumps found. (Code = 42) Position 1 = 55
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 60
filename:       /in/DuToF
function name:  (null)
number of ops:  61
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, 65
    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, ->41
   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
   15    29        FETCH_DIM_R                                      ~27     !4, 1
         30        SUB                                              ~28     !0, ~27
         31        FETCH_DIM_R                                      ~29     !4, 2
         32        FETCH_DIM_R                                      ~30     !4, 1
         33        SUB                                              ~31     ~29, ~30
         34        DIV                                              ~32     ~28, ~31
         35        ASSIGN                                                   !7, ~32
   17    36        CONCAT                                           ~34     'muKecewa+', !6
         37        ECHO                                                     ~34
   18    38        CONCAT                                           ~35     '+muBiasa+', !7
         39        ECHO                                                     ~35
         40      > JMP                                                      ->60
   20    41    >   IS_SMALLER_OR_EQUAL                                      !4, !0
         42      > JMPZ                                                     ~36, ->60
   22    43    >   FETCH_DIM_R                                      ~37     !4, 1
         44        SUB                                              ~38     !0, ~37
         45        FETCH_DIM_R                                      ~39     !5, 1
         46        FETCH_DIM_R                                      ~40     !4, 1
         47        SUB                                              ~41     ~39, ~40
         48        DIV                                              ~42     ~38, ~41
         49        ASSIGN                                                   !7, ~42
   23    50        IS_SMALLER_OR_EQUAL                                      1, !7
         51      > JMPZ                                                     ~44, ->54
         52    >   QM_ASSIGN                                        ~45     '0.5'
         53      > JMP                                                      ->55
         54    >   QM_ASSIGN                                        ~45     '0'
         55    >   ASSIGN                                                   !8, ~45
   24    56        CONCAT                                           ~47     'muBiasa', !7
         57        ECHO                                                     ~47
   25    58        CONCAT                                           ~48     'muPuas', !8
         59        ECHO                                                     ~48
   27    60    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.03 ms | 1392 KiB | 17 Q