3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { private static function testprivate() { return 1; } public static function test() { return function() { return self::testprivate(); }; } } class B extends A { } $fn = B::test(); echo $fn();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WSIu7
function name:  (null)
number of ops:  7
compiled vars:  !0 = $fn
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                      'B', 'test'
          1        DO_FCALL                                          0  $1      
          2        ASSIGN                                                       !0, $1
   18     3        INIT_DYNAMIC_CALL                                            !0
          4        DO_FCALL                                          0  $3      
          5        ECHO                                                         $3
          6      > RETURN                                                       1

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

End of function testprivate

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WSIu7
function name:  test
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   DECLARE_LAMBDA_FUNCTION                              ~0      [0]
   10     1      > RETURN                                                       ~0
   11     2*     > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WSIu7
function name:  {closure:A::test():8}
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   INIT_STATIC_METHOD_CALL                                      'testprivate'
          1        DO_FCALL                                          0  $0      
          2      > RETURN                                                       $0
   10     3*     > RETURN                                                       null

End of Dynamic Function 0

End of function test

End of class A.

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

End of function testprivate

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WSIu7
function name:  test
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   DECLARE_LAMBDA_FUNCTION                              ~0      [0]
   10     1      > RETURN                                                       ~0
   11     2*     > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WSIu7
function name:  {closure:A::test():8}
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   INIT_STATIC_METHOD_CALL                                      'testprivate'
          1        DO_FCALL                                          0  $0      
          2      > RETURN                                                       $0
   10     3*     > RETURN                                                       null

End of Dynamic Function 0

End of function test

End of class B.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.11 ms | 3277 KiB | 13 Q