3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = array("phone","name","street"); $db_user = new stdClass(); $db_user->take_phone = [1 => '123']; $db_user->take_name = [1 => 'Chris']; $db_user->take_street = [1 => 'Main']; foreach($a as $aa) { $var = "take_$aa"; echo $db_user->$var[1]; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 19
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/HolHZ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $db_user, !2 = $aa, !3 = $var
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    5     1        NEW                                                  $5      'stdClass'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !1, $5
    6     4        ASSIGN_OBJ                                                   !1, 'take_phone'
          5        OP_DATA                                                      <array>
    7     6        ASSIGN_OBJ                                                   !1, 'take_name'
          7        OP_DATA                                                      <array>
    8     8        ASSIGN_OBJ                                                   !1, 'take_street'
          9        OP_DATA                                                      <array>
   10    10      > FE_RESET_R                                           $11     !0, ->19
         11    > > FE_FETCH_R                                                   $11, !2, ->19
   11    12    >   NOP                                                          
         13        FAST_CONCAT                                          ~12     'take_', !2
         14        ASSIGN                                                       !3, ~12
   12    15        FETCH_OBJ_R                                          ~14     !1, !3
         16        FETCH_DIM_R                                          ~15     ~14, 1
         17        ECHO                                                         ~15
   10    18      > JMP                                                          ->11
         19    >   FE_FREE                                                      $11
   13    20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.94 ms | 1881 KiB | 12 Q