3v4l.org

run code in 300+ PHP versions simultaneously
<?php $num = 23; $base = 2; $stack = new SplStack(); while( $num > 0) { $stack->push($num % $base); $num = (int) $num/$base; // no integer division } while( $stack->valid() ) { $num = $stack->pop(); if ($num > 0) { echo $num; $stack->next(); } } echo "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 6
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 16
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 24
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 27, Position 2 = 16
Branch analysis from position: 27
Branch analysis from position: 16
Branch analysis from position: 24
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 6
Branch analysis from position: 15
Branch analysis from position: 6
filename:       /in/RYFvG
function name:  (null)
number of ops:  29
compiled vars:  !0 = $num, !1 = $base, !2 = $stack
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 23
    3     1        ASSIGN                                                   !1, 2
    4     2        NEW                                              $5      'SplStack'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $5
    6     5      > JMP                                                      ->13
    8     6    >   INIT_METHOD_CALL                                         !2, 'push'
          7        MOD                                              ~8      !0, !1
          8        SEND_VAL_EX                                              ~8
          9        DO_FCALL                                      0          
    9    10        CAST                                          4  ~10     !0
         11        DIV                                              ~11     ~10, !1
         12        ASSIGN                                                   !0, ~11
    6    13    >   IS_SMALLER                                               0, !0
         14      > JMPNZ                                                    ~13, ->6
   12    15    > > JMP                                                      ->24
   14    16    >   INIT_METHOD_CALL                                         !2, 'pop'
         17        DO_FCALL                                      0  $14     
         18        ASSIGN                                                   !0, $14
   15    19        IS_SMALLER                                               0, !0
         20      > JMPZ                                                     ~16, ->24
   16    21    >   ECHO                                                     !0
   17    22        INIT_METHOD_CALL                                         !2, 'next'
         23        DO_FCALL                                      0          
   12    24    >   INIT_METHOD_CALL                                         !2, 'valid'
         25        DO_FCALL                                      0  $18     
         26      > JMPNZ                                                    $18, ->16
   21    27    >   ECHO                                                     '%0A'
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.29 ms | 1395 KiB | 13 Q