3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 23; $b = 2; $res = 0; $arr = null; for($i = $a; $res > 0; $i = $res) { $arr[] = $i % $b; // store remainder in array $res = $i / $b; } var_dump($arr);
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 = 6
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 6
Branch analysis from position: 14
Branch analysis from position: 6
filename:       /in/UQsNF
function name:  (null)
number of ops:  18
compiled vars:  !0 = $a, !1 = $b, !2 = $res, !3 = $arr, !4 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 23
    3     1        ASSIGN                                                   !1, 2
    4     2        ASSIGN                                                   !2, 0
    5     3        ASSIGN                                                   !3, null
    6     4        ASSIGN                                                   !4, !0
          5      > JMP                                                      ->12
    8     6    >   MOD                                              ~11     !4, !1
          7        ASSIGN_DIM                                               !3
          8        OP_DATA                                                  ~11
    9     9        DIV                                              ~12     !4, !1
         10        ASSIGN                                                   !2, ~12
    6    11        ASSIGN                                                   !4, !2
         12    >   IS_SMALLER                                               0, !2
         13      > JMPNZ                                                    ~15, ->6
   11    14    >   INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.5 ms | 1395 KiB | 15 Q