3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = ["test","xyz"]; $object = new stdclass(); foreach($array as $key => $value) { $object->$key = $value; } var_dump(get_object_vars($object));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/TqueM
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array, !1 = $object, !2 = $value, !3 = $key
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    4     1        NEW                                                  $5      'stdclass'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !1, $5
    5     4      > FE_RESET_R                                           $8      !0, ->10
          5    > > FE_FETCH_R                                           ~9      $8, !2, ->10
          6    >   ASSIGN                                                       !3, ~9
    6     7        ASSIGN_OBJ                                                   !1, !3
          8        OP_DATA                                                      !2
    5     9      > JMP                                                          ->5
         10    >   FE_FREE                                                      $8
    8    11        INIT_FCALL                                                   'var_dump'
         12        INIT_FCALL                                                   'get_object_vars'
         13        SEND_VAR                                                     !1
         14        DO_ICALL                                             $12     
         15        SEND_VAR                                                     $12
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
227.54 ms | 3297 KiB | 15 Q