3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { public static function __callStatic($method, $args) { echo '__callStatic : ' . $method . "\n"; } private function privateMethod() { echo __METHOD__ . "\n"; } protected function protectedMethod() { echo __METHOD__ . "\n"; } public function publicMethod() { echo __METHOD__ . "\n"; } } class Bar extends Foo { } class Baz extends Bar { public function test() { echo __METHOD__ . "\n"; $grandparent_class = get_parent_class(parent::class); $grandparent_class::privateMethod(); $grandparent_class::protectedMethod(); $grandparent_class::publicMethod(); } }; $baz = new Baz(); $baz->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  (null)
number of ops:  6
compiled vars:  !0 = $baz
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   37     0  E >   NEW                                                  $1      'Baz'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   38     3        INIT_METHOD_CALL                                             !0, 'test'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Class Foo:
Function __callstatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  __callStatic
number of ops:  6
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    7     2        CONCAT                                               ~2      '__callStatic+%3A+', !0
          3        CONCAT                                               ~3      ~2, '%0A'
          4        ECHO                                                         ~3
    8     5      > RETURN                                                       null

End of function __callstatic

Function privatemethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  privateMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                         'Foo%3A%3AprivateMethod%0A'
   12     1      > RETURN                                                       null

End of function privatemethod

Function protectedmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  protectedMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                         'Foo%3A%3AprotectedMethod%0A'
   15     1      > RETURN                                                       null

End of function protectedmethod

Function publicmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  publicMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   ECHO                                                         'Foo%3A%3ApublicMethod%0A'
   18     1      > RETURN                                                       null

End of function publicmethod

End of class Foo.

Class Bar:
Function __callstatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  __callStatic
number of ops:  6
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    7     2        CONCAT                                               ~2      '__callStatic+%3A+', !0
          3        CONCAT                                               ~3      ~2, '%0A'
          4        ECHO                                                         ~3
    8     5      > RETURN                                                       null

End of function __callstatic

Function privatemethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  privateMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                         'Foo%3A%3AprivateMethod%0A'
   12     1      > RETURN                                                       null

End of function privatemethod

Function protectedmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  protectedMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                         'Foo%3A%3AprotectedMethod%0A'
   15     1      > RETURN                                                       null

End of function protectedmethod

Function publicmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  publicMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   ECHO                                                         'Foo%3A%3ApublicMethod%0A'
   18     1      > RETURN                                                       null

End of function publicmethod

End of class Bar.

Class Baz:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  test
number of ops:  15
compiled vars:  !0 = $grandparent_class
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   29     0  E >   ECHO                                                         'Baz%3A%3Atest%0A'
   30     1        INIT_FCALL                                                   'get_parent_class'
          2        SEND_VAL                                                     'Bar'
          3        DO_ICALL                                             $1      
          4        ASSIGN                                                       !0, $1
   31     5        FETCH_CLASS                                       0  $3      !0
          6        INIT_STATIC_METHOD_CALL                                      $3, 'privateMethod'
          7        DO_FCALL                                          0          
   32     8        FETCH_CLASS                                       0  $5      !0
          9        INIT_STATIC_METHOD_CALL                                      $5, 'protectedMethod'
         10        DO_FCALL                                          0          
   33    11        FETCH_CLASS                                       0  $7      !0
         12        INIT_STATIC_METHOD_CALL                                      $7, 'publicMethod'
         13        DO_FCALL                                          0          
   34    14      > RETURN                                                       null

End of function test

Function __callstatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  __callStatic
number of ops:  6
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
    7     2        CONCAT                                               ~2      '__callStatic+%3A+', !0
          3        CONCAT                                               ~3      ~2, '%0A'
          4        ECHO                                                         ~3
    8     5      > RETURN                                                       null

End of function __callstatic

Function privatemethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  privateMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                         'Foo%3A%3AprivateMethod%0A'
   12     1      > RETURN                                                       null

End of function privatemethod

Function protectedmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  protectedMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   ECHO                                                         'Foo%3A%3AprotectedMethod%0A'
   15     1      > RETURN                                                       null

End of function protectedmethod

Function publicmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qb6HH
function name:  publicMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   ECHO                                                         'Foo%3A%3ApublicMethod%0A'
   18     1      > RETURN                                                       null

End of function publicmethod

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.36 ms | 1619 KiB | 14 Q