3v4l.org

run code in 300+ PHP versions simultaneously
<?php czyPierwsza($liczba); { if($liczba<2) return false; for($i=2 ; $i<$liczba ; $i++) { if($liczba%$i == 0) {return false;} else {return true;} } } $liczba=-7; if(czyPierwsza($liczba)) { echo "Liczba ".$liczba." jest pierwsza"; } else { echo "Liczba ".$liczba." nie jest pierwsza"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 26
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jCC9k
function name:  (null)
number of ops:  30
compiled vars:  !0 = $liczba, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'czyPierwsza'
          1        SEND_VAR_EX                                              !0
          2        DO_FCALL                                      0          
    5     3        IS_SMALLER                                               !0, 2
          4      > JMPZ                                                     ~3, ->6
          5    > > RETURN                                                   <false>
    6     6    >   ASSIGN                                                   !1, 2
          7      > JMP                                                      ->15
    8     8    >   MOD                                              ~5      !0, !1
          9        IS_EQUAL                                                 ~5, 0
         10      > JMPZ                                                     ~6, ->13
         11    > > RETURN                                                   <false>
         12*       JMP                                                      ->14
    9    13    > > RETURN                                                   <true>
    6    14*       PRE_INC                                                  !1
         15    >   IS_SMALLER                                               !1, !0
         16      > JMPNZ                                                    ~8, ->8
   13    17    >   ASSIGN                                                   !0, -7
   15    18        INIT_FCALL_BY_NAME                                       'czyPierwsza'
         19        SEND_VAR_EX                                              !0
         20        DO_FCALL                                      0  $10     
         21      > JMPZ                                                     $10, ->26
   17    22    >   CONCAT                                           ~11     'Liczba+', !0
         23        CONCAT                                           ~12     ~11, '+jest+pierwsza'
         24        ECHO                                                     ~12
         25      > JMP                                                      ->29
   21    26    >   CONCAT                                           ~13     'Liczba+', !0
         27        CONCAT                                           ~14     ~13, '+nie+jest+pierwsza'
         28        ECHO                                                     ~14
   22    29    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.21 ms | 1395 KiB | 13 Q