3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public function test() {echo __METHOD__ . "\n";} public static function testStatic() {echo __METHOD__ . "\n";} } class MyClass2 extends MyClass { public function test() {echo __METHOD__ . "\n"; call_user_func('parent::test'); } public static function testStatic() {echo __METHOD__ . "\n"; call_user_func('parent::testStatic'); call_user_func('static::testLate');} } class MyClass3 extends MyClass2 { public static function testLate() {echo __METHOD__ . "\n";} } echo "call object method:\n"; $o = new MyClass3(); $o->test(); $o->testStatic(); echo "call static method:\n"; MyClass3::testStatic();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EBSib
function name:  (null)
number of ops:  12
compiled vars:  !0 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ECHO                                                     'call+object+method%3A%0A'
   18     1        NEW                                              $1      'MyClass3'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   19     4        INIT_METHOD_CALL                                         !0, 'test'
          5        DO_FCALL                                      0          
   20     6        INIT_METHOD_CALL                                         !0, 'testStatic'
          7        DO_FCALL                                      0          
   22     8        ECHO                                                     'call+static+method%3A%0A'
   23     9        INIT_STATIC_METHOD_CALL                                  'MyClass3', 'testStatic'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

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

End of function test

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

End of function teststatic

End of class MyClass.

Class MyClass2:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EBSib
function name:  test
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'MyClass2%3A%3Atest%0A'
          1        INIT_USER_CALL                                0          'call_user_func', 'parent%3A%3Atest'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   null

End of function test

Function teststatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EBSib
function name:  testStatic
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'MyClass2%3A%3AtestStatic%0A'
          1        INIT_USER_CALL                                0          'call_user_func', 'parent%3A%3AtestStatic'
          2        DO_FCALL                                      0          
          3        INIT_USER_CALL                                0          'call_user_func', 'static%3A%3AtestLate'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   null

End of function teststatic

End of class MyClass2.

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

End of function testlate

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EBSib
function name:  test
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     'MyClass2%3A%3Atest%0A'
          1        INIT_USER_CALL                                0          'call_user_func', 'parent%3A%3Atest'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   null

End of function test

Function teststatic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EBSib
function name:  testStatic
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'MyClass2%3A%3AtestStatic%0A'
          1        INIT_USER_CALL                                0          'call_user_func', 'parent%3A%3AtestStatic'
          2        DO_FCALL                                      0          
          3        INIT_USER_CALL                                0          'call_user_func', 'static%3A%3AtestLate'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   null

End of function teststatic

End of class MyClass3.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.38 ms | 1399 KiB | 13 Q