3v4l.org

run code in 300+ PHP versions simultaneously
<?php $num = 11; while( $num > 0) { array_push($stack,($num % $base)); // pushes remainder on stack $num = (int) ($num/$base); // no integer division } while($stack) { echo array_pop($stack); // 1011 in final iteration } echo "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 13
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 13
Branch analysis from position: 18
Branch analysis from position: 13
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
Branch analysis from position: 2
filename:       /in/hima8
function name:  (null)
number of ops:  20
compiled vars:  !0 = $num, !1 = $stack, !2 = $base
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 11
    5     1      > JMP                                                      ->10
    7     2    >   INIT_FCALL                                               'array_push'
          3        SEND_REF                                                 !1
          4        MOD                                              ~4      !0, !2
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
    9     7        DIV                                              ~6      !0, !2
          8        CAST                                          4  ~7      ~6
          9        ASSIGN                                                   !0, ~7
    5    10    >   IS_SMALLER                                               0, !0
         11      > JMPNZ                                                    ~9, ->2
   13    12    > > JMP                                                      ->17
   15    13    >   INIT_FCALL                                               'array_pop'
         14        SEND_REF                                                 !1
         15        DO_ICALL                                         $10     
         16        ECHO                                                     $10
   13    17    > > JMPNZ                                                    !1, ->13
   19    18    >   ECHO                                                     '%0A'
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.97 ms | 1395 KiB | 17 Q