3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hasil = 18; $kecewa = array(0,11,11.999); $biasa = array(11,11.999,16.111); $puas = array(11.999,16.111,20); $kb = array_intersect($kecewa, $biasa); $bp = array_intersect($biasa, $puas); print_r($kb); print_r($bp); if ( $hasil >= $bp [1]) { $muBiasa = ($hasil >= $bp[2]) ? "0" : ($hasil <= $bp[2] ? ($hasil - $kb[1]) / ($kb[2] - $kb[1]) : "0.5" ); $muPuas = ($hasil - $bp[1]) / ($bp[2] - $bp[1]); if ($muPuas > $muBiasa) { echo "Beban Berlebih"; } else { echo "Beban Cukup"; } } elseif ($hasil < $kb [2] ) { $muKecewa = ($kb[2] - $hasil) / ($kb[2] - $kb[1]); $muBiasa = ($hasil - $kb[1]) / ($kb[2] - $kb[1]); if ($muKecewa > $muBiasa) { echo "Beban Kurang"; } else { echo "Beban Cukup"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 55
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 53
Branch analysis from position: 51
1 jumps found. (Code = 42) Position 1 = 54
Branch analysis from position: 54
1 jumps found. (Code = 42) Position 1 = 77
Branch analysis from position: 77
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 53
1 jumps found. (Code = 42) Position 1 = 77
Branch analysis from position: 77
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 39
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 53
Branch analysis from position: 51
Branch analysis from position: 53
Branch analysis from position: 39
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 53
Branch analysis from position: 51
Branch analysis from position: 53
Branch analysis from position: 55
2 jumps found. (Code = 43) Position 1 = 58, Position 2 = 77
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 74, Position 2 = 76
Branch analysis from position: 74
1 jumps found. (Code = 42) Position 1 = 77
Branch analysis from position: 77
Branch analysis from position: 76
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 77
filename:       /in/UW8WM
function name:  (null)
number of ops:  78
compiled vars:  !0 = $hasil, !1 = $kecewa, !2 = $biasa, !3 = $puas, !4 = $kb, !5 = $bp, !6 = $muBiasa, !7 = $muPuas, !8 = $muKecewa
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 18
    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                                                 
   13    20        FETCH_DIM_R                                      ~19     !5, 1
         21        IS_SMALLER_OR_EQUAL                                      ~19, !0
         22      > JMPZ                                                     ~20, ->55
   16    23    >   FETCH_DIM_R                                      ~21     !5, 2
         24        IS_SMALLER_OR_EQUAL                                      ~21, !0
         25      > JMPZ                                                     ~22, ->28
         26    >   QM_ASSIGN                                        ~23     '0'
         27      > JMP                                                      ->41
         28    >   FETCH_DIM_R                                      ~24     !5, 2
         29        IS_SMALLER_OR_EQUAL                                      !0, ~24
         30      > JMPZ                                                     ~25, ->39
         31    >   FETCH_DIM_R                                      ~26     !4, 1
         32        SUB                                              ~27     !0, ~26
         33        FETCH_DIM_R                                      ~28     !4, 2
         34        FETCH_DIM_R                                      ~29     !4, 1
         35        SUB                                              ~30     ~28, ~29
         36        DIV                                              ~31     ~27, ~30
         37        QM_ASSIGN                                        ~32     ~31
         38      > JMP                                                      ->40
         39    >   QM_ASSIGN                                        ~32     '0.5'
         40    >   QM_ASSIGN                                        ~23     ~32
         41    >   ASSIGN                                                   !6, ~23
   17    42        FETCH_DIM_R                                      ~34     !5, 1
         43        SUB                                              ~35     !0, ~34
         44        FETCH_DIM_R                                      ~36     !5, 2
         45        FETCH_DIM_R                                      ~37     !5, 1
         46        SUB                                              ~38     ~36, ~37
         47        DIV                                              ~39     ~35, ~38
         48        ASSIGN                                                   !7, ~39
   19    49        IS_SMALLER                                               !6, !7
         50      > JMPZ                                                     ~41, ->53
   20    51    >   ECHO                                                     'Beban+Berlebih'
         52      > JMP                                                      ->54
   23    53    >   ECHO                                                     'Beban+Cukup'
         54    > > JMP                                                      ->77
   27    55    >   FETCH_DIM_R                                      ~42     !4, 2
         56        IS_SMALLER                                               !0, ~42
         57      > JMPZ                                                     ~43, ->77
   29    58    >   FETCH_DIM_R                                      ~44     !4, 2
         59        SUB                                              ~45     ~44, !0
         60        FETCH_DIM_R                                      ~46     !4, 2
         61        FETCH_DIM_R                                      ~47     !4, 1
         62        SUB                                              ~48     ~46, ~47
         63        DIV                                              ~49     ~45, ~48
         64        ASSIGN                                                   !8, ~49
   30    65        FETCH_DIM_R                                      ~51     !4, 1
         66        SUB                                              ~52     !0, ~51
         67        FETCH_DIM_R                                      ~53     !4, 2
         68        FETCH_DIM_R                                      ~54     !4, 1
         69        SUB                                              ~55     ~53, ~54
         70        DIV                                              ~56     ~52, ~55
         71        ASSIGN                                                   !6, ~56
   32    72        IS_SMALLER                                               !6, !8
         73      > JMPZ                                                     ~58, ->76
   33    74    >   ECHO                                                     'Beban+Kurang'
         75      > JMP                                                      ->77
   36    76    >   ECHO                                                     'Beban+Cukup'
   38    77    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.96 ms | 1404 KiB | 17 Q