3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $a_a; protected $a_p; protected static $a_s; } class B extends A { protected $b_p; public static $b_s; } $ref = new ReflectionClass('B'); foreach ($ref->getProperties((ReflectionProperty::IS_PUBLIC | ReflectionProperty::IS_PROTECTED)) as $prop) { print $prop->getName() . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/8P5WU
function name:  (null)
number of ops:  16
compiled vars:  !0 = $ref, !1 = $prop
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'B'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   12     4        INIT_METHOD_CALL                                         !0, 'getProperties'
          5        SEND_VAL_EX                                              3
          6        DO_FCALL                                      0  $5      
          7      > FE_RESET_R                                       $6      $5, ->14
          8    > > FE_FETCH_R                                               $6, !1, ->14
   13     9    >   INIT_METHOD_CALL                                         !1, 'getName'
         10        DO_FCALL                                      0  $7      
         11        CONCAT                                           ~8      $7, '%0A'
         12        ECHO                                                     ~8
   12    13      > JMP                                                      ->8
         14    >   FE_FREE                                                  $6
   14    15      > RETURN                                                   1

Class A: [no user functions]
Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.17 ms | 1385 KiB | 13 Q