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[]->text = tx[$i]; } print_r( $o );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 5
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 5
Branch analysis from position: 17
Branch analysis from position: 5
filename:       /in/kjdRE
function name:  (null)
number of ops:  21
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                                                      ->15
    7     5    >   NEW                                              $9      'stdClass'
          6        DO_FCALL                                      0          
          7        ASSIGN_DIM                                               !1
          8        OP_DATA                                                  $9
    8     9        FETCH_CONSTANT                                   ~13     'tx'
         10        FETCH_DIM_R                                      ~14     ~13, !2
         11        FETCH_DIM_W                                      $11     !1
         12        ASSIGN_OBJ                                               $11, 'text'
         13        OP_DATA                                                  ~14
    6    14        PRE_INC                                                  !2
         15    >   IS_SMALLER                                               !2, !3
         16      > JMPNZ                                                    ~16, ->5
   12    17    >   INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.76 ms | 1395 KiB | 15 Q