3v4l.org

run code in 300+ PHP versions simultaneously
<?php function kraceni($a, $b) { if ($a == $b) { return '1'; } if ($b == 1) { return $a; } if ($b == 0) { return 'INF'; } $prvocisla = '2;3;5;7;11;13;17;19;23;29;31;37;41;43;47;53;59;61;67;71;73;79;83;89;97;101;103;107;109;113;127;131;137;139;149;151;157;163;167;173;179;181;191;193;197;199;211;223;227;229;233;239;241;251;257;263;269;271;277;281;283;293;307;311;313;317;331;337;347;349;353;359;367;373;379;383;389;397;401;409;419;421;431;433;439;443;449;457;461;463;467;479;487;491;499;503;509;521;523;541;547;557;563;569;571;577;587;593;599;601;607;613;617;619;631;641;643;647;653;659;661;673;677;683;691;701;709;719;727;733;739;743;751;757;761;769;773;787;797;809;811;821;823;827;829;839;853;857;859;863;877;881;883;887;907;911;919;929;937;941;947;953;967;971;977;983;991;997;1009'; $parser = explode(';', $prvocisla); $x = 0; while ($x < 169) { if ($a%$parser[$x] == 0 && $b%$parser[$x] == 0) { if (kraceni($a/$parser[$x], $b/$parser[$x]) == ($a/$parser[$x]).'|'.($b/$parser[$x])) { return ($a/$parser[$x]).'|'.($b/$parser[$x]); } else { return kraceni($a/$parser[$x], $b/$parser[$x]); } } if ($a < $parser[$x] || $b < $parser[$x]) { break; } $x++; } return $a.'|'.$b; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UCRdc
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E > > RETURN                                                   1

Function kraceni:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 70
Branch analysis from position: 70
2 jumps found. (Code = 44) Position 1 = 72, Position 2 = 19
Branch analysis from position: 72
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 46) Position 1 = 23, Position 2 = 27
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 61
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 52
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 52
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 61
2 jumps found. (Code = 47) Position 1 = 64, Position 2 = 67
Branch analysis from position: 64
2 jumps found. (Code = 43) Position 1 = 68, Position 2 = 69
Branch analysis from position: 68
1 jumps found. (Code = 42) Position 1 = 72
Branch analysis from position: 72
Branch analysis from position: 69
2 jumps found. (Code = 44) Position 1 = 72, Position 2 = 19
Branch analysis from position: 72
Branch analysis from position: 19
Branch analysis from position: 67
Branch analysis from position: 27
filename:       /in/UCRdc
function name:  kraceni
number of ops:  76
compiled vars:  !0 = $a, !1 = $b, !2 = $prvocisla, !3 = $parser, !4 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        IS_EQUAL                                                 !0, !1
          3      > JMPZ                                                     ~5, ->5
          4    > > RETURN                                                   '1'
    4     5    >   IS_EQUAL                                                 !1, 1
          6      > JMPZ                                                     ~6, ->8
          7    > > RETURN                                                   !0
    5     8    >   IS_EQUAL                                                 !1, 0
          9      > JMPZ                                                     ~7, ->11
         10    > > RETURN                                                   'INF'
    6    11    >   ASSIGN                                                   !2, '2%3B3%3B5%3B7%3B11%3B13%3B17%3B19%3B23%3B29%3B31%3B37%3B41%3B43%3B47%3B53%3B59%3B61%3B67%3B71%3B73%3B79%3B83%3B89%3B97%3B101%3B103%3B107%3B109%3B113%3B127%3B131%3B137%3B139%3B149%3B151%3B157%3B163%3B167%3B173%3B179%3B181%3B191%3B193%3B197%3B199%3B211%3B223%3B227%3B229%3B233%3B239%3B241%3B251%3B257%3B263%3B269%3B271%3B277%3B281%3B283%3B293%3B307%3B311%3B313%3B317%3B331%3B337%3B347%3B349%3B353%3B359%3B367%3B373%3B379%3B383%3B389%3B397%3B401%3B409%3B419%3B421%3B431%3B433%3B439%3B443%3B449%3B457%3B461%3B463%3B467%3B479%3B487%3B491%3B499%3B503%3B509%3B521%3B523%3B541%3B547%3B557%3B563%3B569%3B571%3B577%3B587%3B593%3B599%3B601%3B607%3B613%3B617%3B619%3B631%3B641%3B643%3B647%3B653%3B659%3B661%3B673%3B677%3B683%3B691%3B701%3B709%3B719%3B727%3B733%3B739%3B743%3B751%3B757%3B761%3B769%3B773%3B787%3B797%3B809%3B811%3B821%3B823%3B827%3B829%3B839%3B853%3B857%3B859%3B863%3B877%3B881%3B883%3B887%3B907%3B911%3B919%3B929%3B937%3B941%3B947%3B953%3B967%3B971%3B977%3B983%3B991%3B997%3B1009'
    7    12        INIT_FCALL                                               'explode'
         13        SEND_VAL                                                 '%3B'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !3, $9
    8    17        ASSIGN                                                   !4, 0
    9    18      > JMP                                                      ->70
   10    19    >   FETCH_DIM_R                                      ~12     !3, !4
         20        MOD                                              ~13     !0, ~12
         21        IS_EQUAL                                         ~14     ~13, 0
         22      > JMPZ_EX                                          ~14     ~14, ->27
         23    >   FETCH_DIM_R                                      ~15     !3, !4
         24        MOD                                              ~16     !1, ~15
         25        IS_EQUAL                                         ~17     ~16, 0
         26        BOOL                                             ~14     ~17
         27    > > JMPZ                                                     ~14, ->61
   11    28    >   INIT_FCALL_BY_NAME                                       'kraceni'
         29        FETCH_DIM_R                                      ~18     !3, !4
         30        DIV                                              ~19     !0, ~18
         31        SEND_VAL_EX                                              ~19
         32        FETCH_DIM_R                                      ~20     !3, !4
         33        DIV                                              ~21     !1, ~20
         34        SEND_VAL_EX                                              ~21
         35        DO_FCALL                                      0  $22     
         36        FETCH_DIM_R                                      ~23     !3, !4
         37        DIV                                              ~24     !0, ~23
         38        CONCAT                                           ~25     ~24, '%7C'
         39        FETCH_DIM_R                                      ~26     !3, !4
         40        DIV                                              ~27     !1, ~26
         41        CONCAT                                           ~28     ~25, ~27
         42        IS_EQUAL                                                 $22, ~28
         43      > JMPZ                                                     ~29, ->52
   12    44    >   FETCH_DIM_R                                      ~30     !3, !4
         45        DIV                                              ~31     !0, ~30
         46        CONCAT                                           ~32     ~31, '%7C'
         47        FETCH_DIM_R                                      ~33     !3, !4
         48        DIV                                              ~34     !1, ~33
         49        CONCAT                                           ~35     ~32, ~34
         50      > RETURN                                                   ~35
         51*       JMP                                                      ->61
   14    52    >   INIT_FCALL_BY_NAME                                       'kraceni'
         53        FETCH_DIM_R                                      ~36     !3, !4
         54        DIV                                              ~37     !0, ~36
         55        SEND_VAL_EX                                              ~37
         56        FETCH_DIM_R                                      ~38     !3, !4
         57        DIV                                              ~39     !1, ~38
         58        SEND_VAL_EX                                              ~39
         59        DO_FCALL                                      0  $40     
         60      > RETURN                                                   $40
   17    61    >   FETCH_DIM_R                                      ~41     !3, !4
         62        IS_SMALLER                                       ~42     !0, ~41
         63      > JMPNZ_EX                                         ~42     ~42, ->67
         64    >   FETCH_DIM_R                                      ~43     !3, !4
         65        IS_SMALLER                                       ~44     !1, ~43
         66        BOOL                                             ~42     ~44
         67    > > JMPZ                                                     ~42, ->69
         68    > > JMP                                                      ->72
   18    69    >   PRE_INC                                                  !4
    9    70    >   IS_SMALLER                                               !4, 169
         71      > JMPNZ                                                    ~46, ->19
   20    72    >   CONCAT                                           ~47     !0, '%7C'
         73        CONCAT                                           ~48     ~47, !1
         74      > RETURN                                                   ~48
   21    75*     > RETURN                                                   null

End of function kraceni

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.51 ms | 1404 KiB | 15 Q