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 } $stack->rewind(); while( $stack->valid() ){ echo $stack->current(); $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 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 18
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 26, Position 2 = 18
Branch analysis from position: 26
Branch analysis from position: 18
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/ucsFR
function name:  (null)
number of ops:  28
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
    7     6    >   INIT_METHOD_CALL                                         !2, 'push'
          7        MOD                                              ~8      !0, !1
          8        SEND_VAL_EX                                              ~8
          9        DO_FCALL                                      0          
    8    10        DIV                                              ~10     !0, !1
         11        CAST                                          4  ~11     ~10
         12        ASSIGN                                                   !0, ~11
    6    13    >   IS_SMALLER                                               0, !0
         14      > JMPNZ                                                    ~13, ->6
   11    15    >   INIT_METHOD_CALL                                         !2, 'rewind'
         16        DO_FCALL                                      0          
   13    17      > JMP                                                      ->23
   14    18    >   INIT_METHOD_CALL                                         !2, 'current'
         19        DO_FCALL                                      0  $15     
         20        ECHO                                                     $15
   15    21        INIT_METHOD_CALL                                         !2, 'next'
         22        DO_FCALL                                      0          
   13    23    >   INIT_METHOD_CALL                                         !2, 'valid'
         24        DO_FCALL                                      0  $17     
         25      > JMPNZ                                                    $17, ->18
   18    26    >   ECHO                                                     '%0A'
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.98 ms | 1395 KiB | 13 Q