3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cups = array(); for($i=0; $i<100; $i++){ $cups[$i] = 0; } for($x=1; $x<100; $x++){ for($y=$x; $y<100; $y+=$x){ $cups[$y] = !$cups[$y]; } } $selected = array(); foreach($cups as $key => $value){ if($value == 1){ $selected[] = $key; } } $sel_str = implode(', ', $selected); echo $sel_str; echo "\n\n\n\n"; foreach (explode(', ', '1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225') as $num) { settype($num, 'integer'); echo decbin($num)."\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
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
2 jumps found. (Code = 77) Position 1 = 24, Position 2 = 31
Branch analysis from position: 24
2 jumps found. (Code = 78) Position 1 = 25, Position 2 = 31
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
Branch analysis from position: 30
Branch analysis from position: 31
2 jumps found. (Code = 77) Position 1 = 44, Position 2 = 55
Branch analysis from position: 44
2 jumps found. (Code = 78) Position 1 = 45, Position 2 = 55
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
Branch analysis from position: 55
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 55
Branch analysis from position: 31
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 12
Branch analysis from position: 19
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: 12
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 12
Branch analysis from position: 19
Branch analysis from position: 12
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/VYM2J
function name:  (null)
number of ops:  57
compiled vars:  !0 = $cups, !1 = $i, !2 = $x, !3 = $y, !4 = $selected, !5 = $value, !6 = $key, !7 = $sel_str, !8 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
    5     3    >   ASSIGN_DIM                                               !0, !1
          4        OP_DATA                                                  0
    4     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, 100
          7      > JMPNZ                                                    ~13, ->3
    8     8    >   ASSIGN                                                   !2, 1
          9      > JMP                                                      ->20
    9    10    >   ASSIGN                                                   !3, !2
         11      > JMP                                                      ->17
   10    12    >   FETCH_DIM_R                                      ~17     !0, !3
         13        BOOL_NOT                                         ~18     ~17
         14        ASSIGN_DIM                                               !0, !3
         15        OP_DATA                                                  ~18
    9    16        ASSIGN_OP                                     1          !3, !2
         17    >   IS_SMALLER                                               !3, 100
         18      > JMPNZ                                                    ~20, ->12
    8    19    >   PRE_INC                                                  !2
         20    >   IS_SMALLER                                               !2, 100
         21      > JMPNZ                                                    ~22, ->10
   14    22    >   ASSIGN                                                   !4, <array>
   15    23      > FE_RESET_R                                       $24     !0, ->31
         24    > > FE_FETCH_R                                       ~25     $24, !5, ->31
         25    >   ASSIGN                                                   !6, ~25
   16    26        IS_EQUAL                                                 !5, 1
         27      > JMPZ                                                     ~27, ->30
   17    28    >   ASSIGN_DIM                                               !4
         29        OP_DATA                                                  !6
   15    30    > > JMP                                                      ->24
         31    >   FE_FREE                                                  $24
   21    32        INIT_FCALL                                               'implode'
         33        SEND_VAL                                                 '%2C+'
         34        SEND_VAR                                                 !4
         35        DO_ICALL                                         $29     
         36        ASSIGN                                                   !7, $29
   22    37        ECHO                                                     !7
   24    38        ECHO                                                     '%0A%0A%0A%0A'
   27    39        INIT_FCALL                                               'explode'
         40        SEND_VAL                                                 '%2C+'
         41        SEND_VAL                                                 '1%2C+4%2C+9%2C+16%2C+25%2C+36%2C+49%2C+64%2C+81%2C+100%2C+121%2C+144%2C+169%2C+196%2C+225'
         42        DO_ICALL                                         $31     
         43      > FE_RESET_R                                       $32     $31, ->55
         44    > > FE_FETCH_R                                               $32, !8, ->55
   28    45    >   INIT_FCALL                                               'settype'
         46        SEND_REF                                                 !8
         47        SEND_VAL                                                 'integer'
         48        DO_ICALL                                                 
   29    49        INIT_FCALL                                               'decbin'
         50        SEND_VAR                                                 !8
         51        DO_ICALL                                         $34     
         52        CONCAT                                           ~35     $34, '%0A'
         53        ECHO                                                     ~35
   27    54      > JMP                                                      ->44
         55    >   FE_FREE                                                  $32
   30    56      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.85 ms | 1400 KiB | 21 Q