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); foreach($props as $prop) print $prop->name . '-' . $prop->getValue();
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/YDNCt
function name:  (null)
number of ops:  21
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
    7    10      > FE_RESET_R                                       $11     !2, ->19
         11    > > FE_FETCH_R                                               $11, !3, ->19
    8    12    >   FETCH_OBJ_R                                      ~12     !3, 'name'
         13        CONCAT                                           ~13     ~12, '-'
         14        INIT_METHOD_CALL                                         !3, 'getValue'
         15        DO_FCALL                                      0  $14     
         16        CONCAT                                           ~15     ~13, $14
         17        ECHO                                                     ~15
    7    18      > JMP                                                      ->11
         19    >   FE_FREE                                                  $11
    8    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.2 ms | 1393 KiB | 13 Q