3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numArray = number_list($input); $prime = 2; $count = 0; while ($prime <= $input) { foreach ($numArray as $key => $num) { if (($num !== $prime) && ($num % $prime === 0)) { unset($numArray[$key]); } } $count++; $prime = $numArray[$count]; }
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 = 7
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 18
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 18
Branch analysis from position: 9
2 jumps found. (Code = 46) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 17
Branch analysis from position: 15
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 24, Position 2 = 7
Branch analysis from position: 24
Branch analysis from position: 7
Branch analysis from position: 18
filename:       /in/lYkO1
function name:  (null)
number of ops:  25
compiled vars:  !0 = $numArray, !1 = $input, !2 = $prime, !3 = $count, !4 = $num, !5 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'number_list'
          1        SEND_VAR_EX                                              !1
          2        DO_FCALL                                      0  $6      
          3        ASSIGN                                                   !0, $6
    3     4        ASSIGN                                                   !2, 2
    4     5        ASSIGN                                                   !3, 0
    5     6      > JMP                                                      ->22
    6     7    > > FE_RESET_R                                       $10     !0, ->18
          8    > > FE_FETCH_R                                       ~11     $10, !4, ->18
          9    >   ASSIGN                                                   !5, ~11
    7    10        IS_NOT_IDENTICAL                                 ~13     !4, !2
         11      > JMPZ_EX                                          ~13     ~13, ->15
         12    >   MOD                                              ~14     !4, !2
         13        IS_IDENTICAL                                     ~15     ~14, 0
         14        BOOL                                             ~13     ~15
         15    > > JMPZ                                                     ~13, ->17
    8    16    >   UNSET_DIM                                                !0, !5
    6    17    > > JMP                                                      ->8
         18    >   FE_FREE                                                  $10
   11    19        PRE_INC                                                  !3
   12    20        FETCH_DIM_R                                      ~17     !0, !3
         21        ASSIGN                                                   !2, ~17
    5    22    >   IS_SMALLER_OR_EQUAL                                      !2, !1
         23      > JMPNZ                                                    ~19, ->7
   13    24    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.26 ms | 1395 KiB | 13 Q