3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sks = 10; $kurang = array(0,8.5,14); $cukup = array(8.5,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 . "</ br>"; echo " ftCukup " .$ftCukup. "</ br>"; if ($ftLebih > $ftCukup) { echo "Beban Melebihi UU Yang Ditetapkan"; } else { echo "Beban Sesuai UU Yang Ditetapkan"; } } // 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. "<br>"; echo "ftCukup " .$ftCukup. "<br>"; if ($ftKurang > $ftCukup) { echo "Beban Kurang Dari UU Yang Ditetapkan"; } else { echo "Beban Sesuai UU Yang Ditetapkan"; } } else { echo "Total SKS yang Diinputkan tidak bisa diproses Sistem "; }
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 = 65
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
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 63
Branch analysis from position: 61
1 jumps found. (Code = 42) Position 1 = 64
Branch analysis from position: 64
1 jumps found. (Code = 42) Position 1 = 99
Branch analysis from position: 99
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 63
1 jumps found. (Code = 42) Position 1 = 99
Branch analysis from position: 99
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
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 63
Branch analysis from position: 61
Branch analysis from position: 63
Branch analysis from position: 43
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 63
Branch analysis from position: 61
Branch analysis from position: 63
Branch analysis from position: 65
2 jumps found. (Code = 46) Position 1 = 68, Position 2 = 71
Branch analysis from position: 68
2 jumps found. (Code = 43) Position 1 = 72, Position 2 = 98
Branch analysis from position: 72
2 jumps found. (Code = 43) Position 1 = 94, Position 2 = 96
Branch analysis from position: 94
1 jumps found. (Code = 42) Position 1 = 97
Branch analysis from position: 97
1 jumps found. (Code = 42) Position 1 = 99
Branch analysis from position: 99
Branch analysis from position: 96
1 jumps found. (Code = 42) Position 1 = 99
Branch analysis from position: 99
Branch analysis from position: 98
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 71
Branch analysis from position: 26
filename:       /in/AasmH
function name:  (null)
number of ops:  100
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, 10
    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, ->65
   16    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
   17    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
   18    53        CONCAT                                           ~43     '+ftLebih+', !7
         54        CONCAT                                           ~44     ~43, '%3C%2F+br%3E'
         55        ECHO                                                     ~44
   19    56        CONCAT                                           ~45     '+ftCukup+', !6
         57        CONCAT                                           ~46     ~45, '%3C%2F+br%3E'
         58        ECHO                                                     ~46
   21    59        IS_SMALLER                                               !6, !7
         60      > JMPZ                                                     ~47, ->63
   22    61    >   ECHO                                                     'Beban+Melebihi+UU+Yang+Ditetapkan'
         62      > JMP                                                      ->64
   25    63    >   ECHO                                                     'Beban+Sesuai+UU+Yang+Ditetapkan'
         64    > > JMP                                                      ->99
   30    65    >   FETCH_DIM_R                                      ~48     !4, 1
         66        IS_SMALLER_OR_EQUAL                              ~49     ~48, !0
         67      > JMPZ_EX                                          ~49     ~49, ->71
         68    >   FETCH_DIM_R                                      ~50     !4, 2
         69        IS_SMALLER                                       ~51     !0, ~50
         70        BOOL                                             ~49     ~51
         71    > > JMPZ                                                     ~49, ->98
   32    72    >   FETCH_DIM_R                                      ~52     !4, 2
         73        SUB                                              ~53     ~52, !0
         74        FETCH_DIM_R                                      ~54     !4, 2
         75        FETCH_DIM_R                                      ~55     !4, 1
         76        SUB                                              ~56     ~54, ~55
         77        DIV                                              ~57     ~53, ~56
         78        ASSIGN                                                   !8, ~57
   33    79        FETCH_DIM_R                                      ~59     !4, 1
         80        SUB                                              ~60     !0, ~59
         81        FETCH_DIM_R                                      ~61     !4, 2
         82        FETCH_DIM_R                                      ~62     !4, 1
         83        SUB                                              ~63     ~61, ~62
         84        DIV                                              ~64     ~60, ~63
         85        ASSIGN                                                   !6, ~64
   34    86        CONCAT                                           ~66     'ftKurang+', !8
         87        CONCAT                                           ~67     ~66, '%3Cbr%3E'
         88        ECHO                                                     ~67
   35    89        CONCAT                                           ~68     'ftCukup+', !6
         90        CONCAT                                           ~69     ~68, '%3Cbr%3E'
         91        ECHO                                                     ~69
   37    92        IS_SMALLER                                               !6, !8
         93      > JMPZ                                                     ~70, ->96
   38    94    >   ECHO                                                     'Beban+Kurang+Dari+UU+Yang+Ditetapkan'
         95      > JMP                                                      ->97
   41    96    >   ECHO                                                     'Beban+Sesuai+UU+Yang+Ditetapkan'
         97    > > JMP                                                      ->99
   46    98    >   ECHO                                                     'Total+SKS+yang+Diinputkan+tidak+bisa+diproses+Sistem+'
   47    99    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.44 ms | 1404 KiB | 17 Q