3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sks = 14; $kurang = array(0,0,14); $cukup = array(0,14,19.5); $lebih = array(14,19.5,24); $kc = array_intersect($kurang, $cukup); $cl = array_intersect($cukup, $lebih); print_r($kc); print_r($cl); // cl if ( $sks >= $cl[1] && $sks <= $cl[2] ) { $ftCukup = ($sks >= $cl[2]) ? "0" : ($sks <= $cl[2] ? ($sks - $kc[1]) / ($kc[2] - $kc[1]) : "0.5" ); $ftLebih = ($sks - $cl[1]) / ($cl[2] - $cl[1]); echo " ftLebih " .$ftLebih; echo " ftCukup " .$ftCukup; } // kc elseif ( $sks >= $kc[1] && $sks < $kc[2] ) { $ftKurang = ($kc[2] - $sks) / ($kc[2] - $kc[1]); $ftCukup = ($sks - $kc[1]) / ($kc[2] - $kc[1]); echo "ftKurang " .$ftKurang; echo "ftCukup " .$ftCukup; }
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/J6khn
function name:  (null)
number of ops:  84
compiled vars:  !0 = $sks, !1 = $kurang, !2 = $cukup, !3 = $lebih, !4 = $kc, !5 = $cl, !6 = $ftCukup, !7 = $ftLebih, !8 = $ftKurang
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 14
    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     '+ftLebih+', !7
         54        ECHO                                                     ~43
   20    55        CONCAT                                           ~44     '+ftCukup+', !6
         56        ECHO                                                     ~44
         57      > JMP                                                      ->83
   24    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
   26    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
   27    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
   28    79        CONCAT                                           ~63     'ftKurang+', !8
         80        ECHO                                                     ~63
   29    81        CONCAT                                           ~64     'ftCukup+', !6
         82        ECHO                                                     ~64
   30    83    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.85 ms | 1396 KiB | 17 Q