3v4l.org

run code in 200+ 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        QM_ASSIGN                                                !0
  18     3        INIT_DYNAMIC_CALL                                        !0
         4        DO_FCALL                                      0  $3      
         5        ASSIGN_OBJ                                               $3
         6      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FWSIu70x7f6923a5d5c5:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WSIu7
function name:  {closure}
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 function %00%7Bclosure%7D%2Fin%2FWSIu70x7f6923a5d5c5

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 >   RAISE_ABSTRACT_ERROR                             ~0      '%00%7Bclosure%7D%2Fin%2FWSIu70x7f6923a5d5c5'
  10     1      > RETURN                                                   ~0
  11     2*     > RETURN                                                   null

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 >   RAISE_ABSTRACT_ERROR                             ~0      '%00%7Bclosure%7D%2Fin%2FWSIu70x7f6923a5d5c5'
  10     1      > RETURN                                                   ~0
  11     2*     > RETURN                                                   null

End of function test

End of class B.

Generated using Vulcan Logic Dumper, using php 7.4.0