3v4l.org

run code in 300+ PHP versions simultaneously
<?php class P{ public $foo; } class C extends P { public $lol; public function getFields() { return array_keys(get_class_vars(__CLASS__)); } } $c = new C(); var_dump($c->getFields());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZBhFH
function name:  (null)
number of ops:  9
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'C'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'getFields'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class P: [no user functions]
Class C:
Function getfields:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZBhFH
function name:  getFields
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'array_keys'
          1        INIT_FCALL                                               'get_class_vars'
          2        SEND_VAL                                                 'C'
          3        DO_ICALL                                         $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
   13     7*     > RETURN                                                   null

End of function getfields

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.96 ms | 1395 KiB | 19 Q