3v4l.org

run code in 300+ PHP versions simultaneously
<?php $finish="a"; while($finish="a"){ $i = (mt_rand(0,999)); $counter = 0; for($j=1;$j<=$i;$j++){ //all divisible factors if(($i % $j)==0){ $counter++; } //prime requires 2 rules ( divisible by 1 and divisible by itself) if($counter==2){ print $i." is Prime <br/>"; $finish="b"; } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 10
Branch analysis from position: 22
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 19
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 10
Branch analysis from position: 22
Branch analysis from position: 10
Branch analysis from position: 19
Branch analysis from position: 14
filename:       /in/ucVT2
function name:  (null)
number of ops:  25
compiled vars:  !0 = $finish, !1 = $i, !2 = $counter, !3 = $j
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'a'
    4     1      > JMP                                                      ->22
    5     2    >   INIT_FCALL                                               'mt_rand'
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 999
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    7     7        ASSIGN                                                   !2, 0
    8     8        ASSIGN                                                   !3, 1
          9      > JMP                                                      ->20
   11    10    >   MOD                                              ~9      !1, !3
         11        IS_EQUAL                                                 ~9, 0
         12      > JMPZ                                                     ~10, ->14
   13    13    >   PRE_INC                                                  !2
   18    14    >   IS_EQUAL                                                 !2, 2
         15      > JMPZ                                                     ~12, ->19
   20    16    >   CONCAT                                           ~13     !1, '+is+Prime+%3Cbr%2F%3E'
         17        ECHO                                                     ~13
   21    18        ASSIGN                                                   !0, 'b'
    8    19    >   PRE_INC                                                  !3
         20    >   IS_SMALLER_OR_EQUAL                                      !3, !1
         21      > JMPNZ                                                    ~16, ->10
    4    22    >   ASSIGN                                           ~17     !0, 'a'
         23      > JMPNZ                                                    ~17, ->2
   24    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.52 ms | 1396 KiB | 15 Q