3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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
Jump found. Position 1 = 7
Branch analysis from position: 7
Jump found. Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
Jump found. Position 1 = 22
Branch analysis from position: 22
Jump found. Position 1 = 24, Position 2 = 11
Branch analysis from position: 24
Jump found. Position 1 = 26, Position 2 = 33
Branch analysis from position: 26
Jump found. Position 1 = 27, Position 2 = 33
Branch analysis from position: 27
Jump found. Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
Jump found. Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 32
Branch analysis from position: 33
Jump found. Position 1 = 46, Position 2 = 57
Branch analysis from position: 46
Jump found. Position 1 = 47, Position 2 = 57
Branch analysis from position: 47
Jump found. Position 1 = 46
Branch analysis from position: 46
Branch analysis from position: 57
Jump found. Position 1 = -2
Branch analysis from position: 57
Branch analysis from position: 33
Branch analysis from position: 11
Jump found. Position 1 = 18
Branch analysis from position: 18
Jump found. Position 1 = 20, Position 2 = 13
Branch analysis from position: 20
Jump found. Position 1 = 24, Position 2 = 11
Branch analysis from position: 24
Branch analysis from position: 11
Branch analysis from position: 13
Jump found. Position 1 = 20, Position 2 = 13
Branch analysis from position: 20
Branch analysis from position: 13
Branch analysis from position: 3
Jump found. Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
Branch analysis from position: 3
filename:       /in/VYM2J
function name:  (null)
number of ops:  59
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                                                      ->7
   5     3    >   ASSIGN_DIM                                               !0, !1
         4        OP_DATA                                                  0
   4     5        POST_INC                                         ~12     !1
         6        FREE                                                     ~12
         7    >   IS_SMALLER                                       ~13     !1, 100
         8      > JMPNZ                                                    ~13, ->3
   8     9    >   ASSIGN                                                   !2, 1
        10      > JMP                                                      ->22
   9    11    >   ASSIGN                                                   !3, !2
        12      > JMP                                                      ->18
  10    13    >   FETCH_DIM_R                                      $17     !0, !3
        14        BOOL_NOT                                         ~18     $17
        15        ASSIGN_DIM                                               !0, !3
        16        OP_DATA                                                  ~18
   9    17        ASSIGN_ADD                                    0          !3, !2
        18    >   IS_SMALLER                                       ~20     !3, 100
        19      > JMPNZ                                                    ~20, ->13
   8    20    >   POST_INC                                         ~21     !2
        21        FREE                                                     ~21
        22    >   IS_SMALLER                                       ~22     !2, 100
        23      > JMPNZ                                                    ~22, ->11
  14    24    >   ASSIGN                                                   !4, <array>
  15    25      > FE_RESET_R                                       $24     !0, ->33
        26    > > FE_FETCH_R                                               $24, !5, ->33
        27    >   ASSIGN                                                   !6, ~25
  16    28        IS_EQUAL                                         ~27     !5, 1
        29      > JMPZ                                                     ~27, ->32
  17    30    >   ASSIGN_DIM                                               !4
        31        OP_DATA                                                  !6
        32    > > JMP                                                      ->26
        33    >   FE_FREE                                                  $24
  21    34        INIT_FCALL                                               'implode'
        35        SEND_VAL                                                 '%2C+'
        36        SEND_VAR                                                 !4
        37        DO_ICALL                                         $29     
        38        ASSIGN                                                   !7, $29
  22    39        ECHO                                                     !7
  24    40        ECHO                                                     '%0A%0A%0A%0A'
  27    41        INIT_FCALL                                               'explode'
        42        SEND_VAL                                                 '%2C+'
        43        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'
        44        DO_ICALL                                         $31     
        45      > FE_RESET_R                                       $32     $31, ->57
        46    > > FE_FETCH_R                                               $32, !8, ->57
  28    47    >   INIT_FCALL                                               'settype'
        48        SEND_REF                                                 !8
        49        SEND_VAL                                                 'integer'
        50        DO_ICALL                                                 
  29    51        INIT_FCALL                                               'decbin'
        52        SEND_VAR                                                 !8
        53        DO_ICALL                                         $34     
        54        CONCAT                                           ~35     $34, '%0A'
        55        ECHO                                                     ~35
        56      > JMP                                                      ->46
        57    >   FE_FREE                                                  $32
        58      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0