3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = (object)array('a', 'b', 'c'); $refl = new \ReflectionObject($obj); $props = $refl->getProperties(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED); foreach($props as $prop) print $prop->name;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/60ig1
function name:  (null)
number of ops:  17
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      > FE_RESET_R                                       $11     !2, ->15
         11    > > FE_FETCH_R                                               $11, !3, ->15
    7    12    >   FETCH_OBJ_R                                      ~12     !3, 'name'
         13        ECHO                                                     ~12
    6    14      > JMP                                                      ->11
         15    >   FE_FREE                                                  $11
    7    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.47 ms | 1393 KiB | 13 Q