3v4l.org

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

Class Foo: [no user functions]
Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.38 ms | 1393 KiB | 13 Q