3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tx = ["ans1","ans2","ans3"]; for ($i=0, $max=3; $i < $max; $i++) { $o[] = new stdClass; $o[$i] = $tx[$i]; } print_r( $o );
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 = 4
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 4
Branch analysis from position: 14
Branch analysis from position: 4
filename:       /in/Ris4D
function name:  (null)
number of ops:  18
compiled vars:  !0 = $tx, !1 = $i, !2 = $max, !3 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 0
          2        ASSIGN                                                   !2, 3
          3      > JMP                                                      ->12
    6     4    >   NEW                                              $8      'stdClass'
          5        DO_FCALL                                      0          
          6        ASSIGN_DIM                                               !3
          7        OP_DATA                                                  $8
    7     8        FETCH_DIM_R                                      ~11     !0, !1
          9        ASSIGN_DIM                                               !3, !1
         10        OP_DATA                                                  ~11
    5    11        PRE_INC                                                  !1
         12    >   IS_SMALLER                                               !1, !2
         13      > JMPNZ                                                    ~13, ->4
   11    14    >   INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.57 ms | 1395 KiB | 15 Q