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); // antara 65 - 80 if ( $hasil >= $bp[1] && $hasil <= $bp[2] ) { $muBiasa = ($hasil - $kb[1]) / ($kb[2]-$kb[1]); $muPuas = ($hasil - $bp[1]) / ($bp[2]-$bp[1]); echo " muPuas " .$muPuas; echo " muBiasa " .$muBiasa; } else { echo "False"; }
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 = 46
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 47
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 46
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/mUCYZ
function name:  (null)
number of ops:  48
compiled vars:  !0 = $hasil, !1 = $kecewa, !2 = $biasa, !3 = $puas, !4 = $kb, !5 = $bp, !6 = $muBiasa, !7 = $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>
    7     4        INIT_FCALL                                               'array_intersect'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $12     
          8        ASSIGN                                                   !4, $12
    8     9        INIT_FCALL                                               'array_intersect'
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $14     
         13        ASSIGN                                                   !5, $14
   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                                      ~18     !5, 1
         21        IS_SMALLER_OR_EQUAL                              ~19     ~18, !0
         22      > JMPZ_EX                                          ~19     ~19, ->26
         23    >   FETCH_DIM_R                                      ~20     !5, 2
         24        IS_SMALLER_OR_EQUAL                              ~21     !0, ~20
         25        BOOL                                             ~19     ~21
         26    > > JMPZ                                                     ~19, ->46
   16    27    >   FETCH_DIM_R                                      ~22     !4, 1
         28        SUB                                              ~23     !0, ~22
         29        FETCH_DIM_R                                      ~24     !4, 2
         30        FETCH_DIM_R                                      ~25     !4, 1
         31        SUB                                              ~26     ~24, ~25
         32        DIV                                              ~27     ~23, ~26
         33        ASSIGN                                                   !6, ~27
   17    34        FETCH_DIM_R                                      ~29     !5, 1
         35        SUB                                              ~30     !0, ~29
         36        FETCH_DIM_R                                      ~31     !5, 2
         37        FETCH_DIM_R                                      ~32     !5, 1
         38        SUB                                              ~33     ~31, ~32
         39        DIV                                              ~34     ~30, ~33
         40        ASSIGN                                                   !7, ~34
   18    41        CONCAT                                           ~36     '+muPuas+', !7
         42        ECHO                                                     ~36
   19    43        CONCAT                                           ~37     '+muBiasa+', !6
         44        ECHO                                                     ~37
         45      > JMP                                                      ->47
   23    46    >   ECHO                                                     'False'
   24    47    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.52 ms | 1400 KiB | 17 Q