3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = (object)array('a', 'b', 'c'); $refl = new \ReflectionObject($obj); $props = $refl->getProperties(\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED); print_r($props); foreach($props as $prop) print $prop->name; print_r(get_object_vars($obj)); print_r($obj);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 18
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/0STlb
function name:  (null)
number of ops:  29
compiled vars:  !0 = $obj, !1 = $refl, !2 = $props, !3 = $prop
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   CAST                                          8  ~4      <array>
          1        ASSIGN                                                   !0, ~4
    4     2        NEW                                              $6      'ReflectionObject'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
    5     6        INIT_METHOD_CALL                                         !1, 'getProperties'
          7        SEND_VAL_EX                                              3
          8        DO_FCALL                                      0  $9      
          9        ASSIGN                                                   !2, $9
    6    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
    7    13      > FE_RESET_R                                       $12     !2, ->18
         14    > > FE_FETCH_R                                               $12, !3, ->18
    8    15    >   FETCH_OBJ_R                                      ~13     !3, 'name'
         16        ECHO                                                     ~13
    7    17      > JMP                                                      ->14
         18    >   FE_FREE                                                  $12
   10    19        INIT_FCALL                                               'print_r'
         20        INIT_FCALL                                               'get_object_vars'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $14     
         23        SEND_VAR                                                 $14
         24        DO_ICALL                                                 
   12    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !0
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.76 ms | 1396 KiB | 17 Q