3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.92 ms | 1395 KiB | 15 Q