3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Tester { private $a = 1; protected $b = 2; public $c = 3; private function A() { return 'a'; } protected function B() { return 'b'; } } class Test { use Tester; public function dump() { var_dump($this); var_dump(get_class_methods($this)); } } $t = new Test; $t->dump();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIqRN
function name:  (null)
number of ops:  7
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   DECLARE_CLASS                                            'test'
   26     1        NEW                                              $1      'Test'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   27     4        INIT_METHOD_CALL                                         !0, 'dump'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class Tester:
Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIqRN
function name:  A
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   'a'
   10     1*     > RETURN                                                   null

End of function a

Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIqRN
function name:  B
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   'b'
   14     1*     > RETURN                                                   null

End of function b

End of class Tester.

Class Test:
Function dump:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uIqRN
function name:  dump
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   22     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'get_class_methods'
          6        FETCH_THIS                                       ~2      
          7        SEND_VAL                                                 ~2
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                                 
   23    11      > RETURN                                                   null

End of function dump

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.82 ms | 1396 KiB | 17 Q