3v4l.org

run code in 300+ PHP versions simultaneously
<?php $an_array = array(); $reflection = new ReflectionClass($an_object); $properties = $reflection->getProperties(); foreach ($properties as $property) { $property->setAccessible(true); $an_array[$property->getName()] = $property->getValue($an_object); if (!$property->isPublic()) $property->setAccessible(false); } var_dump($an_array); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 28
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 28
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 27
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 27
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/rVsOr
function name:  (null)
number of ops:  33
compiled vars:  !0 = $an_array, !1 = $reflection, !2 = $an_object, !3 = $properties, !4 = $property
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        NEW                                              $6      'ReflectionClass'
          2        SEND_VAR_EX                                              !2
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $6
    5     5        INIT_METHOD_CALL                                         !1, 'getProperties'
          6        DO_FCALL                                      0  $9      
          7        ASSIGN                                                   !3, $9
    6     8      > FE_RESET_R                                       $11     !3, ->28
          9    > > FE_FETCH_R                                               $11, !4, ->28
    8    10    >   INIT_METHOD_CALL                                         !4, 'setAccessible'
         11        SEND_VAL_EX                                              <true>
         12        DO_FCALL                                      0          
    9    13        INIT_METHOD_CALL                                         !4, 'getName'
         14        DO_FCALL                                      0  $13     
         15        INIT_METHOD_CALL                                         !4, 'getValue'
         16        SEND_VAR_EX                                              !2
         17        DO_FCALL                                      0  $15     
         18        ASSIGN_DIM                                               !0, $13
         19        OP_DATA                                                  $15
   10    20        INIT_METHOD_CALL                                         !4, 'isPublic'
         21        DO_FCALL                                      0  $16     
         22        BOOL_NOT                                         ~17     $16
         23      > JMPZ                                                     ~17, ->27
   11    24    >   INIT_METHOD_CALL                                         !4, 'setAccessible'
         25        SEND_VAL_EX                                              <false>
         26        DO_FCALL                                      0          
    6    27    > > JMP                                                      ->9
         28    >   FE_FREE                                                  $11
   14    29        INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                                 
   15    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.29 ms | 1396 KiB | 15 Q