3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
320.86 ms | 1395 KiB | 14 Q