3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A extends \ArrayObject {} $a = new A; $a->offsetSet('test', 'testValue'); $reflection = new \ReflectionObject($a); $properties = $reflection->getProperties(); $c = count($properties); echo $c . PHP_EOL; if ($c) { var_dump($properties[0]->getValue($a)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 26
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/UcTHf
function name:  (null)
number of ops:  27
compiled vars:  !0 = $a, !1 = $reflection, !2 = $properties, !3 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   NEW                                                  $4      'A'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $4
    6     3        INIT_METHOD_CALL                                             !0, 'offsetSet'
          4        SEND_VAL_EX                                                  'test'
          5        SEND_VAL_EX                                                  'testValue'
          6        DO_FCALL                                          0          
    8     7        NEW                                                  $8      'ReflectionObject'
          8        SEND_VAR_EX                                                  !0
          9        DO_FCALL                                          0          
         10        ASSIGN                                                       !1, $8
    9    11        INIT_METHOD_CALL                                             !1, 'getProperties'
         12        DO_FCALL                                          0  $11     
         13        ASSIGN                                                       !2, $11
   11    14        COUNT                                                ~13     !2
         15        ASSIGN                                                       !3, ~13
   13    16        CONCAT                                               ~15     !3, '%0A'
         17        ECHO                                                         ~15
   15    18      > JMPZ                                                         !3, ->26
   16    19    >   INIT_FCALL                                                   'var_dump'
         20        FETCH_DIM_R                                          ~16     !2, 0
         21        INIT_METHOD_CALL                                             ~16, 'getValue'
         22        SEND_VAR_EX                                                  !0
         23        DO_FCALL                                          0  $17     
         24        SEND_VAR                                                     $17
         25        DO_ICALL                                                     
   17    26    > > RETURN                                                       1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.2 ms | 3060 KiB | 14 Q